diff options
Diffstat (limited to 'tools/libxl/libxl_pci.c')
-rw-r--r-- | tools/libxl/libxl_pci.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 84676f4d4f..843d975e6e 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -410,9 +410,15 @@ retry_transaction2: goto retry_transaction2; if (num == 1) { - char *fe_path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s/frontend", be_path)); - xs_rm(ctx->xsh, XBT_NULL, be_path); - xs_rm(ctx->xsh, XBT_NULL, fe_path); + libxl__device dev; + if (libxl__parse_backend_path(gc, be_path, &dev) != 0) + return ERROR_FAIL; + + dev.domid = domid; + dev.kind = LIBXL__DEVICE_KIND_PCI; + dev.devid = 0; + + libxl__device_destroy(gc, &dev); return 0; } |