static char *
libcfs_next_nidstring (void)
{
- char *str;
- unsigned long flags;
+ char *str;
+ unsigned long flags;
- NIDSTR_LOCK(flags);
+ NIDSTR_LOCK(flags);
- str = libcfs_nidstrings[libcfs_nidstring_idx++];
- if (libcfs_nidstring_idx ==
- sizeof(libcfs_nidstrings)/sizeof(libcfs_nidstrings[0]))
- libcfs_nidstring_idx = 0;
+ str = libcfs_nidstrings[libcfs_nidstring_idx++];
+ if (libcfs_nidstring_idx ==
+ sizeof(libcfs_nidstrings)/sizeof(libcfs_nidstrings[0]))
+ libcfs_nidstring_idx = 0;
NIDSTR_UNLOCK(flags);
- return str;
+ return str;
}
#if !CRAY_PORTALS
int nal = PTL_NETNAL(net);
int num = PTL_NETNUM(net);
struct nalstrfns *nf = libcfs_nal2nalstrfns(nal);
- char *str = libcfs_next_nidstring();
+ char *str = libcfs_next_nidstring();
if (nf == NULL)
snprintf(str, PTL_NIDSTR_SIZE, "<%u:%u>", nal, num);
int nal = PTL_NETNAL(net);
int nnum = PTL_NETNUM(net);
struct nalstrfns *nf;
- char *str;
+ char *str;
int nob;
if (nid == LNET_NID_ANY)
return "LNET_NID_ANY";
nf = libcfs_nal2nalstrfns(PTL_NETNAL(net));
- str = libcfs_next_nidstring();
+ str = libcfs_next_nidstring();
if (nf == NULL)
snprintf(str, PTL_NIDSTR_SIZE, "%x@<%u:%u>", addr, nal, nnum);
{
char *str = libcfs_next_nidstring();
- snprintf(str, PTL_NIDSTR_SIZE, "%llx", (unsigned long long)nid);
+ snprintf(str, PTL_NIDSTR_SIZE, "%llx", (unsigned long long)nid);
}
__u32
EXPORT_SYMBOL(libcfs_id2str);
EXPORT_SYMBOL(libcfs_str2anynid);
EXPORT_SYMBOL(libcfs_setnet0alias);
+#else /* __KERNEL__ */
+void
+libcfs_setnet0alias(int nal)
+{
+ LCONSOLE_ERROR("Liblustre cannot interoperate with old Portals.\n"
+ "portals_compatibility must be set to 'none'.\n");
+}
#endif