}
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);
* 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;
}