]> xenbits.xensource.com Git - people/dariof/xen-tools.git/commitdiff
Don't only allow lowercase "b" for "bytes".
authorAxel Beckert <abe@deuxchevaux.org>
Thu, 11 Apr 2013 08:32:20 +0000 (10:32 +0200)
committerAxel Beckert <abe@deuxchevaux.org>
Thu, 11 Apr 2013 08:32:20 +0000 (10:32 +0200)
Also put some examples in the according error message.

bin/xen-create-image

index d7c486855c5c39517b38f313cce7d453d4a84271..6027ed241b47008b9491b1d5d720b7a0eab6568f 100755 (executable)
@@ -1422,8 +1422,8 @@ sub checkOption
     # Define argument types
     my %types = (
         integerWithSuffix => {
-            check   => qr/^[0-9.]+[GgMmKk]b?$/,
-            message => "takes a suffixed integer.\n",
+            check   => qr/^[0-9.]+[GMk]B?$/i,
+            message => "takes a suffixed (mb, MB, G, k, etc.) integer.\n",
         },
         distribution => {
             check   => sub { -d "/usr/lib/xen-tools/$_[0].d" },