Raise error message max size to 64K.
authorRichard Jones <rjones@redhat.com>
Mon, 23 Aug 2010 21:14:27 +0000 (22:14 +0100)
committerRichard Jones <rjones@redhat.com>
Tue, 24 Aug 2010 10:54:41 +0000 (11:54 +0100)
This commit removes one of the protocol limits, by raising the
maximum error message size from 256 bytes to 64K.

Although we could consider raising this further, since the
error messages are currently stored in fixed sized buffers on
the stack, that would require more invasive code changes.

src/generator.ml
src/guestfs.pod

index e18fa38..7d35ac1 100755 (executable)
@@ -6324,8 +6324,12 @@ enum guestfs_message_status {
   GUESTFS_STATUS_ERROR = 1
 };
 
   GUESTFS_STATUS_ERROR = 1
 };
 
-const GUESTFS_ERROR_LEN = 256;
+";
+
+  pr "const GUESTFS_ERROR_LEN = %d;\n" (64 * 1024);
+  pr "\n";
 
 
+  pr "\
 struct guestfs_message_error {
   string error_message<GUESTFS_ERROR_LEN>;
 };
 struct guestfs_message_error {
   string error_message<GUESTFS_ERROR_LEN>;
 };
index 5deccb5..a4d9c57 100644 (file)
@@ -724,15 +724,6 @@ 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.
 
 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
-able to return error messages up to the length of the protocol message
-(2-4 MB).
-
-Note that we cannot change the protocol without some breakage, because
-there are distributions that repackage the Fedora appliance.
-
 =item Protocol should return errno with error messages.
 
 It would be a nice-to-have to be able to get the original value of
 =item Protocol should return errno with error messages.
 
 It would be a nice-to-have to be able to get the original value of