diff options
author | Toomas Soome <tsoome@me.com> | 2019-01-20 22:40:57 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-04-22 08:29:23 +0300 |
commit | a2d4e26a43f10718fe33e47fa968a3fdf901e156 (patch) | |
tree | fe0549645ea53370a8b6c3077bda7b9845d09240 | |
parent | dba471f4100e039b518abed314526d822234f8cc (diff) | |
download | illumos-joyent-a2d4e26a43f10718fe33e47fa968a3fdf901e156.tar.gz |
10798 xpv: NULL pointer errors
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/uts/common/xen/io/xenbus_client.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/usr/src/uts/common/xen/io/xenbus_client.c b/usr/src/uts/common/xen/io/xenbus_client.c index b0cb441332..9a6fcb6365 100644 --- a/usr/src/uts/common/xen/io/xenbus_client.c +++ b/usr/src/uts/common/xen/io/xenbus_client.c @@ -53,8 +53,6 @@ * IN THE SOFTWARE. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef XPV_HVM_DRIVER #include <sys/xpv_support.h> #include <sys/hypervisor.h> @@ -70,9 +68,9 @@ int xenbus_watch_path(struct xenbus_device *dev, const char *path, - struct xenbus_watch *watch, - void (*callback)(struct xenbus_watch *, - const char **, unsigned int)) + struct xenbus_watch *watch, + void (*callback)(struct xenbus_watch *, + const char **, unsigned int)) { int err; @@ -93,9 +91,9 @@ xenbus_watch_path(struct xenbus_device *dev, const char *path, int xenbus_watch_path2(struct xenbus_device *dev, const char *path, - const char *path2, struct xenbus_watch *watch, - void (*callback)(struct xenbus_watch *, - const char **, unsigned int)) + const char *path2, struct xenbus_watch *watch, + void (*callback)(struct xenbus_watch *, + const char **, unsigned int)) { int err; char *state; @@ -124,7 +122,7 @@ xenbus_watch_path2(struct xenbus_device *dev, const char *path, */ int xenbus_switch_state(struct xenbus_device *dev, xenbus_transaction_t xbt, - XenbusState state) + XenbusState state) { int current_state; int err; @@ -169,7 +167,7 @@ error_path(struct xenbus_device *dev) static void common_dev_error(struct xenbus_device *dev, int err, const char *fmt, - va_list ap) + va_list ap) { int ret; unsigned int len; @@ -193,7 +191,7 @@ common_dev_error(struct xenbus_device *dev, int err, const char *fmt, goto fail; } - if (xenbus_write(NULL, path_buffer, "error", printf_buffer) != 0) { + if (xenbus_write(0, path_buffer, "error", printf_buffer) != 0) { printf("xenbus: failed to write error node for %s (%s)\n", dev->nodename, printf_buffer); goto fail; @@ -235,7 +233,7 @@ void xenbus_dev_ok(struct xenbus_device *dev) { if (dev->has_error) { - if (xenbus_rm(NULL, dev->nodename, "error") != 0) + if (xenbus_rm(0, dev->nodename, "error") != 0) printf("xenbus: failed to clear error node for %s\n", dev->nodename); else |