X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Fportals.c;h=1c54f3c1e432703efd95be3108fd66cbff082721;hb=14db26a85c52561d186b5c400981a0025d45864a;hp=43495772f2ca79876070fb9ff30dc64a8f6dd58d;hpb=47520731dd9c4abc44c624515e1975b49a2c37a9;p=fs%2Flustre-release.git diff --git a/lustre/utils/portals.c b/lustre/utils/portals.c index 4349577..1c54f3c 100644 --- a/lustre/utils/portals.c +++ b/lustre/utils/portals.c @@ -292,7 +292,7 @@ int ptl_initialize(int argc, char **argv) int jt_ptl_network(int argc, char **argv) { struct libcfs_ioctl_data data; - __u32 net = LNET_NIDNET(LNET_NID_ANY); + __u32 net = LNET_NET_ANY; int rc; if (argc != 2) { @@ -335,7 +335,7 @@ int jt_ptl_network(int argc, char **argv) } net = libcfs_str2net(argv[1]); - if (net == LNET_NIDNET(LNET_NID_ANY)) { + if (net == LNET_NET_ANY) { fprintf(stderr, "Can't parse net %s\n", argv[1]); return -1; } @@ -1128,7 +1128,7 @@ jt_ptl_del_route(int argc, char **argv) } LIBCFS_IOC_INIT_V2(data, cfg_hdr); - data.cfg_net = g_net_set ? g_net : LNET_NIDNET(LNET_NID_ANY); + data.cfg_net = g_net_set ? g_net : LNET_NET_ANY; data.cfg_nid = nid; rc = l_ioctl(LNET_DEV_ID, IOC_LIBCFS_DEL_ROUTE, &data); @@ -1247,7 +1247,7 @@ fault_attr_nid_parse(char *str, lnet_nid_t *nid_p) /* NB: can't support range ipaddress except * and *@net */ if (strlen(str) > 2 && str[0] == '*' && str[1] == '@') { net = libcfs_str2net(str + 2); - if (net == LNET_NIDNET(LNET_NID_ANY)) + if (net == LNET_NET_ANY) goto failed; nid = LNET_MKNID(net, LNET_NIDADDR(LNET_NID_ANY)); @@ -1384,7 +1384,7 @@ fault_simul_rule_add(__u32 opc, char *name, int argc, char **argv) optstr = opc == LNET_CTL_DROP_ADD ? "s:d:o:r:i:p:m:e:nx" : "s:d:o:r:l:p:m:"; memset(&attr, 0, sizeof(attr)); while (1) { - char c = getopt_long(argc, argv, optstr, opts, NULL); + int c = getopt_long(argc, argv, optstr, opts, NULL); if (c == -1) break; @@ -1566,7 +1566,7 @@ fault_simul_rule_del(__u32 opc, char *name, int argc, char **argv) memset(&attr, 0, sizeof(attr)); while (1) { - char c = getopt_long(argc, argv, "s:d:a", opts, NULL); + int c = getopt_long(argc, argv, "s:d:a", opts, NULL); if (c == -1 || all) break;