patch-2.1.14 linux/fs/smbfs/ioctl.c
Next file: linux/fs/smbfs/mmap.c
Previous file: linux/fs/smbfs/inode.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Sun Dec 1 19:02:04 1996
- Orig file:
v2.1.13/linux/fs/smbfs/ioctl.c
- Orig date:
Tue Oct 29 19:58:44 1996
diff -u --recursive --new-file v2.1.13/linux/fs/smbfs/ioctl.c linux/fs/smbfs/ioctl.c
@@ -1,11 +1,10 @@
/*
* ioctl.c
*
- * Copyright (C) 1995 by Volker Lendecke
+ * Copyright (C) 1995, 1996 by Volker Lendecke
*
*/
-#include <asm/uaccess.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/smb_fs.h>
@@ -13,21 +12,18 @@
#include <linux/sched.h>
#include <linux/mm.h>
+#include <asm/uaccess.h>
+
int
-smb_ioctl (struct inode * inode, struct file * filp,
- unsigned int cmd, unsigned long arg)
+smb_ioctl(struct inode *inode, struct file *filp,
+ unsigned int cmd, unsigned long arg)
{
- int result;
+ switch (cmd)
+ {
+ case SMB_IOC_GETMOUNTUID:
+ return put_user(SMB_SERVER(inode)->m.mounted_uid, (uid_t *) arg);
- switch (cmd) {
- case SMB_IOC_GETMOUNTUID:
- if ((result = verify_area(VERIFY_WRITE, (uid_t*) arg,
- sizeof(uid_t))) != 0) {
- return result;
- }
- put_user(SMB_SERVER(inode)->m.mounted_uid, (uid_t*) arg);
- return 0;
- default:
+ default:
return -EINVAL;
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov