X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fproto.c;h=0002d80ab917f10009b109361eb01279c4efc4dc;hb=4c50f4c38d9a50fbf983c79dd208d1b1598fef8a;hp=e3ff9e9d0e2af21d945aa1e3126cf7592ecc1cac;hpb=50c239c045675c7480d88bf10857f3e85c3385d3;p=libguestfs.git diff --git a/daemon/proto.c b/daemon/proto.c index e3ff9e9..0002d80 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -195,12 +195,11 @@ reply_with_error (const char *fs, ...) } void -reply_with_perror (const char *fs, ...) +reply_with_perror_errno (int err, const char *fs, ...) { char buf1[GUESTFS_ERROR_LEN]; char buf2[GUESTFS_ERROR_LEN]; va_list args; - int err = errno; va_start (args, fs); vsnprintf (buf1, sizeof buf1, fs, args); @@ -290,7 +289,7 @@ reply (xdrproc_t xdrp, char *ret) * we want to return an error message instead. (RHBZ#509597). */ if (!(*xdrp) (&xdr, ret)) { - reply_with_perror ("guestfsd: failed to encode reply body\n"); + reply_with_error ("guestfsd: failed to encode reply body\n(maybe the reply exceeds the maximum message size in the protocol?)"); xdr_destroy (&xdr); return; }