Skip to content
Browse files

Handle xs_write returning a bool rather than an int.

Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information...
1 parent 8cf977f commit 670884216957df4777bddf7ceffd466b2d2803ee @johnelse johnelse committed Oct 25, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 ocaml/xenguest/xenguest_stubs.c
View
4 ocaml/xenguest/xenguest_stubs.c
@@ -92,6 +92,7 @@ xenstore_putsv(int domid, const char *val, const char *fmt, va_list ap)
struct xs_handle *xsh = NULL;
int n, m, rc;
char key[1024];
+ bool success;
rc = 1;
bzero(key, sizeof(key));
@@ -110,7 +111,8 @@ xenstore_putsv(int domid, const char *val, const char *fmt, va_list ap)
if (m < 0)
goto out;
- rc = xs_write(xsh, XBT_NULL, key, val, strlen(val));
+ success = xs_write(xsh, XBT_NULL, key, val, strlen(val));
+ rc = success? 0 : 1;
out:
xs_daemon_close(xsh);
free(path);

0 comments on commit 6708842

Please sign in to comment.
Something went wrong with that request. Please try again.