[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC 1/5] libxl: only write physical-device on Linux and NetBSD

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à <roger.pau@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
 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 
                 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, 
                         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)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.