diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2012-08-01 12:46:47 +0100 |
---|---|---|
committer | Roger Pau Monne <roger.pau@citrix.com> | 2012-08-01 12:46:47 +0100 |
commit | 7c3e7ad39ce2c8d1c07cd63e6983d7581bad1f2a (patch) | |
tree | d87cb33fc228c200726b8152ae021a4bc9440360 /tools/xenbackendd | |
parent | 108fdb564b06e58087a3ccfdad5996a878d39b9a (diff) | |
download | xen-7c3e7ad39ce2c8d1c07cd63e6983d7581bad1f2a.tar.gz xen-7c3e7ad39ce2c8d1c07cd63e6983d7581bad1f2a.tar.bz2 xen-7c3e7ad39ce2c8d1c07cd63e6983d7581bad1f2a.zip |
libxl: call hotplug scripts from xl for NetBSD
Add the missing NetBSD functions to call hotplug scripts, and disable
xenbackendd if libxl/disable_udev is not set.
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/xenbackendd')
-rw-r--r-- | tools/xenbackendd/xenbackendd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/xenbackendd/xenbackendd.c b/tools/xenbackendd/xenbackendd.c index 6b5bb8e75d..5381a2adef 100644 --- a/tools/xenbackendd/xenbackendd.c +++ b/tools/xenbackendd/xenbackendd.c @@ -33,6 +33,7 @@ #define DEVTYPE_UNKNOWN 0 #define DEVTYPE_VIF 1 #define DEVTYPE_VBD 2 +#define DISABLE_EXEC "libxl/disable_udev" #define DOMAIN_PATH "/local/domain/0" @@ -149,7 +150,7 @@ main(int argc, char * const argv[]) unsigned int num; char *s; int state; - char *sstate; + char *sstate, *sdisable; char *p; char buf[80]; int type; @@ -245,6 +246,10 @@ main(int argc, char * const argv[]) continue; } + sdisable = xs_read(xs, XBT_NULL, DISABLE_EXEC, 0); + if (sdisable) + goto next1; + if (strlen(vec[XS_WATCH_PATH]) < sizeof("state")) goto next1; @@ -314,6 +319,7 @@ next2: free(sstate); next1: + free(sdisable); free(vec); } |