diff options
author | phk <phk@FreeBSD.org> | 2002-03-17 09:01:41 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-03-17 09:01:41 +0000 |
commit | 2f8232ce043d9dae70826765f882f8af0d52f02f (patch) | |
tree | d9c4def453d2939384be8df4a336b25a44c31295 | |
parent | f7794e6e1a979e5ca74d519266213d8044ff2945 (diff) | |
download | FreeBSD-src-2f8232ce043d9dae70826765f882f8af0d52f02f.zip FreeBSD-src-2f8232ce043d9dae70826765f882f8af0d52f02f.tar.gz |
Remove __P() and register.
Set WARNS=2
This is the beginning of a pre-UFS2 cleanup of newfs.
Sponsored by: DARPA, NAI Labs
-rw-r--r-- | sbin/newfs/Makefile | 2 | ||||
-rw-r--r-- | sbin/newfs/mkfs.c | 48 | ||||
-rw-r--r-- | sbin/newfs/newfs.c | 14 |
3 files changed, 32 insertions, 32 deletions
diff --git a/sbin/newfs/Makefile b/sbin/newfs/Makefile index 5fabadf..4228510 100644 --- a/sbin/newfs/Makefile +++ b/sbin/newfs/Makefile @@ -7,7 +7,7 @@ MAN= newfs.8 MOUNT= ${.CURDIR}/../mount CFLAGS+=-DFSIRAND -I${MOUNT} -WARNS= 0 +WARNS= 2 .PATH: ${MOUNT} diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index cb5a277..e8548f1 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -61,13 +61,13 @@ static const char rcsid[] = #ifndef STANDALONE #include <stdlib.h> #else -extern int atoi __P((char *)); -extern char * getenv __P((char *)); +extern int atoi (char *); +extern char * getenv (char *); #endif #ifdef FSIRAND -extern long random __P((void)); -extern void srandomdev __P((void)); +extern long random (void); +extern void srandomdev (void); #endif /* @@ -144,23 +144,23 @@ int randinit; daddr_t alloc(); long calcipg(); static int charsperline(); -void clrblock __P((struct fs *, unsigned char *, int)); -void fsinit __P((time_t)); -void initcg __P((int, time_t)); -int isblock __P((struct fs *, unsigned char *, int)); -void iput __P((struct dinode *, ino_t)); -int makedir __P((struct direct *, int)); -void rdfs __P((daddr_t, int, char *)); -void setblock __P((struct fs *, unsigned char *, int)); -void wtfs __P((daddr_t, int, char *)); -void wtfsflush __P((void)); +void clrblock (struct fs *, unsigned char *, int); +void fsinit (time_t); +void initcg (int, time_t); +int isblock (struct fs *, unsigned char *, int); +void iput (struct dinode *, ino_t); +int makedir (struct direct *, int); +void rdfs (daddr_t, int, char *); +void setblock (struct fs *, unsigned char *, int); +void wtfs (daddr_t, int, char *); +void wtfsflush (void); #ifndef STANDALONE #else -void free __P((char *)); -char * calloc __P((u_long, u_long)); -caddr_t malloc __P((u_long)); -caddr_t realloc __P((char *, u_long)); +void free (char *); +char * calloc (u_long, u_long); +caddr_t malloc (u_long); +caddr_t realloc (char *, u_long); #endif void @@ -169,7 +169,7 @@ mkfs(pp, fsys, fi, fo) char *fsys; int fi, fo; { - register long i, mincpc, mincpg, inospercg; + long i, mincpc, mincpg, inospercg; long cylno, rpos, blk, j, warn = 0; long used, mincpgcnt, bpcg; off_t usedb; @@ -699,7 +699,7 @@ initcg(cylno, utime) { daddr_t cbase, d, dlower, dupper, dmax, blkno; long i; - register struct csum *cs; + struct csum *cs; #ifdef FSIRAND long j; #endif @@ -951,7 +951,7 @@ fsinit(utime) */ int makedir(protodir, entries) - register struct direct *protodir; + struct direct *protodir; int entries; { char *cp; @@ -1066,8 +1066,8 @@ calcipg(cpg, bpcg, usedbp) */ void iput(ip, ino) - register struct dinode *ip; - register ino_t ino; + struct dinode *ip; + ino_t ino; { struct dinode buf[MAXINOPB]; daddr_t d; @@ -1105,7 +1105,7 @@ iput(ip, ino) */ caddr_t malloc(size) - register u_long size; + u_long size; { char *base, *i; static u_long pgsz; diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 8764a87..ff75555 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -205,18 +205,18 @@ int unlabeled; char device[MAXPATHLEN]; char *progname; -extern void mkfs __P((struct partition *, char *, int, int)); -static void usage __P((void)); -static void rewritelabel __P((char *s, int fd, register struct disklabel *lp)); +extern void mkfs (struct partition *, char *, int, int); +static void usage (void); +static void rewritelabel (char *s, int fd, register struct disklabel *lp); int main(argc, argv) int argc; char *argv[]; { - register int ch; - register struct partition *pp; - register struct disklabel *lp; + int ch; + struct partition *pp; + struct disklabel *lp; struct disklabel *getdisklabel(); struct partition oldpartition; struct stat st; @@ -578,7 +578,7 @@ void rewritelabel(s, fd, lp) char *s; int fd; - register struct disklabel *lp; + struct disklabel *lp; { #ifdef COMPAT if (unlabeled) |