Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5.
More space for synctree.
This commit is contained in:
@@ -14,11 +14,7 @@
|
||||
/*===========================================================================*
|
||||
* get_fd *
|
||||
*===========================================================================*/
|
||||
PUBLIC int get_fd(start, bits, k, fpt)
|
||||
int start; /* start of search (used for F_DUPFD) */
|
||||
mode_t bits; /* mode of the file to be created (RWX bits) */
|
||||
int *k; /* place to return file descriptor */
|
||||
struct filp **fpt; /* place to return filp slot */
|
||||
PUBLIC int get_fd(int start, mode_t bits, int *k, struct filp **fpt)
|
||||
{
|
||||
/* Look for a free file descriptor and a free filp slot. Fill in the mode word
|
||||
* in the latter, but don't claim either one yet, since the open() or creat()
|
||||
@@ -78,9 +74,7 @@ int fild; /* file descriptor */
|
||||
/*===========================================================================*
|
||||
* find_filp *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct filp *find_filp(rip, bits)
|
||||
register struct inode *rip; /* inode referred to by the filp to be found */
|
||||
Mode_t bits; /* mode of the filp to be found (RWX bits) */
|
||||
PUBLIC struct filp *find_filp(register struct inode *rip, mode_t bits)
|
||||
{
|
||||
/* Find a filp slot that refers to the inode 'rip' in a way as described
|
||||
* by the mode bit 'bits'. Used for determining whether somebody is still
|
||||
|
||||
+1
-3
@@ -102,9 +102,7 @@ register struct inode *rip; /* pointer to inode to be released */
|
||||
/*===========================================================================*
|
||||
* alloc_inode *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct inode *alloc_inode(dev, bits)
|
||||
dev_t dev; /* device on which to allocate the inode */
|
||||
mode_t bits; /* mode of the inode */
|
||||
PUBLIC struct inode *alloc_inode(dev_t dev, mode_t bits)
|
||||
{
|
||||
/* Allocate a free inode on 'dev', and return a pointer to it. */
|
||||
|
||||
|
||||
+7
-14
@@ -28,9 +28,9 @@
|
||||
|
||||
PRIVATE char mode_map[] = {R_BIT, W_BIT, R_BIT|W_BIT, 0};
|
||||
|
||||
FORWARD _PROTOTYPE( int common_open, (int oflags, Mode_t omode) );
|
||||
FORWARD _PROTOTYPE( int pipe_open, (struct inode *rip,Mode_t bits,int oflags));
|
||||
FORWARD _PROTOTYPE( struct inode *new_node, (char *path, Mode_t bits,
|
||||
FORWARD _PROTOTYPE( int common_open, (int oflags, mode_t omode) );
|
||||
FORWARD _PROTOTYPE( int pipe_open, (struct inode *rip,mode_t bits,int oflags));
|
||||
FORWARD _PROTOTYPE( struct inode *new_node, (char *path, mode_t bits,
|
||||
zone_t z0) );
|
||||
|
||||
|
||||
@@ -75,9 +75,7 @@ PUBLIC int do_open()
|
||||
/*===========================================================================*
|
||||
* common_open *
|
||||
*===========================================================================*/
|
||||
PRIVATE int common_open(oflags, omode)
|
||||
register int oflags;
|
||||
mode_t omode;
|
||||
PRIVATE int common_open(register int oflags, mode_t omode)
|
||||
{
|
||||
/* Common code from do_creat and do_open. */
|
||||
|
||||
@@ -202,10 +200,7 @@ mode_t omode;
|
||||
/*===========================================================================*
|
||||
* new_node *
|
||||
*===========================================================================*/
|
||||
PRIVATE struct inode *new_node(path, bits, z0)
|
||||
char *path; /* pointer to path name */
|
||||
mode_t bits; /* mode of the new inode */
|
||||
zone_t z0; /* zone number 0 for new inode */
|
||||
PRIVATE struct inode *new_node(char *path, mode_t bits, zone_t z0)
|
||||
{
|
||||
/* New_node() is called by common_open(), do_mknod(), and do_mkdir().
|
||||
* In all cases it allocates a new inode, makes a directory entry for it on
|
||||
@@ -267,10 +262,8 @@ zone_t z0; /* zone number 0 for new inode */
|
||||
/*===========================================================================*
|
||||
* pipe_open *
|
||||
*===========================================================================*/
|
||||
PRIVATE int pipe_open(rip, bits, oflags)
|
||||
register struct inode *rip;
|
||||
register mode_t bits;
|
||||
register int oflags;
|
||||
PRIVATE int pipe_open(register struct inode *rip, register mode_t bits,
|
||||
register int oflags)
|
||||
{
|
||||
/* This function is called from common_open. It checks if
|
||||
* there is at least one reader/writer pair for the pipe, if not
|
||||
|
||||
@@ -140,9 +140,7 @@ PUBLIC int do_access()
|
||||
/*===========================================================================*
|
||||
* forbidden *
|
||||
*===========================================================================*/
|
||||
PUBLIC int forbidden(rip, access_desired)
|
||||
register struct inode *rip; /* pointer to inode to be checked */
|
||||
mode_t access_desired; /* RWX bits */
|
||||
PUBLIC 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
|
||||
|
||||
+4
-4
@@ -50,12 +50,12 @@ _PROTOTYPE( void map_controllers, (void) );
|
||||
_PROTOTYPE( int map_driver, (int major, int proc_nr, int dev_style) );
|
||||
|
||||
/* filedes.c */
|
||||
_PROTOTYPE( struct filp *find_filp, (struct inode *rip, Mode_t bits) );
|
||||
_PROTOTYPE( int get_fd, (int start, Mode_t bits, int *k, struct filp **fpt) );
|
||||
_PROTOTYPE( struct filp *find_filp, (struct inode *rip, mode_t bits) );
|
||||
_PROTOTYPE( int get_fd, (int start, mode_t bits, int *k, struct filp **fpt) );
|
||||
_PROTOTYPE( struct filp *get_filp, (int fild) );
|
||||
|
||||
/* inode.c */
|
||||
_PROTOTYPE( struct inode *alloc_inode, (Dev_t dev, Mode_t bits) );
|
||||
_PROTOTYPE( struct inode *alloc_inode, (dev_t dev, mode_t bits) );
|
||||
_PROTOTYPE( void dup_inode, (struct inode *ip) );
|
||||
_PROTOTYPE( void free_inode, (Dev_t dev, Ino_t numb) );
|
||||
_PROTOTYPE( struct inode *get_inode, (Dev_t dev, int numb) );
|
||||
@@ -128,7 +128,7 @@ _PROTOTYPE( int do_access, (void) );
|
||||
_PROTOTYPE( int do_chmod, (void) );
|
||||
_PROTOTYPE( int do_chown, (void) );
|
||||
_PROTOTYPE( int do_umask, (void) );
|
||||
_PROTOTYPE( int forbidden, (struct inode *rip, Mode_t access_desired) );
|
||||
_PROTOTYPE( int forbidden, (struct inode *rip, mode_t access_desired) );
|
||||
_PROTOTYPE( int read_only, (struct inode *ip) );
|
||||
|
||||
/* read.c */
|
||||
|
||||
Reference in New Issue
Block a user