diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-09-17 15:28:41 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-09-17 16:05:39 +0100 |
commit | abac360f324d8c881878c5d9b7fb64be93981125 (patch) | |
tree | 78f3b482e8df08c7c4065df1b668eee91a033b83 /daemon/daemon.h | |
parent | bb02f0fbe80ef093731bc9a6a407f1edaccf991d (diff) | |
download | libguestfs-abac360f324d8c881878c5d9b7fb64be93981125.tar.gz libguestfs-abac360f324d8c881878c5d9b7fb64be93981125.tar.xz libguestfs-abac360f324d8c881878c5d9b7fb64be93981125.zip |
Daemon: fix handling of errors from xread and xwrite.
If xread or xwrite returns -1, that indicates an error and we
should exit. Note that xread/xwrite has already printed the
error message.
Diffstat (limited to 'daemon/daemon.h')
-rw-r--r-- | daemon/daemon.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/daemon.h b/daemon/daemon.h index 83c9672d..86c68769 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -36,8 +36,10 @@ extern int sysroot_len; extern char *sysroot_path (const char *path); -extern int xwrite (int sock, const void *buf, size_t len); -extern int xread (int sock, void *buf, size_t len); +extern int xwrite (int sock, const void *buf, size_t len) + __attribute__((__warn_unused_result__)); +extern int xread (int sock, void *buf, size_t len) + __attribute__((__warn_unused_result__)); extern int add_string (char ***argv, int *size, int *alloc, const char *str); extern int count_strings (char *const *argv); |