From 2724234dd7ef6a7be9b27a9be2832d00cbb61bd6 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 21 May 2015 16:03:24 +0200 Subject: [PATCH RFC 1/5] libxl: only write physical-device on Linux and NetBSD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit physical-device is only used by Linux and NetBSD blkback, there's no need to write it when the host is using a different OS. Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Ian Campbell Cc: Wei Liu --- tools/libxl/libxl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index a6eb2df..8c47cff 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -2472,10 +2472,12 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid, */ if (!disk->script && disk->backend_domid == LIBXL_TOOLSTACK_DOMID) { +#if defined(__linux__) || defined(__NetBSD__) int major, minor; if (!libxl__device_physdisk_major_minor(dev, &major, &minor)) flexarray_append_pair(back, "physical-device", libxl__sprintf(gc, "%x:%x", major, minor)); +#endif /* __linux__ || __NetBSD__ */ } assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD); -- 1.9.5 (Apple Git-50.3)