diff options
author | Richard Jones <rjones@redhat.com> | 2010-08-23 22:14:27 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-08-24 11:54:41 +0100 |
commit | 90d06e28888d9a492560ca986dca0708f881d173 (patch) | |
tree | ae1b7efedba0522ea57340c88aaa06c8ba05863a /src | |
parent | 866ec00d1f8bc40042795b66ceec12608bb1f9e8 (diff) | |
download | libguestfs-90d06e28888d9a492560ca986dca0708f881d173.tar.gz libguestfs-90d06e28888d9a492560ca986dca0708f881d173.tar.xz libguestfs-90d06e28888d9a492560ca986dca0708f881d173.zip |
Raise error message max size to 64K.
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.
Diffstat (limited to 'src')
-rwxr-xr-x | src/generator.ml | 6 | ||||
-rw-r--r-- | src/guestfs.pod | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/generator.ml b/src/generator.ml index e18fa389..7d35ac14 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -6324,8 +6324,12 @@ enum guestfs_message_status { 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>; }; diff --git a/src/guestfs.pod b/src/guestfs.pod index 5deccb5d..a4d9c572 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -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. -=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 |