提交 cf10a5b1 编写于 作者: L Laszlo Ersek 提交者: Luiz Capitulino

pci-assign: accept Error from monitor_handle_fd_param2()

Propagate any errors in monitor fd handling up to get_real_device(), and
report them there. We'll continue the propagation upwards when
get_real_device() becomes a leaf itself (when none of its callees will
report errors internally any longer when detecting and returning an
error).
Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
eviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 5906366e
......@@ -541,6 +541,7 @@ static int get_real_device(AssignedDevice *pci_dev)
uint16_t id;
PCIRegion *rp;
PCIDevRegions *dev = &pci_dev->real_device;
Error *local_err = NULL;
dev->region_number = 0;
......@@ -551,8 +552,12 @@ static int get_real_device(AssignedDevice *pci_dev)
snprintf(name, sizeof(name), "%sconfig", dir);
if (pci_dev->configfd_name && *pci_dev->configfd_name) {
dev->config_fd = monitor_handle_fd_param(cur_mon, pci_dev->configfd_name);
if (dev->config_fd < 0) {
dev->config_fd = monitor_handle_fd_param2(cur_mon,
pci_dev->configfd_name,
&local_err);
if (local_err) {
qerror_report_err(local_err);
error_free(local_err);
return 1;
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册