Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Land b_smallfix onto HEAD (20040423_1603)
[fs/lustre-release.git]
/
lustre
/
liblustre
/
llite_lib.c
diff --git
a/lustre/liblustre/llite_lib.c
b/lustre/liblustre/llite_lib.c
index
0b549c0
..
bd000bb
100644
(file)
--- a/
lustre/liblustre/llite_lib.c
+++ b/
lustre/liblustre/llite_lib.c
@@
-81,23
+81,26
@@
char *portals_nid2str(int nal, ptl_nid_t nid, char *str)
case TCPNAL:
/* userspace NAL */
case SOCKNAL:
case TCPNAL:
/* userspace NAL */
case SOCKNAL:
- s
printf(str, "%u:%d.%d.%d.%d", (__u32)(nid >> 32)
,
- HIPQUAD(nid));
+ s
nprintf(str, PTL_NALFMT_SIZE - 1, "%u:%u.%u.%u.%u"
,
+
(__u32)(nid >> 32),
HIPQUAD(nid));
break;
case QSWNAL:
case GMNAL:
case IBNAL:
case SCIMACNAL:
break;
case QSWNAL:
case GMNAL:
case IBNAL:
case SCIMACNAL:
- sprintf(str, "%u:%u", (__u32)(nid >> 32), (__u32)nid);
+ snprintf(str, PTL_NALFMT_SIZE - 1, "%u:%u",
+ (__u32)(nid >> 32), (__u32)nid);
break;
default:
break;
default:
- return NULL;
+ snprintf(str, PTL_NALFMT_SIZE - 1, "?%d? %llx",
+ nal, (long long)nid);
+ break;
}
return str;
}
void init_current(char *comm)
}
return str;
}
void init_current(char *comm)
-{
+{
current = malloc(sizeof(*current));
current->fs = malloc(sizeof(*current->fs));
current->fs->umask = umask(0777);
current = malloc(sizeof(*current));
current->fs = malloc(sizeof(*current->fs));
current->fs->umask = umask(0777);
@@
-145,7
+148,7
@@
libcfs_nal_cmd(struct portals_cfg *pcfg)
extern int class_handle_ioctl(unsigned int cmd, unsigned long arg);
extern int class_handle_ioctl(unsigned int cmd, unsigned long arg);
-int lib_ioctl_nalcmd(int dev_id, int opc, void * ptr)
+int lib_ioctl_nalcmd(int dev_id,
unsigned
int opc, void * ptr)
{
struct portal_ioctl_data *ptldata;
{
struct portal_ioctl_data *ptldata;
@@
-165,7
+168,7
@@
int lib_ioctl_nalcmd(int dev_id, int opc, void * ptr)
return (0);
}
return (0);
}
-int lib_ioctl(int dev_id, int opc, void * ptr)
+int lib_ioctl(int dev_id,
unsigned
int opc, void * ptr)
{
int rc;
{
int rc;