Whamcloud - gitweb
LU-2456 lnet: Dynamic LNet Configuration (DLC) IOCTL changes
[fs/lustre-release.git] / lnet / selftest / console.c
index 882d68b..73031a5 100644 (file)
@@ -732,7 +732,7 @@ lstcon_group_refresh(char *name, struct list_head *result_up)
 }
 
 int
-lstcon_group_list(int index, int len, char *name_up)
+lstcon_group_list(int index, int len, char __user *name_up)
 {
        lstcon_group_t *grp;
 
@@ -919,7 +919,7 @@ lstcon_batch_add(char *name)
 }
 
 int
-lstcon_batch_list(int index, int len, char *name_up)
+lstcon_batch_list(int index, int len, char __user *name_up)
 {
        lstcon_batch_t *bat;
 
@@ -1766,7 +1766,7 @@ lstcon_session_new(char *name, int key, unsigned feats,
 
        if (strlen(name) > sizeof(console_session.ses_name)-1)
                return -E2BIG;
-       strncpy(console_session.ses_name, name,
+       strlcpy(console_session.ses_name, name,
                sizeof(console_session.ses_name));
 
         rc = lstcon_batch_add(LST_DEFAULT_BATCH);
@@ -1990,7 +1990,8 @@ lstcon_acceptor_handle (srpc_server_rpc_t *rpc)
         if (grp->grp_userland == 0)
                 grp->grp_userland = 1;
 
-        strcpy(jrep->join_session, console_session.ses_name);
+       strlcpy(jrep->join_session, console_session.ses_name,
+               sizeof(jrep->join_session));
         jrep->join_timeout = console_session.ses_timeout;
         jrep->join_status  = 0;
 
@@ -2014,7 +2015,7 @@ void lstcon_init_acceptor_service(void)
        lstcon_acceptor_service.sv_wi_total = SFW_FRWK_WI_MAX;
 }
 
-extern int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_data *data);
+int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_hdr *hdr);
 
 DECLARE_IOCTL_HANDLER(lstcon_ioctl_handler, lstcon_ioctl_entry);