* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2014, Intel Corporation.
+ * Copyright (c) 2014, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*/
#ifndef _GNU_SOURCE
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
-#include <lnet/nidstr.h>
#ifdef _NEW_BUILD_
# include "lgss_utils.h"
#else
const char * lustre_svc_name[] =
{
- [LUSTRE_GSS_SVC_MGS] = "MGS",
- [LUSTRE_GSS_SVC_MDS] = "MDS",
- [LUSTRE_GSS_SVC_OSS] = "OSS",
+ [LUSTRE_GSS_SVC_MGS] = "MGS",
+ [LUSTRE_GSS_SVC_MDS] = "MDS",
+ [LUSTRE_GSS_SVC_OSS] = "OSS",
};
/****************************************
head = fgets(buf, bufsize, fghn);
if (head == NULL) {
printerr(0, "can't read from %s\n", gethostname_ex);
+ pclose(fghn);
return -1;
}
if (pclose(fghn) == -1)
head++;
tail = head + strlen(head);
- if (tail <= head) {
+ if (tail <= head) {
printerr(0, "no output from %s\n", gethostname_ex);
return -1;
}
};
static struct convert_struct converter[] = {
- [0] = { "UNUSED0", NULL},
- [QSWLND] = { "QSWLND", external_nid2hostname},
- [SOCKLND] = { "SOCKLND", ipv4_nid2hostname },
- [GMLND] = { "GMLND", external_nid2hostname},
- [PTLLND] = { "PTLLND", external_nid2hostname },
- [O2IBLND] = { "O2IBLND", ipv4_nid2hostname },
- [LOLND] = { "LOLND", lolnd_nid2hostname },
- [RALND] = { "RALND", external_nid2hostname },
- [MXLND] = { "MXLND", external_nid2hostname },
+ [0] = { .name = "UNUSED0" },
+ [SOCKLND] = { .name = "SOCKLND", .nid2name = ipv4_nid2hostname },
+ [O2IBLND] = { .name = "O2IBLND", .nid2name = ipv4_nid2hostname },
+ [LOLND] = { .name = "LOLND", .nid2name = lolnd_nid2hostname },
+ [PTL4LND] = { .name = "PTL4LND", .nid2name = external_nid2hostname }
};
#define LND_MAX (sizeof(converter) / sizeof(converter[0]))
struct user_map_item *items;
};
-static struct user_mapping mapping = {0, NULL};
+static struct user_mapping mapping;
/* FIXME to be finished: monitor change of mapping database */
static int mapping_mtime = 0;