From 88e81e1eff2bdab1347a519f1c8fd7a4c2fda3dd Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 16 Jul 2010 15:17:01 +0100 Subject: [PATCH] doc: Add guestfish 'lvcreate 1M' gotcha. (cherry picked from commit 5b77be72bc4e46c7a53a24f1eb4cbd107a708f17) --- src/guestfs.pod | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/guestfs.pod b/src/guestfs.pod index 2fa3ace..e876016 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -612,6 +612,27 @@ the error message was also unintuitive, but we have corrected this since. Like the Bourne shell, we should have used C to run commands. +=item guestfish megabyte modifiers don't work right on all commands + +In recent guestfish you can use C<1M> to mean 1 megabyte (and +similarly for other modifiers). What guestfish actually does is to +multiply the number part by the modifier part and pass the result to +the C API. However this doesn't work for a few APIs which aren't +expecting bytes, but are already expecting some other unit +(eg. megabytes). + +The most common is L. The guestfish command: + + lvcreate LV VG 100M + +does not do what you might expect. Instead because +L is already expecting megabytes, this tries to +create a 100 I (100 megabytes * megabytes) logical volume. +The error message you get from this is also a little obscure. + +This could be fixed in the generator by specially marking parameters +and return values which take bytes or other units. + =item Protocol limit of 256 characters for error messages This limit is both rather small and quite unnecessary. We should be -- 1.8.3.1