From 097901480708ff310a223599f6e2f44a8d0ac816 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Thu, 23 Jun 2005 11:07:31 +0000 Subject: [PATCH] Renamed some types Uid_t, Gid_t, Mode_t, etc. for perl5. More space for synctree. --- commands/i386/mtools-3.9.7/sysincludes.h | 2 +- commands/simple/Makefile | 2 +- commands/simple/chmod.c | 6 ++---- commands/simple/diff.c | 5 ++++- commands/simple/fsck.c | 8 ++------ commands/simple/fsck1.c | 8 ++------ commands/simple/mkdir.c | 6 ++---- commands/simple/mkfifo.c | 6 ++---- include/fcntl.h | 2 +- include/grp.h | 2 +- include/pwd.h | 2 +- include/stdint.h | 1 + include/sys/stat.h | 8 ++++---- include/sys/types.h | 9 +++++---- include/unistd.h | 10 +++++----- lib/other/getgrent.c | 2 +- lib/other/getpwent.c | 2 +- lib/posix/_chmod.c | 2 +- lib/posix/_chown.c | 4 ++-- lib/posix/_creat.c | 2 +- lib/posix/_mkdir.c | 2 +- lib/posix/_mkfifo.c | 2 +- lib/posix/_mknod.c | 2 +- lib/posix/_open.c | 2 +- lib/posix/_setuid.c | 2 +- lib/posix/_umask.c | 2 +- lib/stdio/fopen.c | 2 +- lib/stdio/freopen.c | 2 +- servers/fs/filedes.c | 10 ++-------- servers/fs/inode.c | 4 +--- servers/fs/open.c | 21 +++++++-------------- servers/fs/protect.c | 4 +--- servers/fs/proto.h | 8 ++++---- 33 files changed, 63 insertions(+), 89 deletions(-) diff --git a/commands/i386/mtools-3.9.7/sysincludes.h b/commands/i386/mtools-3.9.7/sysincludes.h index 3fb47fe57..4f69cedd2 100755 --- a/commands/i386/mtools-3.9.7/sysincludes.h +++ b/commands/i386/mtools-3.9.7/sysincludes.h @@ -55,7 +55,7 @@ #endif #ifdef OS_Minix -typedef unsigned char *caddr_t; +/* typedef unsigned char *caddr_t; */ #endif diff --git a/commands/simple/Makefile b/commands/simple/Makefile index 16989f100..4e67ecd6e 100755 --- a/commands/simple/Makefile +++ b/commands/simple/Makefile @@ -691,7 +691,7 @@ sync: sync.c synctree: synctree.c $(CCLD) -o $@ -wo $? - @install -S 32kw $@ + install -S 64kw $@ sysenv: sysenv.c $(CCLD) -o $@ -wo $? diff --git a/commands/simple/chmod.c b/commands/simple/chmod.c index afc040c96..f37f718ab 100755 --- a/commands/simple/chmod.c +++ b/commands/simple/chmod.c @@ -40,14 +40,12 @@ struct stat st; char path[PATH_MAX + 1]; _PROTOTYPE(int main, (int argc, char **argv)); -_PROTOTYPE(mode_t parsemode, (char *symbolic, Mode_t oldmode)); +_PROTOTYPE(mode_t parsemode, (char *symbolic, mode_t oldmode)); _PROTOTYPE(int do_change, (char *name)); _PROTOTYPE(void usage, (void)); /* Parse a P1003.2 4.7.7-conformant symbolic mode. */ -mode_t parsemode(symbolic, oldmode) -char *symbolic; -mode_t oldmode; +mode_t parsemode(char *symbolic, mode_t oldmode) { mode_t who, mask, newmode, tmpmask; char action; diff --git a/commands/simple/diff.c b/commands/simple/diff.c index 4764ed595..5102e2244 100755 --- a/commands/simple/diff.c +++ b/commands/simple/diff.c @@ -31,6 +31,7 @@ *----------------------------------------------------------------------------- */ +#include #include #include /* NAME_MAX for maximal filename length */ #include /* string manipulation */ @@ -870,7 +871,8 @@ FILE *file1, *file2; /* The corresponding file-pointers */ inputfp = popen(buff, "r"); if (!inputfp) { - fprintf(stderr, "Can't execute diff %s %s\n", old, new); + fprintf(stderr, "Can't execute diff %s %s, popen failed with %s\n", + old, new, strerror(errno)); exit(2); } preoldend = -1000; @@ -993,6 +995,7 @@ FILE *file1, *file2; /* The corresponding file-pointers */ prenewend = newend; } } + fprintf(stderr, "pipe fd is %d\n", fileno(inputfp)); status = pclose(inputfp); if (status != 0) diffs++; if (!WIFEXITED(status) || WEXITSTATUS(status) > 1) severe_error = 1; diff --git a/commands/simple/fsck.c b/commands/simple/fsck.c index 5337393ef..fc3148b46 100755 --- a/commands/simple/fsck.c +++ b/commands/simple/fsck.c @@ -190,7 +190,7 @@ _PROTOTYPE(void getcount, (void)); _PROTOTYPE(void counterror, (Ino_t ino)); _PROTOTYPE(void chkcount, (void)); _PROTOTYPE(void freecount, (void)); -_PROTOTYPE(void printperm, (Mode_t mode, int shift, int special, int overlay)); +_PROTOTYPE(void printperm, (mode_t mode, int shift, int special, int overlay)); _PROTOTYPE(void list, (Ino_t ino, d_inode *ip)); _PROTOTYPE(int Remove, (dir_struct *dp)); _PROTOTYPE(void make_printable_name, (char *dst, char *src, int n)); @@ -843,11 +843,7 @@ void freecount() } /* Print the inode permission bits given by mode and shift. */ -void printperm(mode, shift, special, overlay) -mode_t mode; -int shift; -int special; -int overlay; +void printperm(mode_t mode, int shift, int special, int overlay) { if (mode >> shift & R_BIT) putchar('r'); diff --git a/commands/simple/fsck1.c b/commands/simple/fsck1.c index 732496084..b4ed89744 100755 --- a/commands/simple/fsck1.c +++ b/commands/simple/fsck1.c @@ -173,7 +173,7 @@ _PROTOTYPE(void getcount, (void)); _PROTOTYPE(void counterror, (Ino_t ino)); _PROTOTYPE(void chkcount, (void)); _PROTOTYPE(void freecount, (void)); -_PROTOTYPE(void printperm, (Mode_t mode, int shift, int special, int overlay)); +_PROTOTYPE(void printperm, (mode_t mode, int shift, int special, int overlay)); _PROTOTYPE(void list, (Ino_t ino, d_inode *ip)); _PROTOTYPE(int Remove, (dir_struct *dp)); _PROTOTYPE(void make_printable_name, (char *dst, char *src, int n)); @@ -779,11 +779,7 @@ void freecount() } /* Print the inode permission bits given by mode and shift. */ -void printperm(mode, shift, special, overlay) -mode_t mode; -int shift; -int special; -int overlay; +void printperm(mode_t mode, int shift, int special, int overlay) { if (mode >> shift & R_BIT) putchar('r'); diff --git a/commands/simple/mkdir.c b/commands/simple/mkdir.c index 38f366053..9044966a1 100755 --- a/commands/simple/mkdir.c +++ b/commands/simple/mkdir.c @@ -38,15 +38,13 @@ mode_t u_mask; struct stat st; _PROTOTYPE(int main, (int argc, char **argv)); -_PROTOTYPE(mode_t parsemode, (char *symbolic, Mode_t oldmode)); +_PROTOTYPE(mode_t parsemode, (char *symbolic, mode_t oldmode)); _PROTOTYPE(int makepath, (char *fordir)); _PROTOTYPE(int makedir, (char *dirname)); _PROTOTYPE(void usage, (void)); /* Parse a P1003.2 4.7.7-conformant symbolic mode. */ -mode_t parsemode(symbolic, oldmode) -char *symbolic; -mode_t oldmode; +mode_t parsemode(char *symbolic, mode_t oldmode) { mode_t who, mask, newmode, tmpmask; char action; diff --git a/commands/simple/mkfifo.c b/commands/simple/mkfifo.c index 8900dc52c..d117f551c 100755 --- a/commands/simple/mkfifo.c +++ b/commands/simple/mkfifo.c @@ -29,13 +29,11 @@ mode_t u_mask; _PROTOTYPE(int main, (int argc, char **argv)); -_PROTOTYPE(mode_t parsemode, (char *symbolic, Mode_t oldmode)); +_PROTOTYPE(mode_t parsemode, (char *symbolic, mode_t oldmode)); _PROTOTYPE(void usage, (void)); /* Parse a P1003.2 4.7.7-conformant symbolic mode. */ -mode_t parsemode(symbolic, oldmode) -char *symbolic; -mode_t oldmode; +mode_t parsemode(char *symbolic, mode_t oldmode) { mode_t who, mask, newmode, tmpmask; char action; diff --git a/include/fcntl.h b/include/fcntl.h index 06f6f89c6..7e65e4e06 100755 --- a/include/fcntl.h +++ b/include/fcntl.h @@ -61,7 +61,7 @@ struct flock { /* Function Prototypes. */ -_PROTOTYPE( int creat, (const char *_path, Mode_t _mode) ); +_PROTOTYPE( int creat, (const char *_path, _mnx_Mode_t _mode) ); _PROTOTYPE( int fcntl, (int _filedes, int _cmd, ...) ); _PROTOTYPE( int open, (const char *_path, int _oflag, ...) ); diff --git a/include/grp.h b/include/grp.h index cd307ddce..88a93d7c4 100755 --- a/include/grp.h +++ b/include/grp.h @@ -15,7 +15,7 @@ struct group { }; /* Function Prototypes. */ -_PROTOTYPE( struct group *getgrgid, (Gid_t _gid) ); +_PROTOTYPE( struct group *getgrgid, (_mnx_Gid_t _gid) ); _PROTOTYPE( struct group *getgrnam, (const char *_name) ); #ifdef _MINIX diff --git a/include/pwd.h b/include/pwd.h index 48eb04f3d..ee343b0ef 100755 --- a/include/pwd.h +++ b/include/pwd.h @@ -22,7 +22,7 @@ struct passwd { /* Function Prototypes. */ _PROTOTYPE( struct passwd *getpwnam, (const char *_name) ); -_PROTOTYPE( struct passwd *getpwuid, (Uid_t _uid) ); +_PROTOTYPE( struct passwd *getpwuid, (_mnx_Uid_t _uid) ); #ifdef _MINIX _PROTOTYPE( void endpwent, (void) ); diff --git a/include/stdint.h b/include/stdint.h index 0e7a402b0..e9b27807f 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -13,6 +13,7 @@ #ifndef _MINIX__TYPES_H #include #endif +#include #if (_WORD_SIZE != 2 && _WORD_SIZE != 4) || \ (_PTR_SIZE != _WORD_SIZE && _PTR_SIZE != 2*_WORD_SIZE) diff --git a/include/sys/stat.h b/include/sys/stat.h index 28dbb5a5c..f586e459f 100755 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -65,12 +65,12 @@ struct stat { #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) /* is a sym link */ /* Function Prototypes. */ -_PROTOTYPE( int chmod, (const char *_path, Mode_t _mode) ); +_PROTOTYPE( int chmod, (const char *_path, _mnx_Mode_t _mode) ); _PROTOTYPE( int fstat, (int _fildes, struct stat *_buf) ); -_PROTOTYPE( int mkdir, (const char *_path, Mode_t _mode) ); -_PROTOTYPE( int mkfifo, (const char *_path, Mode_t _mode) ); +_PROTOTYPE( int mkdir, (const char *_path, _mnx_Mode_t _mode) ); +_PROTOTYPE( int mkfifo, (const char *_path, _mnx_Mode_t _mode) ); _PROTOTYPE( int stat, (const char *_path, struct stat *_buf) ); -_PROTOTYPE( mode_t umask, (Mode_t _cmask) ); +_PROTOTYPE( mode_t umask, (_mnx_Mode_t _cmask) ); /* Open Group Base Specifications Issue 6 (not complete) */ _PROTOTYPE( int lstat, (const char *_path, struct stat *_buf) ); diff --git a/include/sys/types.h b/include/sys/types.h index 6bbf5b4cb..2f91c10be 100755 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -81,9 +81,9 @@ typedef struct { u32_t _[2]; } u64_t; * is clearer. */ typedef int Dev_t; -typedef int Gid_t; +typedef int _mnx_Gid_t; typedef int Nlink_t; -typedef int Uid_t; +typedef int _mnx_Uid_t; typedef int U8_t; typedef unsigned long U32_t; typedef int I8_t; @@ -105,14 +105,14 @@ typedef unsigned long Ino_t; typedef unsigned int Zone1_t; typedef unsigned int Bitchunk_t; typedef unsigned int U16_t; -typedef unsigned int Mode_t; +typedef unsigned int _mnx_Mode_t; #else /* _EM_WSIZE == 4, or _EM_WSIZE undefined */ /*typedef int Ino_t; Ino_t is now 32 bits */ typedef int Zone1_t; typedef int Bitchunk_t; typedef int U16_t; -typedef int Mode_t; +typedef int _mnx_Mode_t; #endif /* _EM_WSIZE == 2, etc */ @@ -124,5 +124,6 @@ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; +typedef char *caddr_t; #endif /* _TYPES_H */ diff --git a/include/unistd.h b/include/unistd.h index 0630bbd26..e4d34e7fd 100755 --- a/include/unistd.h +++ b/include/unistd.h @@ -85,7 +85,7 @@ _PROTOTYPE( void _exit, (int _status) ); _PROTOTYPE( int access, (const char *_path, int _amode) ); _PROTOTYPE( unsigned int alarm, (unsigned int _seconds) ); _PROTOTYPE( int chdir, (const char *_path) ); -_PROTOTYPE( int chown, (const char *_path, Uid_t _owner, Gid_t _group) ); +_PROTOTYPE( int chown, (const char *_path, _mnx_Uid_t _owner, _mnx_Gid_t _group) ); _PROTOTYPE( int close, (int _fd) ); _PROTOTYPE( char *ctermid, (char *_s) ); _PROTOTYPE( char *cuserid, (char *_s) ); @@ -118,10 +118,10 @@ _PROTOTYPE( int pause, (void) ); _PROTOTYPE( int pipe, (int _fildes[2]) ); _PROTOTYPE( ssize_t read, (int _fd, void *_buf, size_t _n) ); _PROTOTYPE( int rmdir, (const char *_path) ); -_PROTOTYPE( int setgid, (Gid_t _gid) ); +_PROTOTYPE( int setgid, (_mnx_Gid_t _gid) ); _PROTOTYPE( int setpgid, (pid_t _pid, pid_t _pgid) ); _PROTOTYPE( pid_t setsid, (void) ); -_PROTOTYPE( int setuid, (Uid_t _uid) ); +_PROTOTYPE( int setuid, (_mnx_Uid_t _uid) ); _PROTOTYPE( unsigned int sleep, (unsigned int _seconds) ); _PROTOTYPE( long sysconf, (int _name) ); _PROTOTYPE( pid_t tcgetpgrp, (int _fd) ); @@ -139,8 +139,8 @@ _PROTOTYPE( int symlink, (const char *path1, const char *path2) ); #endif _PROTOTYPE( int brk, (char *_addr) ); _PROTOTYPE( int chroot, (const char *_name) ); -_PROTOTYPE( int mknod, (const char *_name, Mode_t _mode, Dev_t _addr) ); -_PROTOTYPE( int mknod4, (const char *_name, Mode_t _mode, Dev_t _addr, +_PROTOTYPE( int mknod, (const char *_name, _mnx_Mode_t _mode, Dev_t _addr) ); +_PROTOTYPE( int mknod4, (const char *_name, _mnx_Mode_t _mode, Dev_t _addr, long _size) ); _PROTOTYPE( char *mktemp, (char *_template) ); _PROTOTYPE( int mount, (char *_spec, char *_name, int _flag) ); diff --git a/lib/other/getgrent.c b/lib/other/getgrent.c index 2ee524bbc..63931e5bd 100755 --- a/lib/other/getgrent.c +++ b/lib/other/getgrent.c @@ -127,7 +127,7 @@ struct group *getgrent(void) } } -struct group *getgrgid(Gid_t gid) +struct group *getgrgid(_mnx_Gid_t gid) /* Return the group file entry belonging to the user-id. */ { struct group *gr; diff --git a/lib/other/getpwent.c b/lib/other/getpwent.c index b6c74b6d4..f13fbe99a 100755 --- a/lib/other/getpwent.c +++ b/lib/other/getpwent.c @@ -120,7 +120,7 @@ struct passwd *getpwent(void) } } -struct passwd *getpwuid(Uid_t uid) +struct passwd *getpwuid(_mnx_Uid_t uid) /* Return the password file entry belonging to the user-id. */ { struct passwd *pw; diff --git a/lib/posix/_chmod.c b/lib/posix/_chmod.c index efbf248c9..0f731b68f 100755 --- a/lib/posix/_chmod.c +++ b/lib/posix/_chmod.c @@ -4,7 +4,7 @@ PUBLIC int chmod(name, mode) _CONST char *name; -Mode_t mode; +_mnx_Mode_t mode; { message m; diff --git a/lib/posix/_chown.c b/lib/posix/_chown.c index 9b261f6e2..2baf966e6 100755 --- a/lib/posix/_chown.c +++ b/lib/posix/_chown.c @@ -5,8 +5,8 @@ PUBLIC int chown(name, owner, grp) _CONST char *name; -Uid_t owner; -Gid_t grp; +_mnx_Uid_t owner; +_mnx_Gid_t grp; { message m; diff --git a/lib/posix/_creat.c b/lib/posix/_creat.c index ab797b107..b4f475848 100755 --- a/lib/posix/_creat.c +++ b/lib/posix/_creat.c @@ -4,7 +4,7 @@ PUBLIC int creat(name, mode) _CONST char *name; -Mode_t mode; +_mnx_Mode_t mode; { message m; diff --git a/lib/posix/_mkdir.c b/lib/posix/_mkdir.c index da3aae8cc..ea6dab33a 100755 --- a/lib/posix/_mkdir.c +++ b/lib/posix/_mkdir.c @@ -5,7 +5,7 @@ PUBLIC int mkdir(name, mode) _CONST char *name; -Mode_t mode; +_mnx_Mode_t mode; { message m; diff --git a/lib/posix/_mkfifo.c b/lib/posix/_mkfifo.c index 78d4a632f..012c5d567 100755 --- a/lib/posix/_mkfifo.c +++ b/lib/posix/_mkfifo.c @@ -6,7 +6,7 @@ PUBLIC int mkfifo(name, mode) _CONST char *name; -Mode_t mode; +_mnx_Mode_t mode; { return mknod(name, mode | S_IFIFO, (Dev_t) 0); } diff --git a/lib/posix/_mknod.c b/lib/posix/_mknod.c index c08beee13..6c221306f 100755 --- a/lib/posix/_mknod.c +++ b/lib/posix/_mknod.c @@ -6,7 +6,7 @@ PUBLIC int mknod(name, mode, dev) _CONST char *name; -Mode_t mode; +_mnx_Mode_t mode; Dev_t dev; { message m; diff --git a/lib/posix/_open.c b/lib/posix/_open.c index 45dd409c9..cf5ea4c20 100755 --- a/lib/posix/_open.c +++ b/lib/posix/_open.c @@ -19,7 +19,7 @@ int flags; if (flags & O_CREAT) { m.m1_i1 = strlen(name) + 1; m.m1_i2 = flags; - m.m1_i3 = va_arg(argp, Mode_t); + m.m1_i3 = va_arg(argp, _mnx_Mode_t); m.m1_p1 = (char *) name; } else { _loadname(name, &m); diff --git a/lib/posix/_setuid.c b/lib/posix/_setuid.c index 92411437d..3dd3c70fb 100755 --- a/lib/posix/_setuid.c +++ b/lib/posix/_setuid.c @@ -3,7 +3,7 @@ #include PUBLIC int setuid(usr) -Uid_t usr; +_mnx_Uid_t usr; { message m; diff --git a/lib/posix/_umask.c b/lib/posix/_umask.c index 87e93bc01..c41f9757c 100755 --- a/lib/posix/_umask.c +++ b/lib/posix/_umask.c @@ -3,7 +3,7 @@ #include PUBLIC mode_t umask(complmode) -Mode_t complmode; +_mnx_Mode_t complmode; { message m; diff --git a/lib/stdio/fopen.c b/lib/stdio/fopen.c index cf3637687..915dcb2c6 100755 --- a/lib/stdio/fopen.c +++ b/lib/stdio/fopen.c @@ -39,7 +39,7 @@ #define O_APPEND 0x040 int _open(const char *path, int flags); -int _creat(const char *path, Mode_t mode); +int _creat(const char *path, _mnx_Mode_t mode); int _close(int d); FILE * diff --git a/lib/stdio/freopen.c b/lib/stdio/freopen.c index 5cea4870c..c237bfaf6 100755 --- a/lib/stdio/freopen.c +++ b/lib/stdio/freopen.c @@ -24,7 +24,7 @@ #define O_APPEND 0x040 int _open(const char *path, int flags); -int _creat(const char *path, Mode_t mode); +int _creat(const char *path, _mnx_Mode_t mode); int _close(int d); FILE * diff --git a/servers/fs/filedes.c b/servers/fs/filedes.c index 739fdd2ed..6f4a277b1 100644 --- a/servers/fs/filedes.c +++ b/servers/fs/filedes.c @@ -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 diff --git a/servers/fs/inode.c b/servers/fs/inode.c index 80caa1b66..cdef41bc2 100644 --- a/servers/fs/inode.c +++ b/servers/fs/inode.c @@ -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. */ diff --git a/servers/fs/open.c b/servers/fs/open.c index cb00b496b..9c93a13a1 100644 --- a/servers/fs/open.c +++ b/servers/fs/open.c @@ -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 diff --git a/servers/fs/protect.c b/servers/fs/protect.c index cbed88849..6c3bdb644 100644 --- a/servers/fs/protect.c +++ b/servers/fs/protect.c @@ -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 diff --git a/servers/fs/proto.h b/servers/fs/proto.h index f7e10ba24..ac6248f3c 100644 --- a/servers/fs/proto.h +++ b/servers/fs/proto.h @@ -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 */ -- 2.44.0