2010-05-28 11:39:18 +02:00
|
|
|
#ifndef __PFS_PROTO_H__
|
|
|
|
#define __PFS_PROTO_H__
|
|
|
|
|
2009-12-20 21:41:50 +01:00
|
|
|
/* Function prototypes. */
|
|
|
|
|
|
|
|
/* Structs used in prototypes must be declared as such first. */
|
|
|
|
struct buf;
|
|
|
|
struct inode;
|
2010-07-15 15:39:57 +02:00
|
|
|
struct sockaddr_un;
|
2010-08-30 15:46:44 +02:00
|
|
|
struct ancillary;
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* buffer.c */
|
2013-03-07 15:46:21 +01:00
|
|
|
struct buf *get_block(dev_t dev, pino_t inum);
|
|
|
|
void put_block(dev_t dev, pino_t inum);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* cache.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
void buf_pool(void);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* inode.c */
|
2013-09-03 02:00:20 +02:00
|
|
|
struct inode *alloc_inode(dev_t dev, pmode_t mode, uid_t uid, gid_t gid);
|
2012-03-24 16:16:34 +01:00
|
|
|
void dup_inode(struct inode *ip);
|
2013-03-07 15:46:21 +01:00
|
|
|
struct inode *find_inode(pino_t numb);
|
2012-03-24 16:16:34 +01:00
|
|
|
void free_inode(struct inode *rip);
|
|
|
|
int fs_putnode(message *fs_m_in, message *fs_m_out);
|
|
|
|
void init_inode_cache(void);
|
2013-03-07 15:46:21 +01:00
|
|
|
struct inode *get_inode(dev_t dev, pino_t numb);
|
2012-03-24 16:16:34 +01:00
|
|
|
void put_inode(struct inode *rip);
|
|
|
|
void update_times(struct inode *rip);
|
|
|
|
void wipe_inode(struct inode *rip);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* link.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int fs_ftrunc(message *fs_m_in, message *fs_m_out);
|
|
|
|
int truncate_inode(struct inode *rip, off_t newsize);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* main.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
void reply(endpoint_t who, message *m_out);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* misc.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int fs_sync(message *fs_m_in, message *fs_m_out);
|
2013-04-15 19:44:19 +02:00
|
|
|
int fs_chmod(message *fs_m_in, message *fs_m_out);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
2012-02-13 16:28:04 +01:00
|
|
|
/* mount.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int fs_unmount(message *fs_m_in, message *fs_m_out);
|
2012-02-13 16:28:04 +01:00
|
|
|
|
2009-12-20 21:41:50 +01:00
|
|
|
/* open.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int fs_newnode(message *fs_m_in, message *fs_m_out);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* read.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int fs_readwrite(message *fs_m_in, message *fs_m_out);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* utility.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
time_t clock_time(void);
|
|
|
|
int no_sys(message *pfs_m_in, message *pfs_m_out);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* stadir.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
int fs_stat(message *fs_m_in, message *fs_m_out);
|
2009-12-20 21:41:50 +01:00
|
|
|
|
|
|
|
/* super.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
bit_t alloc_bit(void);
|
|
|
|
void free_bit(bit_t bit_returned);
|
2010-05-28 11:39:18 +02:00
|
|
|
|
2010-07-15 15:39:57 +02:00
|
|
|
/* dev_uds.c */
|
2013-09-03 02:00:20 +02:00
|
|
|
void uds_request(message *m_ptr, int ipc_status);
|
|
|
|
void uds_unsuspend(devminor_t minor);
|
2010-07-15 15:39:57 +02:00
|
|
|
|
|
|
|
/* uds.c */
|
2012-03-24 16:16:34 +01:00
|
|
|
void uds_init(void);
|
2013-09-03 02:00:20 +02:00
|
|
|
int uds_clear_fds(devminor_t minor, struct ancillary *data);
|
|
|
|
int uds_do_ioctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
|
|
|
cp_grant_id_t grant);
|
2010-05-28 11:39:18 +02:00
|
|
|
#endif
|