Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 98859ffa6a197e4ef394f9fde1bd41aeaeb023c9 Mon Sep 17 00:00:00 2001
- From: Roger Pau Monne <roger.pau@citrix.com>
- Date: Thu, 21 May 2015 16:10:26 +0200
- Subject: [PATCH RFC 3/5] libxl/FreeBSD: write blkback "path" node
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- FreeBSD blkback doesn't use the physical-device xenstore node because it
- can handle both block devices and raw files directly. Instead introduce a
- new xenstore blkback node that is used by hotplug scripts to write the path
- to the block device or raw image.
- 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 | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
- index 63210b6..b9e3501 100644
- --- a/tools/libxl/libxl.c
- +++ b/tools/libxl/libxl.c
- @@ -2474,7 +2474,13 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
- libxl__device_physdisk_major_minor(dev, &major, &minor);
- flexarray_append_pair(back, "physical-device",
- libxl__sprintf(gc, "%x:%x", major, minor));
- -#endif /* __linux__ || __NetBSD__ */
- +#elif defined(__FreeBSD__)
- + /*
- + * FreeBSD blkback supports raw image files, so we
- + * cannot reuse the physical-device node.
- + */
- + flexarray_append_pair(back, "path", dev);
- +#endif
- }
- assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
Add Comment
Please, Sign In to add comment