debuggers.hg

changeset 22089:88f4d10e0508

xl: use libxl_device_pci_destroy

[PATCH 16 of 16 of
libxl: autogenerate type definitions and destructor functions]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Ian Campbell <ian.campbell@citrix.com>
date Thu Aug 19 15:33:43 2010 +0100 (2010-08-19)
parents 477abe597f6d
children 60746a2c14a6
files tools/libxl/xl_cmdimpl.c
line diff
     1.1 --- a/tools/libxl/xl_cmdimpl.c	Thu Aug 19 15:32:56 2010 +0100
     1.2 +++ b/tools/libxl/xl_cmdimpl.c	Thu Aug 19 15:33:43 2010 +0100
     1.3 @@ -2010,6 +2010,7 @@ static void pcilist(char *dom)
     1.4      printf("VFn  domain bus  slot func\n");
     1.5      for (i = 0; i < num; i++) {
     1.6          printf("0x%02x 0x%04x 0x%02x 0x%02x 0x%01x\n", pcidevs[i].vdevfn, pcidevs[i].domain, pcidevs[i].bus, pcidevs[i].dev, pcidevs[i].func);
     1.7 +        libxl_device_pci_destroy(&pcidevs[i]);
     1.8      }
     1.9      free(pcidevs);
    1.10  }
    1.11 @@ -2052,6 +2053,7 @@ static void pcidetach(char *dom, char *b
    1.12          exit(2);
    1.13      }
    1.14      libxl_device_pci_remove(&ctx, domid, &pcidev);
    1.15 +    libxl_device_pci_destroy(&pcidev);
    1.16  }
    1.17  
    1.18  int main_pcidetach(int argc, char **argv)
    1.19 @@ -2092,6 +2094,7 @@ static void pciattach(char *dom, char *b
    1.20          exit(2);
    1.21      }
    1.22      libxl_device_pci_add(&ctx, domid, &pcidev);
    1.23 +    libxl_device_pci_destroy(&pcidev);
    1.24  }
    1.25  
    1.26  int main_pciattach(int argc, char **argv)