mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
libxl: do not assume Dom0 backend while getting nic info
Fill backend_domid field based on backend path. [ Correspoding xen.git#master commit is7539772a65-iwj ] Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> (cherry picked from commit317eb71bc3)
This commit is contained in:
1 parent
cc977b7ab0
commit
57dbc55cd3
1 file changed
+12
@@ -3485,6 +3485,18 @@ static int libxl__device_nic_from_xenstore(libxl__gc *gc,
|
||||
else
|
||||
nic->devid = 0;
|
||||
|
||||
rc = libxl__xs_read_checked(gc, XBT_NULL,
|
||||
GCSPRINTF("%s/backend", libxl_path), &tmp);
|
||||
if (rc) goto out;
|
||||
|
||||
if (!tmp) {
|
||||
LOG(ERROR, "nic %s does not exist (no backend path)", libxl_path);
|
||||
rc = ERROR_FAIL;
|
||||
goto out;
|
||||
}
|
||||
rc = libxl__backendpath_parse_domid(gc, tmp, &nic->backend_domid);
|
||||
if (rc) goto out;
|
||||
|
||||
/* nic->mtu = */
|
||||
|
||||
tmp = READ_LIBXLDEV(gc, "mac");
|
||||
|
||||