From f9bbe9da79dbc8557c74efeb158b431cd67ace52 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 3 Mar 1998 01:22:27 +0000 Subject: Upgrade to 2.1.73. --- fs/smbfs/ioctl.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'fs/smbfs/ioctl.c') diff --git a/fs/smbfs/ioctl.c b/fs/smbfs/ioctl.c index 5eb3dc88f..f9e6fd4c2 100644 --- a/fs/smbfs/ioctl.c +++ b/fs/smbfs/ioctl.c @@ -11,6 +11,7 @@ #include #include #include + #include #include @@ -20,29 +21,33 @@ int smb_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { + struct smb_sb_info *server = SMB_SERVER(inode); int result = -EINVAL; switch (cmd) { case SMB_IOC_GETMOUNTUID: - result = put_user(SMB_SERVER(inode)->mnt->mounted_uid, - (uid_t *) arg); + result = put_user(server->mnt->mounted_uid, (uid_t *) arg); break; case SMB_IOC_NEWCONN: { struct smb_conn_opt opt; - if (arg == 0) + if (arg) { - /* The process offers a new connection upon SIGUSR1 */ - result = smb_offerconn(SMB_SERVER(inode)); + result = -EFAULT; + if (!copy_from_user(&opt, (void *)arg, sizeof(opt))) + result = smb_newconn(server, &opt); } else { - result = -EFAULT; - if (!copy_from_user(&opt, (void *)arg, sizeof(opt))) - result = smb_newconn(SMB_SERVER(inode), &opt); +#if 0 + /* obsolete option ... print a warning */ + printk("SMBFS: ioctl deprecated, please upgrade " + "smbfs package\n"); +#endif + result = 0; } break; } -- cgit v1.2.3