@@ -92,7 +92,7 @@ failsafe_hotplug_alarm_cancel(struct rte_eth_dev *dev)
rte_eal_alarm_cancel(fs_hotplug_alarm, dev);
if (rte_errno) {
ERROR("rte_eal_alarm_cancel failed (errno: %s)",
- strerror(rte_errno));
+ rte_strerror(rte_errno));
ret = -rte_errno;
} else {
PRIV(dev)->pending_alarm = 0;
@@ -138,18 +138,18 @@ fs_mutex_init(struct fs_priv *priv)
ret = pthread_mutexattr_init(&attr);
if (ret) {
- ERROR("Cannot initiate mutex attributes - %s", strerror(ret));
+ ERROR("Cannot initiate mutex attributes - %s", rte_strerror(ret));
return ret;
}
/* Allow mutex relocks for the thread holding the mutex. */
ret = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
if (ret) {
- ERROR("Cannot set mutex type - %s", strerror(ret));
+ ERROR("Cannot set mutex type - %s", rte_strerror(ret));
return ret;
}
ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
if (ret) {
- ERROR("Cannot initiate mutex - %s", strerror(ret));
+ ERROR("Cannot initiate mutex - %s", rte_strerror(ret));
return ret;
}
return 0;
@@ -112,7 +112,7 @@ fs_execute_cmd(struct sub_device *sdev, char *cmdline)
fp = popen(sdev->cmdline, "r");
if (fp == NULL) {
ret = -errno;
- ERROR("popen: %s", strerror(errno));
+ ERROR("popen: %s", rte_strerror(errno));
return ret;
}
/* We only read one line */
@@ -131,7 +131,7 @@ fs_execute_cmd(struct sub_device *sdev, char *cmdline)
ERROR("Parsing device '%s' failed", output);
ret_pclose:
if (pclose(fp) == -1)
- ERROR("pclose: %s", strerror(errno));
+ ERROR("pclose: %s", rte_strerror(errno));
return ret;
}
@@ -52,7 +52,7 @@ fs_bus_init(struct rte_eth_dev *dev)
if (ret < 0) {
ERROR("sub_device %d probe failed %s%s%s", i,
rte_errno ? "(" : "",
- rte_errno ? strerror(rte_errno) : "",
+ rte_errno ? rte_strerror(rte_errno) : "",
rte_errno ? ")" : "");
continue;
}
@@ -100,7 +100,7 @@ fs_bus_init(struct rte_eth_dev *dev)
ret = rte_eth_dev_owner_set(pid, &PRIV(dev)->my_owner);
if (ret < 0) {
INFO("sub_device %d owner set failed (%s), "
- "will try again later", i, strerror(-ret));
+ "will try again later", i, rte_strerror(-ret));
continue;
} else if (strncmp(rte_eth_devices[pid].device->name,
da->name, strlen(da->name)) != 0) {
@@ -33,7 +33,7 @@ fs_flow_allocate(const struct rte_flow_attr *attr,
if (ret < 0) {
ERROR("Unable to process flow rule (%s): %s",
error.message ? error.message : "unspecified",
- strerror(rte_errno));
+ rte_strerror(rte_errno));
return NULL;
}
flow = rte_zmalloc(NULL, offsetof(struct rte_flow, rule) + ret,
@@ -47,7 +47,7 @@ fs_flow_allocate(const struct rte_flow_attr *attr,
if (ret < 0) {
ERROR("Failed to copy flow rule (%s): %s",
error.message ? error.message : "unspecified",
- strerror(rte_errno));
+ rte_strerror(rte_errno));
rte_free(flow);
return NULL;
}
@@ -452,7 +452,7 @@ fs_rx_queue_setup(struct rte_eth_dev *dev,
#ifdef RTE_EXEC_ENV_LINUX
rxq->event_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
if (rxq->event_fd < 0) {
- ERROR("Failed to create an eventfd: %s", strerror(errno));
+ ERROR("Failed to create an eventfd: %s", rte_strerror(errno));
fs_unlock(dev, 0);
return -errno;
}
@@ -407,14 +407,14 @@ fs_lock(struct rte_eth_dev *dev, unsigned int is_alarm)
ret = pthread_mutex_trylock(&PRIV(dev)->hotplug_mutex);
if (ret) {
DEBUG("Hot-plug mutex lock trying failed(%s), will try"
- " again later...", strerror(ret));
+ " again later...", rte_strerror(ret));
return ret;
}
PRIV(dev)->alarm_lock = 1;
} else {
ret = pthread_mutex_lock(&PRIV(dev)->hotplug_mutex);
if (ret) {
- ERROR("Cannot lock mutex(%s)", strerror(ret));
+ ERROR("Cannot lock mutex(%s)", rte_strerror(ret));
return ret;
}
}
@@ -436,7 +436,7 @@ fs_unlock(struct rte_eth_dev *dev, unsigned int is_alarm)
}
ret = pthread_mutex_unlock(&PRIV(dev)->hotplug_mutex);
if (ret)
- ERROR("Cannot unlock hot-plug mutex(%s)", strerror(ret));
+ ERROR("Cannot unlock hot-plug mutex(%s)", rte_strerror(ret));
}
/*