Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

move internal-only parts of ncpfs headers to fs/ncpfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 32c419d9 0378c405

+126 -150
+1 -3
fs/ncpfs/dir.c
··· 21 21 #include <asm/uaccess.h> 22 22 #include <asm/byteorder.h> 23 23 24 - #include <linux/ncp_fs.h> 25 - 26 - #include "ncplib_kernel.h" 24 + #include "ncp_fs.h" 27 25 28 26 static void ncp_read_volume_list(struct file *, void *, filldir_t, 29 27 struct ncp_cache_control *);
+1 -2
fs/ncpfs/file.c
··· 18 18 #include <linux/vmalloc.h> 19 19 #include <linux/sched.h> 20 20 21 - #include <linux/ncp_fs.h> 22 - #include "ncplib_kernel.h" 21 + #include "ncp_fs.h" 23 22 24 23 static int ncp_fsync(struct file *file, int datasync) 25 24 {
+1 -3
fs/ncpfs/inode.c
··· 31 31 #include <linux/seq_file.h> 32 32 #include <linux/namei.h> 33 33 34 - #include <linux/ncp_fs.h> 35 - 36 34 #include <net/sock.h> 37 35 38 - #include "ncplib_kernel.h" 36 + #include "ncp_fs.h" 39 37 #include "getopt.h" 40 38 41 39 #define NCP_DEFAULT_FILE_MODE 0600
+1 -3
fs/ncpfs/ioctl.c
··· 20 20 #include <linux/vmalloc.h> 21 21 #include <linux/sched.h> 22 22 23 - #include <linux/ncp_fs.h> 24 - 25 23 #include <asm/uaccess.h> 26 24 27 - #include "ncplib_kernel.h" 25 + #include "ncp_fs.h" 28 26 29 27 /* maximum limit for ncp_objectname_ioctl */ 30 28 #define NCP_OBJECT_NAME_MAX_LEN 4096
+2 -2
fs/ncpfs/mmap.c
··· 16 16 #include <linux/mman.h> 17 17 #include <linux/string.h> 18 18 #include <linux/fcntl.h> 19 - #include <linux/ncp_fs.h> 20 19 21 - #include "ncplib_kernel.h" 22 20 #include <asm/uaccess.h> 23 21 #include <asm/system.h> 22 + 23 + #include "ncp_fs.h" 24 24 25 25 /* 26 26 * Fill in the supplied page for mmap
+98
fs/ncpfs/ncp_fs.h
··· 1 + #include <linux/ncp_fs.h> 2 + #include "ncp_fs_i.h" 3 + #include "ncp_fs_sb.h" 4 + 5 + /* define because it is easy to change PRINTK to {*}PRINTK */ 6 + #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) 7 + 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 14 + 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 28 + 29 + #define NCP_MAX_RPC_TIMEOUT (6*HZ) 30 + 31 + 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]; 39 + }; 40 + 41 + static inline struct ncp_server *NCP_SBP(const struct super_block *sb) 42 + { 43 + return sb->s_fs_info; 44 + } 45 + 46 + #define NCP_SERVER(inode) NCP_SBP((inode)->i_sb) 47 + static inline struct ncp_inode_info *NCP_FINFO(const struct inode *inode) 48 + { 49 + return container_of(inode, struct ncp_inode_info, vfs_inode); 50 + } 51 + 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 *); 57 + 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); 65 + 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); 69 + 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); 75 + } 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); 80 + 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 86 + 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); 91 + 92 + /* linux/fs/ncpfs/mmap.c */ 93 + int ncp_mmap(struct file *, struct vm_area_struct *); 94 + 95 + /* linux/fs/ncpfs/ncplib_kernel.c */ 96 + int ncp_make_closed(struct inode *); 97 + 98 + #include "ncplib_kernel.h"
+1 -1
fs/ncpfs/ncplib_kernel.c
··· 11 11 12 12 13 13 14 - #include "ncplib_kernel.h" 14 + #include "ncp_fs.h" 15 15 16 16 static inline void assert_server_locked(struct ncp_server *server) 17 17 {
-2
fs/ncpfs/ncplib_kernel.h
··· 32 32 #include <linux/ctype.h> 33 33 #endif /* CONFIG_NCPFS_NLS */ 34 34 35 - #include <linux/ncp_fs.h> 36 - 37 35 #define NCP_MIN_SYMLINK_SIZE 8 38 36 #define NCP_MAX_SYMLINK_SIZE 512 39 37
+1
fs/ncpfs/ncpsign_kernel.c
··· 11 11 #include <linux/string.h> 12 12 #include <linux/ncp.h> 13 13 #include <linux/bitops.h> 14 + #include "ncp_fs.h" 14 15 #include "ncpsign_kernel.h" 15 16 16 17 /* i386: 32-bit, little endian, handles mis-alignment */
-2
fs/ncpfs/ncpsign_kernel.h
··· 8 8 #ifndef _NCPSIGN_KERNEL_H 9 9 #define _NCPSIGN_KERNEL_H 10 10 11 - #include <linux/ncp_fs.h> 12 - 13 11 #ifdef CONFIG_NCPFS_PACKET_SIGNING 14 12 void __sign_packet(struct ncp_server *server, const char *data, size_t size, __u32 totalsize, void *sign_buff); 15 13 int sign_verify_reply(struct ncp_server *server, const char *data, size_t size, __u32 totalsize, const void *sign_buff);
+1 -1
fs/ncpfs/sock.c
··· 28 28 #include <linux/poll.h> 29 29 #include <linux/file.h> 30 30 31 - #include <linux/ncp_fs.h> 31 + #include "ncp_fs.h" 32 32 33 33 #include "ncpsign_kernel.h" 34 34
+1 -3
fs/ncpfs/symlink.c
··· 25 25 26 26 #include <linux/errno.h> 27 27 #include <linux/fs.h> 28 - #include <linux/ncp_fs.h> 29 28 #include <linux/time.h> 30 29 #include <linux/slab.h> 31 30 #include <linux/mm.h> 32 31 #include <linux/stat.h> 33 - #include "ncplib_kernel.h" 34 - 32 + #include "ncp_fs.h" 35 33 36 34 /* these magic numbers must appear in the symlink file -- this makes it a bit 37 35 more resilient against the magic attributes being set on random files. */
-100
include/linux/ncp_fs.h
··· 143 143 #define NCP_MAXPATHLEN 255 144 144 #define NCP_MAXNAMELEN 14 145 145 146 - #ifdef __KERNEL__ 147 - 148 - #include <linux/ncp_fs_i.h> 149 - #include <linux/ncp_fs_sb.h> 150 - 151 - /* define because it is easy to change PRINTK to {*}PRINTK */ 152 - #define PRINTK(format, args...) printk(KERN_DEBUG format , ## args) 153 - 154 - #undef NCPFS_PARANOIA 155 - #ifdef NCPFS_PARANOIA 156 - #define PPRINTK(format, args...) PRINTK(format , ## args) 157 - #else 158 - #define PPRINTK(format, args...) 159 - #endif 160 - 161 - #ifndef DEBUG_NCP 162 - #define DEBUG_NCP 0 163 - #endif 164 - #if DEBUG_NCP > 0 165 - #define DPRINTK(format, args...) PRINTK(format , ## args) 166 - #else 167 - #define DPRINTK(format, args...) 168 - #endif 169 - #if DEBUG_NCP > 1 170 - #define DDPRINTK(format, args...) PRINTK(format , ## args) 171 - #else 172 - #define DDPRINTK(format, args...) 173 - #endif 174 - 175 - #define NCP_MAX_RPC_TIMEOUT (6*HZ) 176 - 177 - 178 - struct ncp_entry_info { 179 - struct nw_info_struct i; 180 - ino_t ino; 181 - int opened; 182 - int access; 183 - unsigned int volume; 184 - __u8 file_handle[6]; 185 - }; 186 - 187 - static inline struct ncp_server *NCP_SBP(const struct super_block *sb) 188 - { 189 - return sb->s_fs_info; 190 - } 191 - 192 - #define NCP_SERVER(inode) NCP_SBP((inode)->i_sb) 193 - static inline struct ncp_inode_info *NCP_FINFO(const struct inode *inode) 194 - { 195 - return container_of(inode, struct ncp_inode_info, vfs_inode); 196 - } 197 - 198 - /* linux/fs/ncpfs/inode.c */ 199 - int ncp_notify_change(struct dentry *, struct iattr *); 200 - struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *); 201 - void ncp_update_inode(struct inode *, struct ncp_entry_info *); 202 - void ncp_update_inode2(struct inode *, struct ncp_entry_info *); 203 - 204 - /* linux/fs/ncpfs/dir.c */ 205 - extern const struct inode_operations ncp_dir_inode_operations; 206 - extern const struct file_operations ncp_dir_operations; 207 - extern const struct dentry_operations ncp_dentry_operations; 208 - int ncp_conn_logged_in(struct super_block *); 209 - int ncp_date_dos2unix(__le16 time, __le16 date); 210 - void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); 211 - 212 - /* linux/fs/ncpfs/ioctl.c */ 213 - long ncp_ioctl(struct file *, unsigned int, unsigned long); 214 - long ncp_compat_ioctl(struct file *, unsigned int, unsigned long); 215 - 216 - /* linux/fs/ncpfs/sock.c */ 217 - int ncp_request2(struct ncp_server *server, int function, 218 - void* reply, int max_reply_size); 219 - static inline int ncp_request(struct ncp_server *server, int function) { 220 - return ncp_request2(server, function, server->packet, server->packet_size); 221 - } 222 - int ncp_connect(struct ncp_server *server); 223 - int ncp_disconnect(struct ncp_server *server); 224 - void ncp_lock_server(struct ncp_server *server); 225 - void ncp_unlock_server(struct ncp_server *server); 226 - 227 - /* linux/fs/ncpfs/symlink.c */ 228 - #if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS) 229 - extern const struct address_space_operations ncp_symlink_aops; 230 - int ncp_symlink(struct inode*, struct dentry*, const char*); 231 - #endif 232 - 233 - /* linux/fs/ncpfs/file.c */ 234 - extern const struct inode_operations ncp_file_inode_operations; 235 - extern const struct file_operations ncp_file_operations; 236 - int ncp_make_open(struct inode *, int); 237 - 238 - /* linux/fs/ncpfs/mmap.c */ 239 - int ncp_mmap(struct file *, struct vm_area_struct *); 240 - 241 - /* linux/fs/ncpfs/ncplib_kernel.c */ 242 - int ncp_make_closed(struct inode *); 243 - 244 - #endif /* __KERNEL__ */ 245 - 246 146 #endif /* _LINUX_NCP_FS_H */
include/linux/ncp_fs_i.h fs/ncpfs/ncp_fs_i.h
+18 -6
include/linux/ncp_fs_sb.h fs/ncpfs/ncp_fs_sb.h
··· 13 13 #include <linux/net.h> 14 14 #include <linux/mutex.h> 15 15 #include <linux/backing-dev.h> 16 - 17 - #ifdef __KERNEL__ 18 - 19 16 #include <linux/workqueue.h> 20 17 21 18 #define NCP_DEFAULT_OPTIONS 0 /* 2 for packet signatures */ 22 19 23 20 struct sock; 21 + 22 + struct ncp_mount_data_kernel { 23 + unsigned long flags; /* NCP_MOUNT_* flags */ 24 + unsigned int int_flags; /* internal flags */ 25 + #define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001 26 + __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */ 27 + struct pid *wdog_pid; /* Who cares for our watchdog packets? */ 28 + unsigned int ncp_fd; /* The socket to the ncp port */ 29 + unsigned int time_out; /* How long should I wait after 30 + sending a NCP request? */ 31 + unsigned int retry_count; /* And how often should I retry? */ 32 + unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; 33 + __kernel_uid32_t uid; 34 + __kernel_gid32_t gid; 35 + __kernel_mode_t file_mode; 36 + __kernel_mode_t dir_mode; 37 + int info_fd; 38 + }; 24 39 25 40 struct ncp_server { 26 41 ··· 173 158 server->conn_status |= 0x01; 174 159 } 175 160 176 - #endif /* __KERNEL__ */ 177 - 178 161 #endif 179 -
-22
include/linux/ncp_mount.h
··· 68 68 69 69 #define NCP_MOUNT_VERSION_V5 (5) /* Text only */ 70 70 71 - #ifdef __KERNEL__ 72 - 73 - struct ncp_mount_data_kernel { 74 - unsigned long flags; /* NCP_MOUNT_* flags */ 75 - unsigned int int_flags; /* internal flags */ 76 - #define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001 77 - __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */ 78 - struct pid *wdog_pid; /* Who cares for our watchdog packets? */ 79 - unsigned int ncp_fd; /* The socket to the ncp port */ 80 - unsigned int time_out; /* How long should I wait after 81 - sending a NCP request? */ 82 - unsigned int retry_count; /* And how often should I retry? */ 83 - unsigned char mounted_vol[NCP_VOLNAME_LEN + 1]; 84 - __kernel_uid32_t uid; 85 - __kernel_gid32_t gid; 86 - __kernel_mode_t file_mode; 87 - __kernel_mode_t dir_mode; 88 - int info_fd; 89 - }; 90 - 91 - #endif /* __KERNEL__ */ 92 - 93 71 #endif