mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-12-16 12:24:29 +03:00
nodeinfo: Cleanup improper VIR_ERR_NO_SUPPORT use
This commit is contained in:
@@ -629,7 +629,7 @@ int nodeGetInfo(virConnectPtr conn ATTRIBUTE_UNUSED, virNodeInfoPtr nodeinfo) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* XXX Solaris will need an impl later if they port QEMU driver */
|
/* XXX Solaris will need an impl later if they port QEMU driver */
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT, "%s",
|
nodeReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("node info not implemented on this platform"));
|
_("node info not implemented on this platform"));
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
@@ -658,7 +658,7 @@ int nodeGetCPUStats(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT, "%s",
|
nodeReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("node CPU stats not implemented on this platform"));
|
_("node CPU stats not implemented on this platform"));
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
@@ -688,7 +688,7 @@ int nodeGetMemoryStats(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
# if HAVE_NUMACTL
|
# if HAVE_NUMACTL
|
||||||
if (numa_available() < 0) {
|
if (numa_available() < 0) {
|
||||||
# endif
|
# endif
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT,
|
nodeReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("NUMA not supported on this host"));
|
"%s", _("NUMA not supported on this host"));
|
||||||
return -1;
|
return -1;
|
||||||
# if HAVE_NUMACTL
|
# if HAVE_NUMACTL
|
||||||
@@ -724,7 +724,7 @@ int nodeGetMemoryStats(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT, "%s",
|
nodeReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("node memory stats not implemented on this platform"));
|
_("node memory stats not implemented on this platform"));
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
@@ -818,7 +818,7 @@ nodeGetCellsFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
int maxCell;
|
int maxCell;
|
||||||
|
|
||||||
if (numa_available() < 0) {
|
if (numa_available() < 0) {
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT,
|
nodeReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("NUMA not supported on this host"));
|
"%s", _("NUMA not supported on this host"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -856,7 +856,7 @@ nodeGetFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED)
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (numa_available() < 0) {
|
if (numa_available() < 0) {
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT,
|
nodeReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("NUMA not supported on this host"));
|
"%s", _("NUMA not supported on this host"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -885,14 +885,14 @@ int nodeGetCellsFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
int startCell ATTRIBUTE_UNUSED,
|
int startCell ATTRIBUTE_UNUSED,
|
||||||
int maxCells ATTRIBUTE_UNUSED)
|
int maxCells ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT, "%s",
|
nodeReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("NUMA memory information not available on this platform"));
|
_("NUMA memory information not available on this platform"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long nodeGetFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED)
|
unsigned long long nodeGetFreeMemory(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
nodeReportError(VIR_ERR_NO_SUPPORT, "%s",
|
nodeReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("NUMA memory information not available on this platform"));
|
_("NUMA memory information not available on this platform"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user