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

[Xen-devel] [PATCH RFC 3/5] libxl/FreeBSD: write blkback "path" node

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@xxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
 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 8c47cff..a5a8999 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -2477,7 +2477,13 @@ static void device_disk_add(libxl__egc *egc, uint32_t 
                     if (!libxl__device_physdisk_major_minor(dev, &major, 
                         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);
                 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®.