retire PUBLIC, PRIVATE and FORWARD
This commit is contained in:
@@ -26,17 +26,17 @@
|
||||
#include "super.h"
|
||||
#include "inode.h"
|
||||
|
||||
FORWARD void rm_lru(struct buf *bp);
|
||||
FORWARD void read_block(struct buf *);
|
||||
static void rm_lru(struct buf *bp);
|
||||
static void read_block(struct buf *);
|
||||
|
||||
PRIVATE int vmcache = 0; /* are we using vm's secondary cache? (initially not) */
|
||||
static int vmcache = 0; /* are we using vm's secondary cache? (initially not) */
|
||||
|
||||
PRIVATE block_t super_start = 0, super_end = 0;
|
||||
static block_t super_start = 0, super_end = 0;
|
||||
|
||||
/*===========================================================================*
|
||||
* get_block *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct buf *get_block(
|
||||
struct buf *get_block(
|
||||
register dev_t dev, /* on which device is the block? */
|
||||
register block_t block, /* which block is wanted? */
|
||||
int only_search /* if NO_READ, don't read, else act normal */
|
||||
@@ -206,7 +206,7 @@ PUBLIC struct buf *get_block(
|
||||
/*===========================================================================*
|
||||
* put_block *
|
||||
*===========================================================================*/
|
||||
PUBLIC void put_block(bp, block_type)
|
||||
void put_block(bp, block_type)
|
||||
register struct buf *bp; /* pointer to the buffer to be released */
|
||||
int block_type; /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */
|
||||
{
|
||||
@@ -259,7 +259,7 @@ int block_type; /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */
|
||||
/*===========================================================================*
|
||||
* alloc_zone *
|
||||
*===========================================================================*/
|
||||
PUBLIC zone_t alloc_zone(
|
||||
zone_t alloc_zone(
|
||||
dev_t dev, /* device where zone wanted */
|
||||
zone_t z /* try to allocate new zone near this one */
|
||||
)
|
||||
@@ -302,7 +302,7 @@ PUBLIC zone_t alloc_zone(
|
||||
/*===========================================================================*
|
||||
* free_zone *
|
||||
*===========================================================================*/
|
||||
PUBLIC void free_zone(
|
||||
void free_zone(
|
||||
dev_t dev, /* device where zone located */
|
||||
zone_t numb /* zone to be returned */
|
||||
)
|
||||
@@ -323,7 +323,7 @@ PUBLIC void free_zone(
|
||||
/*===========================================================================*
|
||||
* read_block *
|
||||
*===========================================================================*/
|
||||
PRIVATE void read_block(bp)
|
||||
static void read_block(bp)
|
||||
register struct buf *bp; /* buffer pointer */
|
||||
{
|
||||
/* Read or write a disk block. This is the only routine in which actual disk
|
||||
@@ -362,7 +362,7 @@ register struct buf *bp; /* buffer pointer */
|
||||
/*===========================================================================*
|
||||
* invalidate *
|
||||
*===========================================================================*/
|
||||
PUBLIC void invalidate(
|
||||
void invalidate(
|
||||
dev_t device /* device whose blocks are to be purged */
|
||||
)
|
||||
{
|
||||
@@ -400,7 +400,7 @@ int block_write_ok(struct buf *bp)
|
||||
/*===========================================================================*
|
||||
* flushall *
|
||||
*===========================================================================*/
|
||||
PUBLIC void flushall(
|
||||
void flushall(
|
||||
dev_t dev /* device to flush */
|
||||
)
|
||||
{
|
||||
@@ -437,7 +437,7 @@ PUBLIC void flushall(
|
||||
/*===========================================================================*
|
||||
* rw_scattered *
|
||||
*===========================================================================*/
|
||||
PUBLIC void rw_scattered(
|
||||
void rw_scattered(
|
||||
dev_t dev, /* major-minor device number */
|
||||
struct buf **bufq, /* pointer to array of buffers */
|
||||
int bufqsize, /* number of buffers */
|
||||
@@ -540,7 +540,7 @@ PUBLIC void rw_scattered(
|
||||
/*===========================================================================*
|
||||
* rm_lru *
|
||||
*===========================================================================*/
|
||||
PRIVATE void rm_lru(bp)
|
||||
static void rm_lru(bp)
|
||||
struct buf *bp;
|
||||
{
|
||||
/* Remove a block from its LRU chain. */
|
||||
@@ -563,7 +563,7 @@ struct buf *bp;
|
||||
/*===========================================================================*
|
||||
* cache_resize *
|
||||
*===========================================================================*/
|
||||
PRIVATE void cache_resize(unsigned int blocksize, unsigned int bufs)
|
||||
static void cache_resize(unsigned int blocksize, unsigned int bufs)
|
||||
{
|
||||
struct buf *bp;
|
||||
struct inode *rip;
|
||||
@@ -588,7 +588,7 @@ PRIVATE void cache_resize(unsigned int blocksize, unsigned int bufs)
|
||||
/*===========================================================================*
|
||||
* bufs_heuristic *
|
||||
*===========================================================================*/
|
||||
PRIVATE int bufs_heuristic(struct super_block *sp)
|
||||
static int bufs_heuristic(struct super_block *sp)
|
||||
{
|
||||
u32_t btotal, bfree, bused;
|
||||
|
||||
@@ -601,7 +601,7 @@ PRIVATE int bufs_heuristic(struct super_block *sp)
|
||||
/*===========================================================================*
|
||||
* set_blocksize *
|
||||
*===========================================================================*/
|
||||
PUBLIC void set_blocksize(struct super_block *sp)
|
||||
void set_blocksize(struct super_block *sp)
|
||||
{
|
||||
int bufs;
|
||||
|
||||
@@ -626,7 +626,7 @@ PUBLIC void set_blocksize(struct super_block *sp)
|
||||
/*===========================================================================*
|
||||
* buf_pool *
|
||||
*===========================================================================*/
|
||||
PUBLIC void buf_pool(int new_nr_bufs)
|
||||
void buf_pool(int new_nr_bufs)
|
||||
{
|
||||
/* Initialize the buffer pool. */
|
||||
register struct buf *bp;
|
||||
|
||||
@@ -22,21 +22,21 @@
|
||||
#include "super.h"
|
||||
#include <minix/vfsif.h>
|
||||
|
||||
FORWARD void addhash_inode(struct inode *node);
|
||||
static void addhash_inode(struct inode *node);
|
||||
|
||||
FORWARD void free_inode(dev_t dev, ino_t numb);
|
||||
FORWARD void new_icopy(struct inode *rip, d2_inode *dip, int direction,
|
||||
static void free_inode(dev_t dev, ino_t numb);
|
||||
static void new_icopy(struct inode *rip, d2_inode *dip, int direction,
|
||||
int norm);
|
||||
FORWARD void old_icopy(struct inode *rip, d1_inode *dip, int direction,
|
||||
static void old_icopy(struct inode *rip, d1_inode *dip, int direction,
|
||||
int norm);
|
||||
FORWARD void unhash_inode(struct inode *node);
|
||||
FORWARD void wipe_inode(struct inode *rip);
|
||||
static void unhash_inode(struct inode *node);
|
||||
static void wipe_inode(struct inode *rip);
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_putnode *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_putnode(void)
|
||||
int fs_putnode(void)
|
||||
{
|
||||
/* Find the inode specified by the request message and decrease its counter.*/
|
||||
|
||||
@@ -74,7 +74,7 @@ PUBLIC int fs_putnode(void)
|
||||
/*===========================================================================*
|
||||
* init_inode_cache *
|
||||
*===========================================================================*/
|
||||
PUBLIC void init_inode_cache()
|
||||
void init_inode_cache()
|
||||
{
|
||||
struct inode *rip;
|
||||
struct inodelist *rlp;
|
||||
@@ -100,7 +100,7 @@ PUBLIC void init_inode_cache()
|
||||
/*===========================================================================*
|
||||
* addhash_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE void addhash_inode(struct inode *node)
|
||||
static void addhash_inode(struct inode *node)
|
||||
{
|
||||
int hashi = (int) (node->i_num & INODE_HASH_MASK);
|
||||
|
||||
@@ -112,7 +112,7 @@ PRIVATE void addhash_inode(struct inode *node)
|
||||
/*===========================================================================*
|
||||
* unhash_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE void unhash_inode(struct inode *node)
|
||||
static void unhash_inode(struct inode *node)
|
||||
{
|
||||
/* remove from hash table */
|
||||
LIST_REMOVE(node, i_hash);
|
||||
@@ -122,7 +122,7 @@ PRIVATE void unhash_inode(struct inode *node)
|
||||
/*===========================================================================*
|
||||
* get_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct inode *get_inode(
|
||||
struct inode *get_inode(
|
||||
dev_t dev, /* device on which inode resides */
|
||||
ino_t numb /* inode number */
|
||||
)
|
||||
@@ -184,7 +184,7 @@ PUBLIC struct inode *get_inode(
|
||||
/*===========================================================================*
|
||||
* find_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct inode *find_inode(
|
||||
struct inode *find_inode(
|
||||
dev_t dev, /* device on which inode resides */
|
||||
ino_t numb /* inode number */
|
||||
)
|
||||
@@ -210,7 +210,7 @@ PUBLIC struct inode *find_inode(
|
||||
/*===========================================================================*
|
||||
* put_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC void put_inode(rip)
|
||||
void put_inode(rip)
|
||||
register struct inode *rip; /* pointer to inode to be released */
|
||||
{
|
||||
/* The caller is no longer using this inode. If no one else is using it either
|
||||
@@ -256,7 +256,7 @@ register struct inode *rip; /* pointer to inode to be released */
|
||||
/*===========================================================================*
|
||||
* alloc_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct inode *alloc_inode(dev_t dev, mode_t bits)
|
||||
struct inode *alloc_inode(dev_t dev, mode_t bits)
|
||||
{
|
||||
/* Allocate a free inode on 'dev', and return a pointer to it. */
|
||||
|
||||
@@ -313,7 +313,7 @@ PUBLIC struct inode *alloc_inode(dev_t dev, mode_t bits)
|
||||
/*===========================================================================*
|
||||
* wipe_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE void wipe_inode(rip)
|
||||
static void wipe_inode(rip)
|
||||
register struct inode *rip; /* the inode to be erased */
|
||||
{
|
||||
/* Erase some fields in the inode. This function is called from alloc_inode()
|
||||
@@ -332,7 +332,7 @@ register struct inode *rip; /* the inode to be erased */
|
||||
/*===========================================================================*
|
||||
* free_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE void free_inode(
|
||||
static void free_inode(
|
||||
dev_t dev, /* on which device is the inode? */
|
||||
ino_t inumb /* number of the inode to be freed */
|
||||
)
|
||||
@@ -354,7 +354,7 @@ PRIVATE void free_inode(
|
||||
/*===========================================================================*
|
||||
* update_times *
|
||||
*===========================================================================*/
|
||||
PUBLIC void update_times(rip)
|
||||
void update_times(rip)
|
||||
register struct inode *rip; /* pointer to inode to be read/written */
|
||||
{
|
||||
/* Various system calls are required by the standard to update atime, ctime,
|
||||
@@ -380,7 +380,7 @@ register struct inode *rip; /* pointer to inode to be read/written */
|
||||
/*===========================================================================*
|
||||
* rw_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC void rw_inode(rip, rw_flag)
|
||||
void rw_inode(rip, rw_flag)
|
||||
register struct inode *rip; /* pointer to inode to be read/written */
|
||||
int rw_flag; /* READING or WRITING */
|
||||
{
|
||||
@@ -424,7 +424,7 @@ int rw_flag; /* READING or WRITING */
|
||||
/*===========================================================================*
|
||||
* old_icopy *
|
||||
*===========================================================================*/
|
||||
PRIVATE void old_icopy(rip, dip, direction, norm)
|
||||
static void old_icopy(rip, dip, direction, norm)
|
||||
register struct inode *rip; /* pointer to the in-core inode struct */
|
||||
register d1_inode *dip; /* pointer to the d1_inode inode struct */
|
||||
int direction; /* READING (from disk) or WRITING (to disk) */
|
||||
@@ -470,7 +470,7 @@ int norm; /* TRUE = do not swap bytes; FALSE = swap */
|
||||
/*===========================================================================*
|
||||
* new_icopy *
|
||||
*===========================================================================*/
|
||||
PRIVATE void new_icopy(rip, dip, direction, norm)
|
||||
static void new_icopy(rip, dip, direction, norm)
|
||||
register struct inode *rip; /* pointer to the in-core inode struct */
|
||||
register d2_inode *dip; /* pointer to the d2_inode struct */
|
||||
int direction; /* READING (from disk) or WRITING (to disk) */
|
||||
@@ -513,7 +513,7 @@ int norm; /* TRUE = do not swap bytes; FALSE = swap */
|
||||
/*===========================================================================*
|
||||
* dup_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC void dup_inode(ip)
|
||||
void dup_inode(ip)
|
||||
struct inode *ip; /* The inode to be duplicated. */
|
||||
{
|
||||
/* This routine is a simplified form of get_inode() for the case where
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
#define SAME 1000
|
||||
|
||||
|
||||
FORWARD int freesp_inode(struct inode *rip, off_t st, off_t end);
|
||||
FORWARD int remove_dir(struct inode *rldirp, struct inode *rip, char
|
||||
static int freesp_inode(struct inode *rip, off_t st, off_t end);
|
||||
static int remove_dir(struct inode *rldirp, struct inode *rip, char
|
||||
dir_name[MFS_NAME_MAX]);
|
||||
FORWARD int unlink_file(struct inode *dirp, struct inode *rip, char
|
||||
static int unlink_file(struct inode *dirp, struct inode *rip, char
|
||||
file_name[MFS_NAME_MAX]);
|
||||
FORWARD off_t nextblock(off_t pos, int zone_size);
|
||||
FORWARD void zerozone_half(struct inode *rip, off_t pos, int half, int
|
||||
static off_t nextblock(off_t pos, int zone_size);
|
||||
static void zerozone_half(struct inode *rip, off_t pos, int half, int
|
||||
zone_size);
|
||||
FORWARD void zerozone_range(struct inode *rip, off_t pos, off_t len);
|
||||
static void zerozone_range(struct inode *rip, off_t pos, off_t len);
|
||||
|
||||
/* Args to zerozone_half() */
|
||||
#define FIRST_HALF 0
|
||||
@@ -28,7 +28,7 @@ FORWARD void zerozone_range(struct inode *rip, off_t pos, off_t len);
|
||||
/*===========================================================================*
|
||||
* fs_link *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_link()
|
||||
int fs_link()
|
||||
{
|
||||
/* Perform the link(name1, name2) system call. */
|
||||
|
||||
@@ -108,7 +108,7 @@ PUBLIC int fs_link()
|
||||
/*===========================================================================*
|
||||
* fs_unlink *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_unlink()
|
||||
int fs_unlink()
|
||||
{
|
||||
/* Perform the unlink(name) or rmdir(name) system call. The code for these two
|
||||
* is almost the same. They differ only in some condition testing. Unlink()
|
||||
@@ -170,7 +170,7 @@ PUBLIC int fs_unlink()
|
||||
/*===========================================================================*
|
||||
* fs_rdlink *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_rdlink()
|
||||
int fs_rdlink()
|
||||
{
|
||||
block_t b; /* block containing link text */
|
||||
struct buf *bp; /* buffer containing link text */
|
||||
@@ -210,7 +210,7 @@ PUBLIC int fs_rdlink()
|
||||
/*===========================================================================*
|
||||
* remove_dir *
|
||||
*===========================================================================*/
|
||||
PRIVATE int remove_dir(rldirp, rip, dir_name)
|
||||
static int remove_dir(rldirp, rip, dir_name)
|
||||
struct inode *rldirp; /* parent directory */
|
||||
struct inode *rip; /* directory to be removed */
|
||||
char dir_name[MFS_NAME_MAX]; /* name of directory to be removed */
|
||||
@@ -246,7 +246,7 @@ char dir_name[MFS_NAME_MAX]; /* name of directory to be removed */
|
||||
/*===========================================================================*
|
||||
* unlink_file *
|
||||
*===========================================================================*/
|
||||
PRIVATE int unlink_file(dirp, rip, file_name)
|
||||
static int unlink_file(dirp, rip, file_name)
|
||||
struct inode *dirp; /* parent directory of file */
|
||||
struct inode *rip; /* inode of file, may be NULL too. */
|
||||
char file_name[MFS_NAME_MAX]; /* name of file to be removed */
|
||||
@@ -282,7 +282,7 @@ char file_name[MFS_NAME_MAX]; /* name of file to be removed */
|
||||
/*===========================================================================*
|
||||
* fs_rename *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_rename()
|
||||
int fs_rename()
|
||||
{
|
||||
/* Perform the rename(name1, name2) system call. */
|
||||
struct inode *old_dirp, *old_ip; /* ptrs to old dir, file inodes */
|
||||
@@ -487,7 +487,7 @@ PUBLIC int fs_rename()
|
||||
/*===========================================================================*
|
||||
* fs_ftrunc *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_ftrunc(void)
|
||||
int fs_ftrunc(void)
|
||||
{
|
||||
struct inode *rip;
|
||||
off_t start, end;
|
||||
@@ -515,7 +515,7 @@ PUBLIC int fs_ftrunc(void)
|
||||
/*===========================================================================*
|
||||
* truncate_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC int truncate_inode(rip, newsize)
|
||||
int truncate_inode(rip, newsize)
|
||||
register struct inode *rip; /* pointer to inode to be truncated */
|
||||
off_t newsize; /* inode must become this size */
|
||||
{
|
||||
@@ -559,7 +559,7 @@ off_t newsize; /* inode must become this size */
|
||||
/*===========================================================================*
|
||||
* freesp_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE int freesp_inode(rip, start, end)
|
||||
static int freesp_inode(rip, start, end)
|
||||
register struct inode *rip; /* pointer to inode to be partly freed */
|
||||
off_t start, end; /* range of bytes to free (end uninclusive) */
|
||||
{
|
||||
@@ -623,7 +623,7 @@ off_t start, end; /* range of bytes to free (end uninclusive) */
|
||||
/*===========================================================================*
|
||||
* nextblock *
|
||||
*===========================================================================*/
|
||||
PRIVATE off_t nextblock(pos, zone_size)
|
||||
static off_t nextblock(pos, zone_size)
|
||||
off_t pos;
|
||||
int zone_size;
|
||||
{
|
||||
@@ -641,7 +641,7 @@ int zone_size;
|
||||
/*===========================================================================*
|
||||
* zerozone_half *
|
||||
*===========================================================================*/
|
||||
PRIVATE void zerozone_half(rip, pos, half, zone_size)
|
||||
static void zerozone_half(rip, pos, half, zone_size)
|
||||
struct inode *rip;
|
||||
off_t pos;
|
||||
int half;
|
||||
@@ -672,7 +672,7 @@ int zone_size;
|
||||
/*===========================================================================*
|
||||
* zerozone_range *
|
||||
*===========================================================================*/
|
||||
PRIVATE void zerozone_range(rip, pos, len)
|
||||
static void zerozone_range(rip, pos, len)
|
||||
struct inode *rip;
|
||||
off_t pos;
|
||||
off_t len;
|
||||
|
||||
@@ -12,18 +12,18 @@
|
||||
|
||||
|
||||
/* Declare some local functions. */
|
||||
FORWARD void get_work(message *m_in);
|
||||
FORWARD void reply(endpoint_t who, message *m_out);
|
||||
static void get_work(message *m_in);
|
||||
static void reply(endpoint_t who, message *m_out);
|
||||
|
||||
/* SEF functions and variables. */
|
||||
FORWARD void sef_local_startup(void);
|
||||
FORWARD int sef_cb_init_fresh(int type, sef_init_info_t *info);
|
||||
FORWARD void sef_cb_signal_handler(int signo);
|
||||
static void sef_local_startup(void);
|
||||
static int sef_cb_init_fresh(int type, sef_init_info_t *info);
|
||||
static void sef_cb_signal_handler(int signo);
|
||||
|
||||
/*===========================================================================*
|
||||
* main *
|
||||
*===========================================================================*/
|
||||
PUBLIC int main(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
/* This is the main routine of this service. The main loop consists of
|
||||
* three major activities: getting new work, processing the work, and
|
||||
@@ -84,7 +84,7 @@ PUBLIC int main(int argc, char *argv[])
|
||||
/*===========================================================================*
|
||||
* sef_local_startup *
|
||||
*===========================================================================*/
|
||||
PRIVATE void sef_local_startup()
|
||||
static void sef_local_startup()
|
||||
{
|
||||
/* Register init callbacks. */
|
||||
sef_setcb_init_fresh(sef_cb_init_fresh);
|
||||
@@ -102,7 +102,7 @@ PRIVATE void sef_local_startup()
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_fresh *
|
||||
*===========================================================================*/
|
||||
PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
/* Initialize the Minix file server. */
|
||||
int i;
|
||||
@@ -127,7 +127,7 @@ PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
/*===========================================================================*
|
||||
* sef_cb_signal_handler *
|
||||
*===========================================================================*/
|
||||
PRIVATE void sef_cb_signal_handler(int signo)
|
||||
static void sef_cb_signal_handler(int signo)
|
||||
{
|
||||
/* Only check for termination signal, ignore anything else. */
|
||||
if (signo != SIGTERM) return;
|
||||
@@ -144,7 +144,7 @@ PRIVATE void sef_cb_signal_handler(int signo)
|
||||
/*===========================================================================*
|
||||
* get_work *
|
||||
*===========================================================================*/
|
||||
PRIVATE void get_work(m_in)
|
||||
static void get_work(m_in)
|
||||
message *m_in; /* pointer to message */
|
||||
{
|
||||
int r, srcok = 0;
|
||||
@@ -172,7 +172,7 @@ message *m_in; /* pointer to message */
|
||||
/*===========================================================================*
|
||||
* reply *
|
||||
*===========================================================================*/
|
||||
PRIVATE void reply(
|
||||
static void reply(
|
||||
endpoint_t who,
|
||||
message *m_out /* report result */
|
||||
)
|
||||
@@ -186,7 +186,7 @@ PRIVATE void reply(
|
||||
/*===========================================================================*
|
||||
* cch_check *
|
||||
*===========================================================================*/
|
||||
PRIVATE void cch_check(void)
|
||||
static void cch_check(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/*===========================================================================*
|
||||
* fs_sync *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_sync()
|
||||
int fs_sync()
|
||||
{
|
||||
/* Perform the sync() system call. Flush all the tables.
|
||||
* The order in which the various tables are flushed is critical. The
|
||||
@@ -37,7 +37,7 @@ PUBLIC int fs_sync()
|
||||
/*===========================================================================*
|
||||
* fs_flush *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_flush()
|
||||
int fs_flush()
|
||||
{
|
||||
/* Flush the blocks of a device from the cache after writing any dirty blocks
|
||||
* to disk.
|
||||
@@ -55,7 +55,7 @@ PUBLIC int fs_flush()
|
||||
/*===========================================================================*
|
||||
* fs_new_driver *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_new_driver(void)
|
||||
int fs_new_driver(void)
|
||||
{
|
||||
/* Set a new driver endpoint for this device. */
|
||||
dev_t dev;
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#include <minix/vfsif.h>
|
||||
#include <minix/bdev.h>
|
||||
|
||||
PRIVATE int cleanmount = 1;
|
||||
static int cleanmount = 1;
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_readsuper *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_readsuper()
|
||||
int fs_readsuper()
|
||||
{
|
||||
/* This function reads the superblock of the partition, gets the root inode
|
||||
* and sends back the details of them. Note, that the FS process does not
|
||||
@@ -122,7 +122,7 @@ PUBLIC int fs_readsuper()
|
||||
/*===========================================================================*
|
||||
* fs_mountpoint *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_mountpoint()
|
||||
int fs_mountpoint()
|
||||
{
|
||||
/* This function looks up the mount point, it checks the condition whether
|
||||
* the partition can be mounted on the inode or not.
|
||||
@@ -153,7 +153,7 @@ PUBLIC int fs_mountpoint()
|
||||
/*===========================================================================*
|
||||
* fs_unmount *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_unmount()
|
||||
int fs_unmount()
|
||||
{
|
||||
/* Unmount a file system by device number. */
|
||||
int count;
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
#include "super.h"
|
||||
#include <minix/vfsif.h>
|
||||
|
||||
FORWARD struct inode *new_node(struct inode *ldirp, char *string, mode_t
|
||||
static struct inode *new_node(struct inode *ldirp, char *string, mode_t
|
||||
bits, zone_t z0);
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_create *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_create()
|
||||
int fs_create()
|
||||
{
|
||||
size_t len;
|
||||
int r;
|
||||
@@ -70,7 +70,7 @@ PUBLIC int fs_create()
|
||||
/*===========================================================================*
|
||||
* fs_mknod *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_mknod()
|
||||
int fs_mknod()
|
||||
{
|
||||
struct inode *ip, *ldirp;
|
||||
char lastc[MFS_NAME_MAX];
|
||||
@@ -103,7 +103,7 @@ PUBLIC int fs_mknod()
|
||||
/*===========================================================================*
|
||||
* fs_mkdir *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_mkdir()
|
||||
int fs_mkdir()
|
||||
{
|
||||
int r1, r2; /* status codes */
|
||||
ino_t dot, dotdot; /* inode numbers for . and .. */
|
||||
@@ -169,7 +169,7 @@ PUBLIC int fs_mkdir()
|
||||
/*===========================================================================*
|
||||
* fs_slink *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_slink()
|
||||
int fs_slink()
|
||||
{
|
||||
phys_bytes len;
|
||||
struct inode *sip; /* inode containing symbolic link */
|
||||
@@ -243,7 +243,7 @@ PUBLIC int fs_slink()
|
||||
/*===========================================================================*
|
||||
* new_node *
|
||||
*===========================================================================*/
|
||||
PRIVATE struct inode *new_node(struct inode *ldirp,
|
||||
static struct inode *new_node(struct inode *ldirp,
|
||||
char *string, mode_t bits, zone_t z0)
|
||||
{
|
||||
/* New_node() is called by fs_open(), fs_mknod(), and fs_mkdir().
|
||||
@@ -318,7 +318,7 @@ PRIVATE struct inode *new_node(struct inode *ldirp,
|
||||
/*===========================================================================*
|
||||
* fs_inhibread *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_inhibread()
|
||||
int fs_inhibread()
|
||||
{
|
||||
struct inode *rip;
|
||||
|
||||
|
||||
@@ -22,19 +22,19 @@
|
||||
#include <minix/libminixfs.h>
|
||||
|
||||
|
||||
PUBLIC char dot1[2] = "."; /* used for search_dir to bypass the access */
|
||||
PUBLIC char dot2[3] = ".."; /* permissions for . and .. */
|
||||
char dot1[2] = "."; /* used for search_dir to bypass the access */
|
||||
char dot2[3] = ".."; /* permissions for . and .. */
|
||||
|
||||
FORWARD char *get_name(char *name, char string[MFS_NAME_MAX+1]);
|
||||
FORWARD int ltraverse(struct inode *rip, char *suffix);
|
||||
FORWARD int parse_path(ino_t dir_ino, ino_t root_ino, int flags, struct
|
||||
static char *get_name(char *name, char string[MFS_NAME_MAX+1]);
|
||||
static int ltraverse(struct inode *rip, char *suffix);
|
||||
static int parse_path(ino_t dir_ino, ino_t root_ino, int flags, struct
|
||||
inode **res_inop, size_t *offsetp, int *symlinkp);
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_lookup *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_lookup()
|
||||
int fs_lookup()
|
||||
{
|
||||
cp_grant_id_t grant;
|
||||
int r, r1, flags, symlinks;
|
||||
@@ -120,7 +120,7 @@ PUBLIC int fs_lookup()
|
||||
/*===========================================================================*
|
||||
* parse_path *
|
||||
*===========================================================================*/
|
||||
PRIVATE int parse_path(dir_ino, root_ino, flags, res_inop, offsetp, symlinkp)
|
||||
static int parse_path(dir_ino, root_ino, flags, res_inop, offsetp, symlinkp)
|
||||
ino_t dir_ino;
|
||||
ino_t root_ino;
|
||||
int flags;
|
||||
@@ -275,7 +275,7 @@ int *symlinkp;
|
||||
/*===========================================================================*
|
||||
* ltraverse *
|
||||
*===========================================================================*/
|
||||
PRIVATE int ltraverse(rip, suffix)
|
||||
static int ltraverse(rip, suffix)
|
||||
register struct inode *rip; /* symbolic link */
|
||||
char *suffix; /* current remaining path. Has to point in the
|
||||
* user_path buffer
|
||||
@@ -349,7 +349,7 @@ char *suffix; /* current remaining path. Has to point in the
|
||||
/*===========================================================================*
|
||||
* advance *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct inode *advance(dirp, string, chk_perm)
|
||||
struct inode *advance(dirp, string, chk_perm)
|
||||
struct inode *dirp; /* inode for directory to be searched */
|
||||
char string[MFS_NAME_MAX]; /* component name to look for */
|
||||
int chk_perm; /* check permissions when string is looked up*/
|
||||
@@ -417,7 +417,7 @@ int chk_perm; /* check permissions when string is looked up*/
|
||||
/*===========================================================================*
|
||||
* get_name *
|
||||
*===========================================================================*/
|
||||
PRIVATE char *get_name(path_name, string)
|
||||
static char *get_name(path_name, string)
|
||||
char *path_name; /* path name to parse */
|
||||
char string[MFS_NAME_MAX+1]; /* component extracted from 'old_name' */
|
||||
{
|
||||
@@ -463,7 +463,7 @@ char string[MFS_NAME_MAX+1]; /* component extracted from 'old_name' */
|
||||
/*===========================================================================*
|
||||
* search_dir *
|
||||
*===========================================================================*/
|
||||
PUBLIC int search_dir(ldir_ptr, string, numb, flag, check_permissions)
|
||||
int search_dir(ldir_ptr, string, numb, flag, check_permissions)
|
||||
register struct inode *ldir_ptr; /* ptr to inode for dir to search */
|
||||
char string[MFS_NAME_MAX]; /* component to search for */
|
||||
ino_t *numb; /* pointer to inode number */
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
#include "super.h"
|
||||
#include <minix/vfsif.h>
|
||||
|
||||
FORWARD int in_group(gid_t grp);
|
||||
static int in_group(gid_t grp);
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_chmod *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_chmod()
|
||||
int fs_chmod()
|
||||
{
|
||||
/* Perform the chmod(name, mode) system call. */
|
||||
|
||||
@@ -43,7 +43,7 @@ PUBLIC int fs_chmod()
|
||||
/*===========================================================================*
|
||||
* fs_chown *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_chown()
|
||||
int fs_chown()
|
||||
{
|
||||
register struct inode *rip;
|
||||
register int r;
|
||||
@@ -73,7 +73,7 @@ PUBLIC int fs_chown()
|
||||
/*===========================================================================*
|
||||
* forbidden *
|
||||
*===========================================================================*/
|
||||
PUBLIC int forbidden(register struct inode *rip, mode_t access_desired)
|
||||
int forbidden(register struct inode *rip, mode_t access_desired)
|
||||
{
|
||||
/* Given a pointer to an inode, 'rip', and the access desired, determine
|
||||
* if the access is allowed, and if not why not. The routine looks up the
|
||||
@@ -125,7 +125,7 @@ PUBLIC int forbidden(register struct inode *rip, mode_t access_desired)
|
||||
/*===========================================================================*
|
||||
* in_group *
|
||||
*===========================================================================*/
|
||||
PRIVATE int in_group(gid_t grp)
|
||||
static int in_group(gid_t grp)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -143,7 +143,7 @@ PRIVATE int in_group(gid_t grp)
|
||||
/*===========================================================================*
|
||||
* read_only *
|
||||
*===========================================================================*/
|
||||
PUBLIC int read_only(ip)
|
||||
int read_only(ip)
|
||||
struct inode *ip; /* ptr to inode whose file sys is to be cked */
|
||||
{
|
||||
/* Check to see if the file system on which the inode 'ip' resides is mounted
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
FORWARD struct buf *rahead(struct inode *rip, block_t baseblock, u64_t
|
||||
static struct buf *rahead(struct inode *rip, block_t baseblock, u64_t
|
||||
position, unsigned bytes_ahead);
|
||||
FORWARD int rw_chunk(struct inode *rip, u64_t position, unsigned off,
|
||||
static int rw_chunk(struct inode *rip, u64_t position, unsigned off,
|
||||
size_t chunk, unsigned left, int rw_flag, cp_grant_id_t gid, unsigned
|
||||
buf_off, unsigned int block_size, int *completed);
|
||||
|
||||
PRIVATE char getdents_buf[GETDENTS_BUFSIZ];
|
||||
static char getdents_buf[GETDENTS_BUFSIZ];
|
||||
|
||||
/*===========================================================================*
|
||||
* fs_readwrite *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_readwrite(void)
|
||||
int fs_readwrite(void)
|
||||
{
|
||||
int r, rw_flag, block_spec;
|
||||
int regular;
|
||||
@@ -140,7 +140,7 @@ PUBLIC int fs_readwrite(void)
|
||||
/*===========================================================================*
|
||||
* fs_breadwrite *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_breadwrite(void)
|
||||
int fs_breadwrite(void)
|
||||
{
|
||||
int r, rw_flag, completed;
|
||||
cp_grant_id_t gid;
|
||||
@@ -209,7 +209,7 @@ PUBLIC int fs_breadwrite(void)
|
||||
/*===========================================================================*
|
||||
* rw_chunk *
|
||||
*===========================================================================*/
|
||||
PRIVATE int rw_chunk(rip, position, off, chunk, left, rw_flag, gid,
|
||||
static int rw_chunk(rip, position, off, chunk, left, rw_flag, gid,
|
||||
buf_off, block_size, completed)
|
||||
register struct inode *rip; /* pointer to inode for file to be rd/wr */
|
||||
u64_t position; /* position within file to read or write */
|
||||
@@ -302,7 +302,7 @@ int *completed; /* number of bytes copied */
|
||||
/*===========================================================================*
|
||||
* read_map *
|
||||
*===========================================================================*/
|
||||
PUBLIC block_t read_map(rip, position)
|
||||
block_t read_map(rip, position)
|
||||
register struct inode *rip; /* ptr to inode to map from */
|
||||
off_t position; /* position in file whose blk wanted */
|
||||
{
|
||||
@@ -371,7 +371,7 @@ off_t position; /* position in file whose blk wanted */
|
||||
/*===========================================================================*
|
||||
* rd_indir *
|
||||
*===========================================================================*/
|
||||
PUBLIC zone_t rd_indir(bp, index)
|
||||
zone_t rd_indir(bp, index)
|
||||
struct buf *bp; /* pointer to indirect block */
|
||||
int index; /* index into *bp */
|
||||
{
|
||||
@@ -407,7 +407,7 @@ int index; /* index into *bp */
|
||||
/*===========================================================================*
|
||||
* rahead *
|
||||
*===========================================================================*/
|
||||
PRIVATE struct buf *rahead(rip, baseblock, position, bytes_ahead)
|
||||
static struct buf *rahead(rip, baseblock, position, bytes_ahead)
|
||||
register struct inode *rip; /* pointer to inode for file to be read */
|
||||
block_t baseblock; /* block at current position */
|
||||
u64_t position; /* position within file */
|
||||
@@ -536,7 +536,7 @@ unsigned bytes_ahead; /* bytes beyond position for immediate use */
|
||||
/*===========================================================================*
|
||||
* fs_getdents *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_getdents(void)
|
||||
int fs_getdents(void)
|
||||
{
|
||||
register struct inode *rip;
|
||||
int o, r, done;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/*===========================================================================*
|
||||
* estimate_blocks *
|
||||
*===========================================================================*/
|
||||
PRIVATE blkcnt_t estimate_blocks(struct inode *rip)
|
||||
static blkcnt_t estimate_blocks(struct inode *rip)
|
||||
{
|
||||
/* Return the number of 512-byte blocks used by this file. This includes space
|
||||
* used by data zones and indirect blocks (actually also zones). Reading in all
|
||||
@@ -41,7 +41,7 @@ PRIVATE blkcnt_t estimate_blocks(struct inode *rip)
|
||||
/*===========================================================================*
|
||||
* stat_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE int stat_inode(
|
||||
static int stat_inode(
|
||||
register struct inode *rip, /* pointer to inode to stat */
|
||||
endpoint_t who_e, /* Caller endpoint */
|
||||
cp_grant_id_t gid /* grant for the stat buf */
|
||||
@@ -88,7 +88,7 @@ PRIVATE int stat_inode(
|
||||
/*===========================================================================*
|
||||
* fs_fstatfs *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_fstatfs()
|
||||
int fs_fstatfs()
|
||||
{
|
||||
struct statfs st;
|
||||
struct inode *rip;
|
||||
@@ -110,7 +110,7 @@ PUBLIC int fs_fstatfs()
|
||||
/*===========================================================================*
|
||||
* fs_statvfs *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_statvfs()
|
||||
int fs_statvfs()
|
||||
{
|
||||
struct statvfs st;
|
||||
struct super_block *sp;
|
||||
@@ -143,7 +143,7 @@ PUBLIC int fs_statvfs()
|
||||
/*===========================================================================*
|
||||
* fs_stat *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_stat()
|
||||
int fs_stat()
|
||||
{
|
||||
register int r; /* return value */
|
||||
register struct inode *rip; /* target inode */
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/*===========================================================================*
|
||||
* count_free_bits *
|
||||
*===========================================================================*/
|
||||
PUBLIC bit_t count_free_bits(sp, map)
|
||||
bit_t count_free_bits(sp, map)
|
||||
struct super_block *sp; /* the filesystem to allocate from */
|
||||
int map; /* IMAP (inode map) or ZMAP (zone map) */
|
||||
{
|
||||
@@ -92,7 +92,7 @@ int map; /* IMAP (inode map) or ZMAP (zone map) */
|
||||
/*===========================================================================*
|
||||
* blockstats *
|
||||
*===========================================================================*/
|
||||
PUBLIC void blockstats(u32_t *blocks, u32_t *free, u32_t *used)
|
||||
void blockstats(u32_t *blocks, u32_t *free, u32_t *used)
|
||||
{
|
||||
struct super_block *sp;
|
||||
int scale;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/*===========================================================================*
|
||||
* alloc_bit *
|
||||
*===========================================================================*/
|
||||
PUBLIC bit_t alloc_bit(sp, map, origin)
|
||||
bit_t alloc_bit(sp, map, origin)
|
||||
struct super_block *sp; /* the filesystem to allocate from */
|
||||
int map; /* IMAP (inode map) or ZMAP (zone map) */
|
||||
bit_t origin; /* number of bit to start searching at */
|
||||
@@ -104,7 +104,7 @@ bit_t origin; /* number of bit to start searching at */
|
||||
/*===========================================================================*
|
||||
* free_bit *
|
||||
*===========================================================================*/
|
||||
PUBLIC void free_bit(sp, map, bit_returned)
|
||||
void free_bit(sp, map, bit_returned)
|
||||
struct super_block *sp; /* the filesystem to operate on */
|
||||
int map; /* IMAP (inode map) or ZMAP (zone map) */
|
||||
bit_t bit_returned; /* number of bit to insert into the map */
|
||||
@@ -150,7 +150,7 @@ bit_t bit_returned; /* number of bit to insert into the map */
|
||||
/*===========================================================================*
|
||||
* get_super *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct super_block *get_super(
|
||||
struct super_block *get_super(
|
||||
dev_t dev /* device number whose super_block is sought */
|
||||
)
|
||||
{
|
||||
@@ -167,7 +167,7 @@ PUBLIC struct super_block *get_super(
|
||||
/*===========================================================================*
|
||||
* get_block_size *
|
||||
*===========================================================================*/
|
||||
PUBLIC unsigned int get_block_size(dev_t dev)
|
||||
unsigned int get_block_size(dev_t dev)
|
||||
{
|
||||
if (dev == NO_DEV)
|
||||
panic("request for block size of NO_DEV");
|
||||
@@ -180,7 +180,7 @@ PUBLIC unsigned int get_block_size(dev_t dev)
|
||||
/*===========================================================================*
|
||||
* rw_super *
|
||||
*===========================================================================*/
|
||||
PRIVATE int rw_super(struct super_block *sp, int writing)
|
||||
static int rw_super(struct super_block *sp, int writing)
|
||||
{
|
||||
/* Read/write a superblock. */
|
||||
int r;
|
||||
@@ -225,7 +225,7 @@ PRIVATE int rw_super(struct super_block *sp, int writing)
|
||||
/*===========================================================================*
|
||||
* read_super *
|
||||
*===========================================================================*/
|
||||
PUBLIC int read_super(struct super_block *sp)
|
||||
int read_super(struct super_block *sp)
|
||||
{
|
||||
unsigned int magic;
|
||||
block_t offset;
|
||||
@@ -359,7 +359,7 @@ PUBLIC int read_super(struct super_block *sp)
|
||||
/*===========================================================================*
|
||||
* write_super *
|
||||
*===========================================================================*/
|
||||
PUBLIC int write_super(struct super_block *sp)
|
||||
int write_super(struct super_block *sp)
|
||||
{
|
||||
if(sp->s_rd_only)
|
||||
panic("can't write superblock of readonly filesystem");
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "buf.h"
|
||||
#include "super.h"
|
||||
|
||||
PUBLIC int (*fs_call_vec[])(void) = {
|
||||
int (*fs_call_vec[])(void) = {
|
||||
no_sys, /* 0 not used */
|
||||
no_sys, /* 1 */ /* Was: fs_getnode */
|
||||
fs_putnode, /* 2 */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/*===========================================================================*
|
||||
* fs_utime *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fs_utime()
|
||||
int fs_utime()
|
||||
{
|
||||
register struct inode *rip;
|
||||
register int r;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/*===========================================================================*
|
||||
* no_sys *
|
||||
*===========================================================================*/
|
||||
PUBLIC int no_sys()
|
||||
int no_sys()
|
||||
{
|
||||
/* Somebody has used an illegal system call number */
|
||||
printf("no_sys: invalid call %d\n", req_nr);
|
||||
@@ -18,7 +18,7 @@ PUBLIC int no_sys()
|
||||
/*===========================================================================*
|
||||
* conv2 *
|
||||
*===========================================================================*/
|
||||
PUBLIC unsigned conv2(norm, w)
|
||||
unsigned conv2(norm, w)
|
||||
int norm; /* TRUE if no swap, FALSE for byte swap */
|
||||
int w; /* promotion of 16-bit word to be swapped */
|
||||
{
|
||||
@@ -31,7 +31,7 @@ int w; /* promotion of 16-bit word to be swapped */
|
||||
/*===========================================================================*
|
||||
* conv4 *
|
||||
*===========================================================================*/
|
||||
PUBLIC long conv4(norm, x)
|
||||
long conv4(norm, x)
|
||||
int norm; /* TRUE if no swap, FALSE for byte swap */
|
||||
long x; /* 32-bit long to be byte swapped */
|
||||
{
|
||||
@@ -50,7 +50,7 @@ long x; /* 32-bit long to be byte swapped */
|
||||
/*===========================================================================*
|
||||
* clock_time *
|
||||
*===========================================================================*/
|
||||
PUBLIC time_t clock_time()
|
||||
time_t clock_time()
|
||||
{
|
||||
/* This routine returns the time in seconds since 1.1.1970. MINIX is an
|
||||
* astrophysically naive system that assumes the earth rotates at a constant
|
||||
@@ -71,7 +71,7 @@ PUBLIC time_t clock_time()
|
||||
/*===========================================================================*
|
||||
* mfs_min *
|
||||
*===========================================================================*/
|
||||
PUBLIC int min(unsigned int l, unsigned int r)
|
||||
int min(unsigned int l, unsigned int r)
|
||||
{
|
||||
if(r >= l) return(l);
|
||||
|
||||
@@ -82,7 +82,7 @@ PUBLIC int min(unsigned int l, unsigned int r)
|
||||
/*===========================================================================*
|
||||
* mfs_nul *
|
||||
*===========================================================================*/
|
||||
PUBLIC void mfs_nul_f(char *file, int line, char *str, unsigned int len,
|
||||
void mfs_nul_f(char *file, int line, char *str, unsigned int len,
|
||||
unsigned int maxlen)
|
||||
{
|
||||
if(len < maxlen && str[len-1] != '\0') {
|
||||
@@ -98,7 +98,7 @@ unsigned int maxlen)
|
||||
/*===========================================================================*
|
||||
* sanity_check *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sanitycheck(char *file, int line)
|
||||
void sanitycheck(char *file, int line)
|
||||
{
|
||||
MYASSERT(SELF_E > 0);
|
||||
if(superblock.s_dev != NO_DEV) {
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
#include "super.h"
|
||||
|
||||
|
||||
FORWARD void wr_indir(struct buf *bp, int index, zone_t zone);
|
||||
FORWARD int empty_indir(struct buf *, struct super_block *);
|
||||
static void wr_indir(struct buf *bp, int index, zone_t zone);
|
||||
static int empty_indir(struct buf *, struct super_block *);
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* write_map *
|
||||
*===========================================================================*/
|
||||
PUBLIC int write_map(rip, position, new_zone, op)
|
||||
int write_map(rip, position, new_zone, op)
|
||||
struct inode *rip; /* pointer to inode to be changed */
|
||||
off_t position; /* file address to be mapped */
|
||||
zone_t new_zone; /* zone # to be inserted */
|
||||
@@ -186,7 +186,7 @@ int op; /* special actions */
|
||||
/*===========================================================================*
|
||||
* wr_indir *
|
||||
*===========================================================================*/
|
||||
PRIVATE void wr_indir(bp, index, zone)
|
||||
static void wr_indir(bp, index, zone)
|
||||
struct buf *bp; /* pointer to indirect block */
|
||||
int index; /* index into *bp */
|
||||
zone_t zone; /* zone to write */
|
||||
@@ -211,7 +211,7 @@ zone_t zone; /* zone to write */
|
||||
/*===========================================================================*
|
||||
* empty_indir *
|
||||
*===========================================================================*/
|
||||
PRIVATE int empty_indir(bp, sb)
|
||||
static int empty_indir(bp, sb)
|
||||
struct buf *bp; /* pointer to indirect block */
|
||||
struct super_block *sb; /* superblock of device block resides on */
|
||||
{
|
||||
@@ -230,7 +230,7 @@ struct super_block *sb; /* superblock of device block resides on */
|
||||
/*===========================================================================*
|
||||
* clear_zone *
|
||||
*===========================================================================*/
|
||||
PUBLIC void clear_zone(rip, pos, flag)
|
||||
void clear_zone(rip, pos, flag)
|
||||
register struct inode *rip; /* inode to clear */
|
||||
off_t pos; /* points to block to clear */
|
||||
int flag; /* 1 if called by new_block, 0 otherwise */
|
||||
@@ -270,7 +270,7 @@ int flag; /* 1 if called by new_block, 0 otherwise */
|
||||
/*===========================================================================*
|
||||
* new_block *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct buf *new_block(rip, position)
|
||||
struct buf *new_block(rip, position)
|
||||
register struct inode *rip; /* pointer to inode */
|
||||
off_t position; /* file pointer */
|
||||
{
|
||||
@@ -325,7 +325,7 @@ off_t position; /* file pointer */
|
||||
/*===========================================================================*
|
||||
* zero_block *
|
||||
*===========================================================================*/
|
||||
PUBLIC void zero_block(bp)
|
||||
void zero_block(bp)
|
||||
register struct buf *bp; /* pointer to buffer to zero */
|
||||
{
|
||||
/* Zero a block. */
|
||||
|
||||
Reference in New Issue
Block a user