Linux Audio

Check our new training course

Yocto distribution development and maintenance

Need a Yocto distribution for your embedded project?
Loading...
v4.6
  1#include <linux/ncp_fs.h>
  2#include "ncp_fs_i.h"
  3#include "ncp_fs_sb.h"
  4
 
 
 
  5#undef NCPFS_PARANOIA
  6#ifdef NCPFS_PARANOIA
  7#define ncp_vdbg(fmt, ...)					\
  8	pr_debug(fmt, ##__VA_ARGS__)
  9#else
 10#define ncp_vdbg(fmt, ...)					\
 11do {								\
 12	if (0)							\
 13		pr_debug(fmt, ##__VA_ARGS__);			\
 14} while (0)
 15#endif
 16
 17#ifndef DEBUG_NCP
 18#define DEBUG_NCP 0
 19#endif
 20
 21#if DEBUG_NCP > 0 && !defined(DEBUG)
 22#define DEBUG
 
 
 
 
 
 
 23#endif
 24
 25#define ncp_dbg(level, fmt, ...)				\
 26do {								\
 27	if (level <= DEBUG_NCP)					\
 28		pr_debug(fmt, ##__VA_ARGS__);			\
 29} while (0)
 30
 31#define NCP_MAX_RPC_TIMEOUT (6*HZ)
 32
 33
 34struct ncp_entry_info {
 35	struct nw_info_struct	i;
 36	ino_t			ino;
 37	int			opened;
 38	int			access;
 39	unsigned int		volume;
 40	__u8			file_handle[6];
 41};
 42
 43static inline struct ncp_server *NCP_SBP(const struct super_block *sb)
 44{
 45	return sb->s_fs_info;
 46}
 47
 48#define NCP_SERVER(inode)	NCP_SBP((inode)->i_sb)
 49static inline struct ncp_inode_info *NCP_FINFO(const struct inode *inode)
 50{
 51	return container_of(inode, struct ncp_inode_info, vfs_inode);
 52}
 53
 54/* linux/fs/ncpfs/inode.c */
 55int ncp_notify_change(struct dentry *, struct iattr *);
 56struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *);
 57void ncp_update_inode(struct inode *, struct ncp_entry_info *);
 58void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
 59
 60/* linux/fs/ncpfs/dir.c */
 61extern const struct inode_operations ncp_dir_inode_operations;
 62extern const struct file_operations ncp_dir_operations;
 63extern const struct dentry_operations ncp_dentry_operations;
 64int ncp_conn_logged_in(struct super_block *);
 65int ncp_date_dos2unix(__le16 time, __le16 date);
 66void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
 67
 68/* linux/fs/ncpfs/ioctl.c */
 69long ncp_ioctl(struct file *, unsigned int, unsigned long);
 70long ncp_compat_ioctl(struct file *, unsigned int, unsigned long);
 71
 72/* linux/fs/ncpfs/sock.c */
 73int ncp_request2(struct ncp_server *server, int function,
 74	void* reply, int max_reply_size);
 75static inline int ncp_request(struct ncp_server *server, int function) {
 76	return ncp_request2(server, function, server->packet, server->packet_size);
 77}
 78int ncp_connect(struct ncp_server *server);
 79int ncp_disconnect(struct ncp_server *server);
 80void ncp_lock_server(struct ncp_server *server);
 81void ncp_unlock_server(struct ncp_server *server);
 82
 83/* linux/fs/ncpfs/symlink.c */
 84#if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
 85extern const struct address_space_operations ncp_symlink_aops;
 86int ncp_symlink(struct inode*, struct dentry*, const char*);
 87#endif
 88
 89/* linux/fs/ncpfs/file.c */
 90extern const struct inode_operations ncp_file_inode_operations;
 91extern const struct file_operations ncp_file_operations;
 92int ncp_make_open(struct inode *, int);
 93
 94/* linux/fs/ncpfs/mmap.c */
 95int ncp_mmap(struct file *, struct vm_area_struct *);
 96
 97/* linux/fs/ncpfs/ncplib_kernel.c */
 98int ncp_make_closed(struct inode *);
 99
100#include "ncplib_kernel.h"
v3.5.6
 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
32struct 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
41static 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)
47static 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 */
53int ncp_notify_change(struct dentry *, struct iattr *);
54struct inode *ncp_iget(struct super_block *, struct ncp_entry_info *);
55void ncp_update_inode(struct inode *, struct ncp_entry_info *);
56void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
57
58/* linux/fs/ncpfs/dir.c */
59extern const struct inode_operations ncp_dir_inode_operations;
60extern const struct file_operations ncp_dir_operations;
61extern const struct dentry_operations ncp_dentry_operations;
62int ncp_conn_logged_in(struct super_block *);
63int ncp_date_dos2unix(__le16 time, __le16 date);
64void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
65
66/* linux/fs/ncpfs/ioctl.c */
67long ncp_ioctl(struct file *, unsigned int, unsigned long);
68long ncp_compat_ioctl(struct file *, unsigned int, unsigned long);
69
70/* linux/fs/ncpfs/sock.c */
71int ncp_request2(struct ncp_server *server, int function,
72	void* reply, int max_reply_size);
73static inline int ncp_request(struct ncp_server *server, int function) {
74	return ncp_request2(server, function, server->packet, server->packet_size);
75}
76int ncp_connect(struct ncp_server *server);
77int ncp_disconnect(struct ncp_server *server);
78void ncp_lock_server(struct ncp_server *server);
79void 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)
83extern const struct address_space_operations ncp_symlink_aops;
84int ncp_symlink(struct inode*, struct dentry*, const char*);
85#endif
86
87/* linux/fs/ncpfs/file.c */
88extern const struct inode_operations ncp_file_inode_operations;
89extern const struct file_operations ncp_file_operations;
90int ncp_make_open(struct inode *, int);
91
92/* linux/fs/ncpfs/mmap.c */
93int ncp_mmap(struct file *, struct vm_area_struct *);
94
95/* linux/fs/ncpfs/ncplib_kernel.c */
96int ncp_make_closed(struct inode *);
97
98#include "ncplib_kernel.h"