4 * Copyright (C) 1995, 1996 by Volker Lendecke
5 * Copyright (C) 1997 by Volker Lendecke
9 #include <linux/errno.h>
11 #include <linux/ioctl.h>
12 #include <linux/sched.h>
14 #include <linux/highuid.h>
16 #include <linux/smb_fs.h>
17 #include <linux/smb_mount.h>
19 #include <asm/uaccess.h>
22 smb_ioctl(struct inode
*inode
, struct file
*filp
,
23 unsigned int cmd
, unsigned long arg
)
25 struct smb_sb_info
*server
= SMB_SERVER(inode
);
30 case SMB_IOC_GETMOUNTUID
:
31 result
= put_user(NEW_TO_OLD_UID(server
->mnt
->mounted_uid
), (uid16_t
*) arg
);
33 case SMB_IOC_GETMOUNTUID32
:
34 result
= put_user(server
->mnt
->mounted_uid
, (uid_t
*) arg
);
39 struct smb_conn_opt opt
;
44 if (!copy_from_user(&opt
, (void *)arg
, sizeof(opt
)))
45 result
= smb_newconn(server
, &opt
);
50 /* obsolete option ... print a warning */
51 printk("SMBFS: ioctl deprecated, please upgrade "