fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / linux / ncp_fs.h
index 9e2f192..0ea7f89 100644 (file)
@@ -11,9 +11,8 @@
 #include <linux/fs.h>
 #include <linux/in.h>
 #include <linux/types.h>
+#include <linux/magic.h>
 
-#include <linux/ncp_fs_i.h>
-#include <linux/ncp_fs_sb.h>
 #include <linux/ipx.h>
 #include <linux/ncp_no.h>
 
@@ -24,7 +23,7 @@
 struct ncp_ioctl_request {
        unsigned int function;
        unsigned int size;
-       char *data;
+       char __user *data;
 };
 
 struct ncp_fs_info {
@@ -36,7 +35,7 @@ struct ncp_fs_info {
                                   used for read/write requests! */
 
        int volume_number;
-       __u32 directory_id;
+       __le32 directory_id;
 };
 
 struct ncp_fs_info_v2 {
@@ -46,7 +45,7 @@ struct ncp_fs_info_v2 {
        unsigned int buffer_size;
 
        unsigned int volume_number;
-       __u32 directory_id;
+       __le32 directory_id;
 
        __u32 dummy1;
        __u32 dummy2;
@@ -78,7 +77,7 @@ struct ncp_setroot_ioctl
 {
        int             volNumber;
        int             namespace;
-       __u32           dirEntNum;
+       __le32          dirEntNum;
 };
 
 struct ncp_objectname_ioctl
@@ -88,13 +87,13 @@ struct ncp_objectname_ioctl
 #define NCP_AUTH_NDS   0x32
        int             auth_type;
        size_t          object_name_len;
-       void*           object_name;    /* an userspace data, in most cases user name */
+       void __user *   object_name;    /* an userspace data, in most cases user name */
 };
 
 struct ncp_privatedata_ioctl
 {
        size_t          len;
-       void*           data;           /* ~1000 for NDS */
+       void __user *   data;           /* ~1000 for NDS */
 };
 
 /* NLS charsets by ioctl */
@@ -146,7 +145,8 @@ struct ncp_nls_ioctl
 
 #ifdef __KERNEL__
 
-#include <linux/config.h>
+#include <linux/ncp_fs_i.h>
+#include <linux/ncp_fs_sb.h>
 
 /* undef because public define in umsdos_fs.h (ncp_fs.h isn't public) */
 #undef PRINTK
@@ -186,10 +186,6 @@ struct ncp_entry_info {
        __u8                    file_handle[6];
 };
 
-/* Guess, what 0x564c is :-) */
-#define NCP_SUPER_MAGIC  0x564c
-
-
 static inline struct ncp_server *NCP_SBP(struct super_block *sb)
 {
        return sb->s_fs_info;
@@ -201,34 +197,6 @@ static inline struct ncp_inode_info *NCP_FINFO(struct inode *inode)
        return container_of(inode, struct ncp_inode_info, vfs_inode);
 }
 
-#ifdef DEBUG_NCP_MALLOC
-
-#include <linux/slab.h>
-
-extern int ncp_malloced;
-extern int ncp_current_malloced;
-
-static inline void *
- ncp_kmalloc(unsigned int size, int priority)
-{
-       ncp_malloced += 1;
-       ncp_current_malloced += 1;
-       return kmalloc(size, priority);
-}
-
-static inline void ncp_kfree_s(void *obj, int size)
-{
-       ncp_current_malloced -= 1;
-       kfree(obj);
-}
-
-#else                          /* DEBUG_NCP_MALLOC */
-
-#define ncp_kmalloc(s,p) kmalloc(s,p)
-#define ncp_kfree_s(o,s) kfree(o)
-
-#endif                         /* DEBUG_NCP_MALLOC */
-
 /* linux/fs/ncpfs/inode.c */
 int ncp_notify_change(struct dentry *, struct iattr *);
 struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *);
@@ -237,13 +205,14 @@ void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
 
 /* linux/fs/ncpfs/dir.c */
 extern struct inode_operations ncp_dir_inode_operations;
-extern struct file_operations ncp_dir_operations;
+extern const struct file_operations ncp_dir_operations;
 int ncp_conn_logged_in(struct super_block *);
-int ncp_date_dos2unix(__u16 time, __u16 date);
-void ncp_date_unix2dos(int unix_date, __u16 * time, __u16 * date);
+int ncp_date_dos2unix(__le16 time, __le16 date);
+void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
 
 /* linux/fs/ncpfs/ioctl.c */
 int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
+long ncp_compat_ioctl(struct file *, unsigned int, unsigned long);
 
 /* linux/fs/ncpfs/sock.c */
 int ncp_request2(struct ncp_server *server, int function,
@@ -258,7 +227,7 @@ void ncp_unlock_server(struct ncp_server *server);
 
 /* linux/fs/ncpfs/file.c */
 extern struct inode_operations ncp_file_inode_operations;
-extern struct file_operations ncp_file_operations;
+extern const struct file_operations ncp_file_operations;
 int ncp_make_open(struct inode *, int);
 
 /* linux/fs/ncpfs/mmap.c */