gusibsd

0001-libxl-only-write-physical-device-on-Linux-and-NetBSD.pa

Feb 23rd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. From 2724234dd7ef6a7be9b27a9be2832d00cbb61bd6 Mon Sep 17 00:00:00 2001
  2. From: Roger Pau Monne <roger.pau@citrix.com>
  3. Date: Thu, 21 May 2015 16:03:24 +0200
  4. Subject: [PATCH RFC 1/5] libxl: only write physical-device on Linux and NetBSD
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8.  
  9. physical-device is only used by Linux and NetBSD blkback, there's no need to
  10. write it when the host is using a different OS.
  11.  
  12. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
  13. Cc: Ian Jackson <ian.jackson@eu.citrix.com>
  14. Cc: Ian Campbell <ian.campbell@citrix.com>
  15. Cc: Wei Liu <wei.liu2@citrix.com>
  16. ---
  17. tools/libxl/libxl.c | 2 ++
  18. 1 file changed, 2 insertions(+)
  19.  
  20. diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
  21. index 312a371..63210b6 100644
  22. --- a/tools/libxl/libxl.c
  23. +++ b/tools/libxl/libxl.c
  24. @@ -2469,10 +2469,12 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
  25. */
  26. if (!disk->script &&
  27. disk->backend_domid == LIBXL_TOOLSTACK_DOMID) {
  28. +#if defined(__linux__) || defined(__NetBSD__)
  29. int major, minor;
  30. libxl__device_physdisk_major_minor(dev, &major, &minor);
  31. flexarray_append_pair(back, "physical-device",
  32. libxl__sprintf(gc, "%x:%x", major, minor));
  33. +#endif /* __linux__ || __NetBSD__ */
  34. }
  35.  
  36. assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
Add Comment
Please, Sign In to add comment