patch-1.3.7 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

diff -u --recursive --new-file v1.3.6/linux/fs/smbfs/ioctl.c linux/fs/smbfs/ioctl.c
@@ -0,0 +1,59 @@
+/*
+ *  ioctl.c
+ *
+ *  Copyright (C) 1995 by Volker Lendecke
+ *
+ */
+#include <linux/config.h>
+#ifdef MODULE
+#include <linux/module.h>
+#include <linux/version.h>
+#else
+#define MOD_INC_USE_COUNT
+#define MOD_DEC_USE_COUNT
+#endif
+
+#include <asm/segment.h>
+#include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/smb_fs.h>
+#include <linux/ioctl.h>
+#include <linux/sched.h>
+#include <linux/mm.h>
+
+int
+smb_ioctl (struct inode * inode, struct file * filp,
+           unsigned int cmd, unsigned long arg)
+{
+	int result;
+
+	switch (cmd) {
+        case SMB_IOC_GETMOUNTUID:
+                if ((result = verify_area(VERIFY_WRITE, (uid_t*) arg,
+                                          sizeof(uid_t))) != 0) {
+                        return result;
+                }
+                put_fs_word(SMB_SERVER(inode)->m.mounted_uid, (uid_t*) arg);
+                return 0;
+        default:
+		return -EINVAL;
+	}
+}
+
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only.  This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-indent-level: 8
+ * c-brace-imaginary-offset: 0
+ * c-brace-offset: -8
+ * c-argdecl-indent: 8
+ * c-label-offset: -8
+ * c-continued-statement-offset: 8
+ * c-continued-brace-offset: 0
+ * End:
+ */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this