phunix/minix/fs/procfs/proto.h
David van Moolenbroek 31b6611abf procfs: add /proc/service directory
This directory is filled dynamically with regular files, one for each
service that RS knows about, named after its label.  Its contents are
still subject to (heavy) change, but currently expose the service's
endpoint and number of restarts so far.

Change-Id: Ie58c824bcb6382c8da7a714e59fee87329970b4b
2014-11-12 12:13:53 +00:00

32 lines
936 B
C

#ifndef _PROCFS_PROTO_H
#define _PROCFS_PROTO_H
/* buf.c */
void buf_init(char *ptr, size_t len, off_t start);
void buf_printf(char *fmt, ...) __attribute__((__format__(__printf__, 1, 2)));
void buf_append(char *data, size_t len);
ssize_t buf_result(void);
/* cpuinfo.c */
void root_cpuinfo(void);
/* service.c */
void service_init(void);
void service_lookup(struct inode *parent, clock_t now);
void service_getdents(struct inode *node);
void service_read(struct inode *node);
/* tree.c */
int init_tree(void);
int lookup_hook(struct inode *parent, char *name, cbdata_t cbdata);
int getdents_hook(struct inode *inode, cbdata_t cbdata);
ssize_t read_hook(struct inode *inode, char *ptr, size_t len, off_t off,
cbdata_t cbdata);
int rdlink_hook(struct inode *inode, char *ptr, size_t max, cbdata_t cbdata);
void out_of_inodes(void);
/* util.c */
int procfs_getloadavg(struct load *loadavg, int nelem);
#endif /* _PROCFS_PROTO_H */