/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * Copyright (c) 2005 Cluster File Systems, Inc.
+ * GPL HEADER START
*
- * This file is part of Lustre, http://www.sf.net/projects/lustre/
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Lustre is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 only,
+ * as published by the Free Software Foundation.
*
- * Lustre is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License version 2 for more details (a copy is included
+ * in the LICENSE file that accompanied this code).
*
- * You should have received a copy of the GNU General Public License
- * along with Lustre; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * You should have received a copy of the GNU General Public License
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ * GPL HEADER END
+ */
+/*
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Use is subject to license terms.
+ */
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ * Lustre is a trademark of Sun Microsystems, Inc.
*/
#define DEBUG_SUBSYSTEM S_LNET
memset(dashes, '-', sizeof(dashes));
dashes[sizeof(dashes)-1] = 0;
- LCONSOLE_ERROR("Error parsing '%s=\"%s\"'\n", name, str);
- LCONSOLE_ERROR("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("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("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("Unrecognised network type\n");
+ LCONSOLE_ERROR_MSG(0x113, "Unrecognised network"
+ " type\n");
goto failed;
}
goto failed;
}
- if (nnets > 0 &&
- the_lnet.ln_ptlcompat > 0) {
- LCONSOLE_ERROR("Only 1 network supported when "
- "'portals_compatible' is set\n");
- goto failed;
- }
-
nnets++;
ni = lnet_new_ni(net, nilist);
if (ni == NULL)
}
if (niface == LNET_MAX_INTERFACES) {
- LCONSOLE_ERROR("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;
}
int i;
lnet_text_buf_t *ltb;
- INIT_LIST_HEAD(&pending);
+ CFS_INIT_LIST_HEAD(&pending);
/* Split 'str' into separate commands */
for (;;) {
int nob;
int scanned;
- INIT_LIST_HEAD(&pending);
+ CFS_INIT_LIST_HEAD(&pending);
sep = strchr(str, '[');
if (sep == NULL) /* nothing to expand */
*im_a_router = 0;
- if (the_lnet.ln_ptlcompat > 0 &&
- routes[0] != 0) {
- /* Can't route when running in compatibility mode */
- LCONSOLE_ERROR("Route tables are not supported when "
- "'portals_compatible' is set\n");
- return -EINVAL;
- }
-
CFS_INIT_LIST_HEAD(&tbs);
if (lnet_str2tbs_sep(&tbs, routes) < 0) {
int rc;
if (nip < 0) {
- LCONSOLE_ERROR("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("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("Error %d parsing ip2nets\n", rc);
+ LCONSOLE_ERROR_MSG(0x119, "Error %d parsing ip2nets\n", rc);
return rc;
}
if (rc == 0) {
- LCONSOLE_ERROR("ip2nets does not match "
- "any local IP interfaces\n");
+ LCONSOLE_ERROR_MSG(0x11a, "ip2nets does not match "
+ "any local IP interfaces\n");
return -ENOENT;
}