struct lnet_ioctl_lnet_stats data;
struct lnet_counters *cntrs;
int rc;
- int l_errno;
char err_str[LNET_MAX_STR_LEN] = "\"out of memory\"";
struct cYAML *root = NULL, *stats = NULL;
rc = l_ioctl(LNET_DEV_ID, IOC_LIBCFS_GET_LNET_STATS, &data);
if (rc) {
- l_errno = errno;
snprintf(err_str,
sizeof(err_str),
"\"cannot get lnet statistics: %s\"",
- strerror(l_errno));
- rc = -l_errno;
+ strerror(-rc));
goto out;
}