Whamcloud - gitweb
* Landed portals:b_port_step as follows...
[fs/lustre-release.git] / lnet / libcfs / linux / linux-fs.c
1 # define DEBUG_SUBSYSTEM S_PORTALS
2
3 #include <linux/fs.h>
4 #include <linux/ctype.h>
5 #include <asm/uaccess.h>
6
7 #include <libcfs/libcfs.h>
8
9 cfs_file_t *
10 cfs_filp_open (const char *name, int flags, int mode, int *err)
11 {
12         /* XXX
13          * Maybe we need to handle flags and mode in the future
14          */
15         cfs_file_t      *filp = NULL;
16
17         filp = filp_open(name, flags, mode); 
18         if (IS_ERR(filp)) { 
19                 int rc;
20
21                 rc = PTR_ERR(filp); 
22                 printk(KERN_ERR "LustreError: can't open %s file: err %d\n", 
23                                 name, rc);
24                 if (err)
25                         *err = rc;
26                 filp = NULL;
27         }
28         return filp;
29 }
30
31 EXPORT_SYMBOL(cfs_filp_open);