}
#else
+static const char *unsupported = N_("not supported on non-linux platforms");
+
int
pciGetPhysicalFunction(const char *vf_sysfs_path ATTRIBUTE_UNUSED,
struct pci_config_address **physical_function ATTRIBUTE_UNUSED)
{
- pciReportError(VIR_ERR_INTERNAL_ERROR, _("pciGetPhysicalFunction is not "
- "supported on non-linux platforms"));
+ pciReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
struct pci_config_address ***virtual_functions ATTRIBUTE_UNUSED,
unsigned int *num_virtual_functions ATTRIBUTE_UNUSED)
{
- pciReportError(VIR_ERR_INTERNAL_ERROR, _("pciGetVirtualFunctions is not "
- "supported on non-linux platforms"));
+ pciReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
int
pciDeviceIsVirtualFunction(const char *vf_sysfs_device_link ATTRIBUTE_UNUSED)
{
- pciReportError(VIR_ERR_INTERNAL_ERROR, _("pciDeviceIsVirtualFunction is "
- "not supported on non-linux platforms"));
+ pciReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
const char *vf_sysfs_device_link ATTRIBUTE_UNUSED,
int *vf_index ATTRIBUTE_UNUSED)
{
- pciReportError(VIR_ERR_INTERNAL_ERROR, _("pciGetVirtualFunctionIndex is "
- "not supported on non-linux platforms"));
+ pciReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
pciConfigAddressToSysfsFile(struct pci_config_address *dev ATTRIBUTE_UNUSED,
char **pci_sysfs_device_link ATTRIBUTE_UNUSED)
{
- pciReportError(VIR_ERR_INTERNAL_ERROR, _("pciConfigAddressToSysfsFile is not "
- "supported on non-linux platforms"));
+ pciReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
pciDeviceNetName(char *device_link_sysfs_path ATTRIBUTE_UNUSED,
char **netname ATTRIBUTE_UNUSED)
{
- pciReportError(VIR_ERR_INTERNAL_ERROR, _("pciDeviceNetName is not "
- "supported on non-linux platforms"));
+ pciReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
char **pfname ATTRIBUTE_UNUSED,
int *vf_index ATTRIBUTE_UNUSED)
{
- pciReportError(VIR_ERR_INTERNAL_ERROR, _("pciDeviceGetVirtualFunctionInfo "
- "is not supported on non-linux platforms"));
+ pciReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -1;
}
#endif /* __linux__ */