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.
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>;
};
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