Add missing error reporting when loading mac filter config for QEMU
If the 'mac_filter' configuration parameter is enabled, and there is a failure to enable filtering, no error is reported back to the caller. Also fix some bogus whitespace indentation for hugetlbfs_mount * src/qemu/qemu_conf.c: Add missing error reporting
This commit is contained in:
parent
5f1bbecb7d
commit
c24c07f40b
@ -378,16 +378,16 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p = virConfGetValue (conf, "hugetlbfs_mount");
|
p = virConfGetValue (conf, "hugetlbfs_mount");
|
||||||
CHECK_TYPE ("hugetlbfs_mount", VIR_CONF_STRING);
|
CHECK_TYPE ("hugetlbfs_mount", VIR_CONF_STRING);
|
||||||
if (p && p->str) {
|
if (p && p->str) {
|
||||||
VIR_FREE(driver->hugetlbfs_mount);
|
VIR_FREE(driver->hugetlbfs_mount);
|
||||||
if (!(driver->hugetlbfs_mount = strdup(p->str))) {
|
if (!(driver->hugetlbfs_mount = strdup(p->str))) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
virConfFree(conf);
|
virConfFree(conf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p = virConfGetValue (conf, "mac_filter");
|
p = virConfGetValue (conf, "mac_filter");
|
||||||
CHECK_TYPE ("mac_filter", VIR_CONF_LONG);
|
CHECK_TYPE ("mac_filter", VIR_CONF_LONG);
|
||||||
@ -398,12 +398,16 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
|
|||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("failed to enable mac filter in '%s'"),
|
_("failed to enable mac filter in '%s'"),
|
||||||
__FILE__);
|
__FILE__);
|
||||||
|
virConfFree(conf);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((errno = networkDisableAllFrames(driver))) {
|
if ((errno = networkDisableAllFrames(driver))) {
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("failed to add rule to drop all frames in '%s'"),
|
_("failed to add rule to drop all frames in '%s'"),
|
||||||
__FILE__);
|
__FILE__);
|
||||||
|
virConfFree(conf);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user