1 #ifndef _PROCFS_PROTO_H
2 #define _PROCFS_PROTO_H
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);
11 void root_cpuinfo(void);
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
);
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
,
25 int rdlink_hook(struct inode
*inode
, char *ptr
, size_t max
, cbdata_t cbdata
);
26 pid_t
pid_from_slot(int slot
);
27 void out_of_inodes(void);
30 int procfs_getloadavg(struct load
*loadavg
, int nelem
);
32 #endif /* _PROCFS_PROTO_H */