memset(dashes, '-', sizeof(dashes));
dashes[sizeof(dashes)-1] = 0;
- LCONSOLE_ERROR(0x10f, "Error parsing '%s=\"%s\"'\n", name, str);
- LCONSOLE_ERROR(0x110, "here...........%.*s..%.*s|%.*s|\n",
- (int)strlen(name), dots, offset, dots,
- (width < 1) ? 0 : width - 1, dashes);
+ LCONSOLE_ERROR_MSG(0x10f, "Error parsing '%s=\"%s\"'\n", name, str);
+ LCONSOLE_ERROR_MSG(0x110, "here...........%.*s..%.*s|%.*s|\n",
+ (int)strlen(name), dots, offset, dots,
+ (width < 1) ? 0 : width - 1, dashes);
}
int
lnet_ni_t *ni;
if (!lnet_net_unique(net, nilist)) {
- LCONSOLE_ERROR(0x111, "Duplicate network specified: %s\n",
- libcfs_net2str(net));
+ LCONSOLE_ERROR_MSG(0x111, "Duplicate network specified: %s\n",
+ libcfs_net2str(net));
return NULL;
}
if (strlen(networks) > LNET_SINGLE_TEXTBUF_NOB) {
/* _WAY_ conservative */
- LCONSOLE_ERROR(0x112, "Can't parse networks: string too long\n");
+ LCONSOLE_ERROR_MSG(0x112, "Can't parse networks: string too "
+ "long\n");
return -EINVAL;
}
if (net == LNET_NIDNET(LNET_NID_ANY)) {
lnet_syntax("networks", networks,
str - tokens, strlen(str));
- LCONSOLE_ERROR(0x113, "Unrecognised network type\n");
+ LCONSOLE_ERROR_MSG(0x113, "Unrecognised network"
+ " type\n");
goto failed;
}
if (nnets > 0 &&
the_lnet.ln_ptlcompat > 0) {
- LCONSOLE_ERROR(0x114, "Only 1 network supported when "
- "'portals_compatible' is set\n");
+ LCONSOLE_ERROR_MSG(0x114, "Only 1 network supported when"
+ " 'portals_compatible' is set\n");
goto failed;
}
}
if (niface == LNET_MAX_INTERFACES) {
- LCONSOLE_ERROR(0x115, "Too many interfaces for net %s\n",
- libcfs_net2str(net));
+ LCONSOLE_ERROR_MSG(0x115, "Too many interfaces "
+ "for net %s\n",
+ libcfs_net2str(net));
goto failed;
}
if (the_lnet.ln_ptlcompat > 0 &&
routes[0] != 0) {
/* Can't route when running in compatibility mode */
- LCONSOLE_ERROR(0x116, "Route tables are not supported when "
- "'portals_compatible' is set\n");
+ LCONSOLE_ERROR_MSG(0x116, "Route tables are not supported when "
+ "'portals_compatible' is set\n");
return -EINVAL;
}
int rc;
if (nip < 0) {
- LCONSOLE_ERROR(0x117, "Error %d enumerating local IP interfaces "
- "for ip2nets to match\n", nip);
+ LCONSOLE_ERROR_MSG(0x117, "Error %d enumerating local IP "
+ "interfaces for ip2nets to match\n", nip);
return nip;
}
if (nip == 0) {
- LCONSOLE_ERROR(0x118, "No local IP interfaces "
- "for ip2nets to match\n");
+ LCONSOLE_ERROR_MSG(0x118, "No local IP interfaces "
+ "for ip2nets to match\n");
return -ENOENT;
}
lnet_ipaddr_free_enumeration(ipaddrs, nip);
if (rc < 0) {
- LCONSOLE_ERROR(0x119, "Error %d parsing ip2nets\n", rc);
+ LCONSOLE_ERROR_MSG(0x119, "Error %d parsing ip2nets\n", rc);
return rc;
}
if (rc == 0) {
- LCONSOLE_ERROR(0x11a, "ip2nets does not match "
- "any local IP interfaces\n");
+ LCONSOLE_ERROR_MSG(0x11a, "ip2nets does not match "
+ "any local IP interfaces\n");
return -ENOENT;
}