Small cleanup of dead and/or redundant code.
This commit is contained in:
parent
b6bb75963b
commit
0aceb25535
|
@ -43,11 +43,8 @@ PUBLIC int main(int argc, char *argv[])
|
||||||
error = OK;
|
error = OK;
|
||||||
caller_uid = -1; /* To trap errors */
|
caller_uid = -1; /* To trap errors */
|
||||||
caller_gid = -1;
|
caller_gid = -1;
|
||||||
|
|
||||||
/* This must be a regular VFS request. */
|
|
||||||
assert(src == VFS_PROC_NR && !unmountdone);
|
|
||||||
|
|
||||||
req_nr = fs_m_in.m_type;
|
req_nr = fs_m_in.m_type;
|
||||||
|
|
||||||
if (req_nr < VFS_BASE) {
|
if (req_nr < VFS_BASE) {
|
||||||
fs_m_in.m_type += VFS_BASE;
|
fs_m_in.m_type += VFS_BASE;
|
||||||
req_nr = fs_m_in.m_type;
|
req_nr = fs_m_in.m_type;
|
||||||
|
@ -154,9 +151,9 @@ message *m_in; /* pointer to message */
|
||||||
do {
|
do {
|
||||||
if ((r = sef_receive(ANY, m_in)) != OK) /* wait for message */
|
if ((r = sef_receive(ANY, m_in)) != OK) /* wait for message */
|
||||||
panic("sef_receive failed: %d", r);
|
panic("sef_receive failed: %d", r);
|
||||||
src = fs_m_in.m_source;
|
src = m_in->m_source;
|
||||||
|
|
||||||
if(src == FS_PROC_NR) {
|
if(src == VFS_PROC_NR) {
|
||||||
if(unmountdone)
|
if(unmountdone)
|
||||||
printf("MFS: unmounted: unexpected message from FS\n");
|
printf("MFS: unmounted: unexpected message from FS\n");
|
||||||
else
|
else
|
||||||
|
@ -166,7 +163,7 @@ message *m_in; /* pointer to message */
|
||||||
printf("MFS: unexpected source %d\n", src);
|
printf("MFS: unexpected source %d\n", src);
|
||||||
} while(!srcok);
|
} while(!srcok);
|
||||||
|
|
||||||
assert((src == FS_PROC_NR && !unmountdone));
|
assert((src == VFS_PROC_NR && !unmountdone));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
* wipe_inode: erase some fields of a newly allocated inode
|
* wipe_inode: erase some fields of a newly allocated inode
|
||||||
* free_inode: mark an inode as available for a new file
|
* free_inode: mark an inode as available for a new file
|
||||||
* update_times: update atime, ctime, and mtime
|
* update_times: update atime, ctime, and mtime
|
||||||
* dup_inode: indicate that someone else is using an inode table entry
|
|
||||||
* find_inode: retrieve pointer to inode in inode cache
|
* find_inode: retrieve pointer to inode in inode cache
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -314,20 +313,6 @@ struct inode *rip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
|
||||||
* dup_inode *
|
|
||||||
*===========================================================================*/
|
|
||||||
PUBLIC 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
|
|
||||||
* the inode pointer is already known.
|
|
||||||
*/
|
|
||||||
|
|
||||||
ip->i_count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* update_times *
|
* update_times *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
|
|
|
@ -40,9 +40,8 @@ PUBLIC int main(int argc, char *argv[])
|
||||||
error = OK;
|
error = OK;
|
||||||
caller_uid = -1; /* To trap errors */
|
caller_uid = -1; /* To trap errors */
|
||||||
caller_gid = -1;
|
caller_gid = -1;
|
||||||
|
|
||||||
assert(src == VFS_PROC_NR); /* Otherwise this must be VFS talking */
|
|
||||||
req_nr = fs_m_in.m_type;
|
req_nr = fs_m_in.m_type;
|
||||||
|
|
||||||
if (req_nr < VFS_BASE) {
|
if (req_nr < VFS_BASE) {
|
||||||
fs_m_in.m_type += VFS_BASE;
|
fs_m_in.m_type += VFS_BASE;
|
||||||
req_nr = fs_m_in.m_type;
|
req_nr = fs_m_in.m_type;
|
||||||
|
@ -135,15 +134,13 @@ message *m_in; /* pointer to message */
|
||||||
do {
|
do {
|
||||||
if ((r = sef_receive(ANY, m_in)) != OK) /* wait for message */
|
if ((r = sef_receive(ANY, m_in)) != OK) /* wait for message */
|
||||||
panic("sef_receive failed: %d", r);
|
panic("sef_receive failed: %d", r);
|
||||||
src = fs_m_in.m_source;
|
src = m_in->m_source;
|
||||||
|
|
||||||
if(src == VFS_PROC_NR) {
|
if(src == VFS_PROC_NR) {
|
||||||
srcok = 1; /* Normal FS request. */
|
srcok = 1; /* Normal FS request. */
|
||||||
} else
|
} else
|
||||||
printf("PFS: unexpected source %d\n", src);
|
printf("PFS: unexpected source %d\n", src);
|
||||||
} while(!srcok);
|
} while(!srcok);
|
||||||
|
|
||||||
assert( src == VFS_PROC_NR );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
|
|
||||||
struct buf {
|
|
||||||
/* Data portion of the buffer. */
|
|
||||||
union fsdata_u *bp;
|
|
||||||
|
|
||||||
/* Header portion of the buffer. */
|
|
||||||
struct buf *b_next; /* used to link all free bufs in a chain */
|
|
||||||
struct buf *b_prev; /* used to link all free bufs the other way */
|
|
||||||
struct buf *b_hash; /* used to link bufs on hash chains */
|
|
||||||
block_t b_blocknr; /* block number of its (minor) device */
|
|
||||||
dev_t b_dev; /* major | minor device where block resides */
|
|
||||||
char b_dirt; /* CLEAN or DIRTY */
|
|
||||||
char b_count; /* number of users of this buffer */
|
|
||||||
int b_bytes; /* Number of bytes allocated in bp */
|
|
||||||
};
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ PUBLIC int do_pipe()
|
||||||
|
|
||||||
/* Create a named pipe inode on PipeFS */
|
/* Create a named pipe inode on PipeFS */
|
||||||
r = req_newnode(PFS_PROC_NR, fp->fp_effuid, fp->fp_effgid, I_NAMED_PIPE,
|
r = req_newnode(PFS_PROC_NR, fp->fp_effuid, fp->fp_effgid, I_NAMED_PIPE,
|
||||||
(dev_t) 0, &res);
|
NO_DEV, &res);
|
||||||
|
|
||||||
if (r != OK) {
|
if (r != OK) {
|
||||||
rfp->fp_filp[fil_des[0]] = NIL_FILP;
|
rfp->fp_filp[fil_des[0]] = NIL_FILP;
|
||||||
|
|
Loading…
Reference in a new issue