1 #ifndef _PROCFS_PROTO_H 2 #define _PROCFS_PROTO_H 3 4 /* buf.c */ 5 void buf_init(char *ptr, size_t len, off_t start); 6 void buf_printf(char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); 7 void buf_append(char *data, size_t len); 8 ssize_t buf_result(void); 9 10 /* cpuinfo.c */ 11 void root_cpuinfo(void); 12 13 /* service.c */ 14 void service_init(void); 15 void service_lookup(struct inode *parent, clock_t now); 16 void service_getdents(struct inode *node); 17 void service_read(struct inode *node); 18 19 /* tree.c */ 20 int init_tree(void); 21 int lookup_hook(struct inode *parent, char *name, cbdata_t cbdata); 22 int getdents_hook(struct inode *inode, cbdata_t cbdata); 23 ssize_t read_hook(struct inode *inode, char *ptr, size_t len, off_t off, 24 cbdata_t cbdata); 25 int rdlink_hook(struct inode *inode, char *ptr, size_t max, cbdata_t cbdata); 26 void out_of_inodes(void); 27 28 /* util.c */ 29 int procfs_getloadavg(struct load *loadavg, int nelem); 30 31 #endif /* _PROCFS_PROTO_H */ 32