root/fs/smbfs/ioctl.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. smb_ioctl

   1 /*
   2  *  ioctl.c
   3  *
   4  *  Copyright (C) 1995 by Volker Lendecke
   5  *
   6  */
   7 #include <linux/module.h>
   8 
   9 #include <asm/segment.h>
  10 #include <linux/errno.h>
  11 #include <linux/fs.h>
  12 #include <linux/smb_fs.h>
  13 #include <linux/ioctl.h>
  14 #include <linux/sched.h>
  15 #include <linux/mm.h>
  16 
  17 int
  18 smb_ioctl (struct inode * inode, struct file * filp,
     /* [previous][next][first][last][top][bottom][index][help] */
  19            unsigned int cmd, unsigned long arg)
  20 {
  21         int result;
  22 
  23         switch (cmd) {
  24         case SMB_IOC_GETMOUNTUID:
  25                 if ((result = verify_area(VERIFY_WRITE, (uid_t*) arg,
  26                                           sizeof(uid_t))) != 0) {
  27                         return result;
  28                 }
  29                 put_fs_word(SMB_SERVER(inode)->m.mounted_uid, (uid_t*) arg);
  30                 return 0;
  31         default:
  32                 return -EINVAL;
  33         }
  34 }
  35 
  36 
  37 /*
  38  * Overrides for Emacs so that we follow Linus's tabbing style.
  39  * Emacs will notice this stuff at the end of the file and automatically
  40  * adjust the settings for this buffer only.  This must remain at the end
  41  * of the file.
  42  * ---------------------------------------------------------------------------
  43  * Local variables:
  44  * c-indent-level: 8
  45  * c-brace-imaginary-offset: 0
  46  * c-brace-offset: -8
  47  * c-argdecl-indent: 8
  48  * c-label-offset: -8
  49  * c-continued-statement-offset: 8
  50  * c-continued-brace-offset: 0
  51  * End:
  52  */

/* [previous][next][first][last][top][bottom][index][help] */