[Libguestfs] [PATCH v2 1/4] resize: Remove unnecessary 'prog' from error message.

Richard W.M. Jones rjones at redhat.com
Fri May 15 10:40:56 UTC 2015


The common error function already prints the program name, so
we don't need to print it twice.

Before:

  $ virt-resize --expand ""
  virt-resize: error: virt-resize: empty --expand option

After:

  $ virt-resize --expand ""
  virt-resize: error: empty --expand option
---
 resize/resize.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/resize/resize.ml b/resize/resize.ml
index 40a777c..33abaab 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -170,7 +170,7 @@ let main () =
     let dryrun = ref false in
     let expand = ref "" in
     let set_expand s =
-      if s = "" then error (f_"%s: empty --expand option") prog
+      if s = "" then error (f_"empty --expand option")
       else if !expand <> "" then error (f_"--expand option given twice")
       else expand := s
     in
-- 
2.3.1




More information about the Libguestfs mailing list