mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
libxl: Move bdf parsing into libxlu
Config parsing functions do not properly belong in libxl. Move them into libxlu so that others can use them or not as they see fit. No functional changes. One side-effect was making public a private libxl utility function which just set the elements of a structure from the function arguments passed in. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
8c1ba7af04
commit
543e95e992
7 files changed
+199
-161
No files matched your search
@@ -40,6 +40,7 @@
|
||||
|
||||
#include <libxl.h>
|
||||
#include <libxl_utils.h>
|
||||
#include <libxlutil.h>
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
@@ -556,7 +557,7 @@ static PyObject *pyxl_pci_parse(XlObject *self, PyObject *args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ( libxl_device_pci_parse_bdf(self->ctx, &pci->obj, str) ) {
|
||||
if ( xlu_pci_parse_bdf(NULL, &pci->obj, str) ) {
|
||||
PyErr_SetString(xl_error_obj, "cannot parse pci device spec (BDF)");
|
||||
Py_DECREF(pci);
|
||||
return NULL;
|
||||
|
||||