summaryrefslogtreecommitdiffstats
path: root/daemon/daemon.h
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-09-17 15:28:41 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-09-17 16:05:39 +0100
commitabac360f324d8c881878c5d9b7fb64be93981125 (patch)
tree78f3b482e8df08c7c4065df1b668eee91a033b83 /daemon/daemon.h
parentbb02f0fbe80ef093731bc9a6a407f1edaccf991d (diff)
downloadlibguestfs-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.h6
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);