* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
struct lnet_ni *ni;
__u32 net;
int nnets = 0;
+ struct list_head *temp_node;
if (networks == NULL) {
CERROR("networks string is undefined\n");
memcpy(tokens, networks, tokensize);
str = tmp = tokens;
- /* Add in the loopback network */
- ni = lnet_ni_alloc(LNET_MKNET(LOLND, 0), NULL, nilist);
- if (ni == NULL)
- goto failed;
-
while (str != NULL && *str != 0) {
char *comma = strchr(str, ',');
char *bracket = strchr(str, '(');
goto failed_syntax;
}
- nnets++;
ni = lnet_ni_alloc(net, el, nilist);
if (ni == NULL)
goto failed;
}
}
- LASSERT(!list_empty(nilist));
+ list_for_each(temp_node, nilist)
+ nnets++;
LIBCFS_FREE(tokens, tokensize);
return nnets;