Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 2724234dd7ef6a7be9b27a9be2832d00cbb61bd6 Mon Sep 17 00:00:00 2001
- From: Roger Pau Monne <roger.pau@citrix.com>
- 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é <roger.pau@citrix.com>
- Cc: Ian Jackson <ian.jackson@eu.citrix.com>
- Cc: Ian Campbell <ian.campbell@citrix.com>
- Cc: Wei Liu <wei.liu2@citrix.com>
- ---
- tools/libxl/libxl.c | 2 ++
- 1 file changed, 2 insertions(+)
- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
- index 312a371..63210b6 100644
- --- a/tools/libxl/libxl.c
- +++ b/tools/libxl/libxl.c
- @@ -2469,10 +2469,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;
- 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);
Add Comment
Please, Sign In to add comment