int ret = -1;
if (!devslot || !(olddev = *devslot)) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("cannot find existing network device to modify"));
goto cleanup;
}
oldType = virDomainNetGetActualType(olddev);
if (oldType == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
/* no changes are possible to a type='hostdev' interface */
- virReportError(VIR_ERR_NO_SUPPORT,
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("cannot change config of '%s' network type"),
virDomainNetTypeToString(oldType));
goto cleanup;
if (virMacAddrCmp(&olddev->mac, &newdev->mac)) {
char oldmac[VIR_MAC_STRING_BUFLEN], newmac[VIR_MAC_STRING_BUFLEN];
- virReportError(VIR_ERR_NO_SUPPORT,
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("cannot change network interface mac address "
"from %s to %s"),
virMacAddrFormat(&olddev->mac, oldmac),
}
if (STRNEQ_NULLABLE(olddev->model, newdev->model)) {
- virReportError(VIR_ERR_NO_SUPPORT,
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("cannot modify network device model from %s to %s"),
olddev->model ? olddev->model : "(default)",
newdev->model ? newdev->model : "(default)");
olddev->driver.virtio.txmode != newdev->driver.virtio.txmode ||
olddev->driver.virtio.ioeventfd != newdev->driver.virtio.ioeventfd ||
olddev->driver.virtio.event_idx != newdev->driver.virtio.event_idx)) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify virtio network device driver attributes"));
goto cleanup;
}
}
if (STRNEQ_NULLABLE(olddev->script, newdev->script)) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device script attribute"));
goto cleanup;
}
goto cleanup;
}
if (STRNEQ_NULLABLE(olddev->ifname, newdev->ifname)) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device tap name"));
goto cleanup;
}
}
if (!virDevicePCIAddressEqual(&olddev->info.addr.pci,
&newdev->info.addr.pci)) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device guest PCI address"));
goto cleanup;
}
goto cleanup;
}
if (STRNEQ_NULLABLE(olddev->info.alias, newdev->info.alias)) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device alias"));
goto cleanup;
}
if (olddev->info.rombar != newdev->info.rombar) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device rom bar setting"));
goto cleanup;
}
if (STRNEQ_NULLABLE(olddev->info.romfile, newdev->info.romfile)) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network rom file"));
goto cleanup;
}
if (olddev->info.bootIndex != newdev->info.bootIndex) {
- virReportError(VIR_ERR_NO_SUPPORT, "%s",
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify network device boot index setting"));
goto cleanup;
}
if (newType == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
/* can't turn it into a type='hostdev' interface */
- virReportError(VIR_ERR_NO_SUPPORT,
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("cannot change network interface type to '%s'"),
virDomainNetTypeToString(newType));
goto cleanup;
break;
default:
- virReportError(VIR_ERR_NO_SUPPORT,
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("unable to change config on '%s' network type"),
virDomainNetTypeToString(newdev->type));
break;
/* FINALLY - actually perform the required actions */
if (needReconnect) {
- virReportError(VIR_ERR_NO_SUPPORT,
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
_("unable to change config on '%s' network type"),
virDomainNetTypeToString(newdev->type));
goto cleanup;