gusibsd

0003-libxl-FreeBSD-write-blkback-path-node.patch

Feb 23rd, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. From 98859ffa6a197e4ef394f9fde1bd41aeaeb023c9 Mon Sep 17 00:00:00 2001
  2. From: Roger Pau Monne <roger.pau@citrix.com>
  3. Date: Thu, 21 May 2015 16:10:26 +0200
  4. Subject: [PATCH RFC 3/5] libxl/FreeBSD: write blkback "path" node
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8.  
  9. FreeBSD blkback doesn't use the physical-device xenstore node because it
  10. can handle both block devices and raw files directly. Instead introduce a
  11. new xenstore blkback node that is used by hotplug scripts to write the path
  12. to the block device or raw image.
  13.  
  14. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
  15. Cc: Ian Jackson <ian.jackson@eu.citrix.com>
  16. Cc: Ian Campbell <ian.campbell@citrix.com>
  17. Cc: Wei Liu <wei.liu2@citrix.com>
  18. ---
  19. tools/libxl/libxl.c | 8 +++++++-
  20. 1 file changed, 7 insertions(+), 1 deletion(-)
  21.  
  22. diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
  23. index 63210b6..b9e3501 100644
  24. --- a/tools/libxl/libxl.c
  25. +++ b/tools/libxl/libxl.c
  26. @@ -2474,7 +2474,13 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
  27. libxl__device_physdisk_major_minor(dev, &major, &minor);
  28. flexarray_append_pair(back, "physical-device",
  29. libxl__sprintf(gc, "%x:%x", major, minor));
  30. -#endif /* __linux__ || __NetBSD__ */
  31. +#elif defined(__FreeBSD__)
  32. + /*
  33. + * FreeBSD blkback supports raw image files, so we
  34. + * cannot reuse the physical-device node.
  35. + */
  36. + flexarray_append_pair(back, "path", dev);
  37. +#endif
  38. }
  39.  
  40. assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
Add Comment
Please, Sign In to add comment