Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
[linux-2.6.git] / fs / ncpfs / ncp_fs.h
blob31831afe1c3b26b954a279fb034b5e50649cc8cb
1 #include <linux/ncp_fs.h>
2 #include "ncp_fs_i.h"
3 #include "ncp_fs_sb.h"
5 /* define because it is easy to change PRINTK to {*}PRINTK */
6 #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args)
8 #undef NCPFS_PARANOIA
9 #ifdef NCPFS_PARANOIA
10 #define PPRINTK(format, args...) PRINTK(format , ## args)
11 #else
12 #define PPRINTK(format, args...)
13 #endif
15 #ifndef DEBUG_NCP
16 #define DEBUG_NCP 0
17 #endif
18 #if DEBUG_NCP > 0
19 #define DPRINTK(format, args...) PRINTK(format , ## args)
20 #else
21 #define DPRINTK(format, args...)
22 #endif
23 #if DEBUG_NCP > 1
24 #define DDPRINTK(format, args...) PRINTK(format , ## args)
25 #else
26 #define DDPRINTK(format, args...)
27 #endif
29 #define NCP_MAX_RPC_TIMEOUT (6*HZ)
32 struct ncp_entry_info {
33 struct nw_info_struct i;
34 ino_t ino;
35 int opened;
36 int access;
37 unsigned int volume;
38 __u8 file_handle[6];
41 static inline struct ncp_server *NCP_SBP(const struct super_block *sb)
43 return sb->s_fs_info;
46 #define NCP_SERVER(inode) NCP_SBP((inode)->i_sb)
47 static inline struct ncp_inode_info *NCP_FINFO(const struct inode *inode)
49 return container_of(inode, struct ncp_inode_info, vfs_inode);
52 /* linux/fs/ncpfs/inode.c */
53 int ncp_notify_change(struct dentry *, struct iattr *);
54 struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *);
55 void ncp_update_inode(struct inode *, struct ncp_entry_info *);
56 void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
58 /* linux/fs/ncpfs/dir.c */
59 extern const struct inode_operations ncp_dir_inode_operations;
60 extern const struct file_operations ncp_dir_operations;
61 extern const struct dentry_operations ncp_dentry_operations;
62 int ncp_conn_logged_in(struct super_block *);
63 int ncp_date_dos2unix(__le16 time, __le16 date);
64 void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
66 /* linux/fs/ncpfs/ioctl.c */
67 long ncp_ioctl(struct file *, unsigned int, unsigned long);
68 long ncp_compat_ioctl(struct file *, unsigned int, unsigned long);
70 /* linux/fs/ncpfs/sock.c */
71 int ncp_request2(struct ncp_server *server, int function,
72 void* reply, int max_reply_size);
73 static inline int ncp_request(struct ncp_server *server, int function) {
74 return ncp_request2(server, function, server->packet, server->packet_size);
76 int ncp_connect(struct ncp_server *server);
77 int ncp_disconnect(struct ncp_server *server);
78 void ncp_lock_server(struct ncp_server *server);
79 void ncp_unlock_server(struct ncp_server *server);
81 /* linux/fs/ncpfs/symlink.c */
82 #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
83 extern const struct address_space_operations ncp_symlink_aops;
84 int ncp_symlink(struct inode*, struct dentry*, const char*);
85 #endif
87 /* linux/fs/ncpfs/file.c */
88 extern const struct inode_operations ncp_file_inode_operations;
89 extern const struct file_operations ncp_file_operations;
90 int ncp_make_open(struct inode *, int);
92 /* linux/fs/ncpfs/mmap.c */
93 int ncp_mmap(struct file *, struct vm_area_struct *);
95 /* linux/fs/ncpfs/ncplib_kernel.c */
96 int ncp_make_closed(struct inode *);
98 #include "ncplib_kernel.h"