diff options
author | iedowse <iedowse@FreeBSD.org> | 2001-11-17 00:06:55 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2001-11-17 00:06:55 +0000 |
commit | aea807046e13a0ba51a55e0c3b13ef5ccc5e0d99 (patch) | |
tree | eb26d9bff15b68c77a04d0793e9c7c2bf68bf231 | |
parent | b15a1b598ddc032cba50d49e7b69793e4d4cfbb4 (diff) | |
download | FreeBSD-src-aea807046e13a0ba51a55e0c3b13ef5ccc5e0d99.zip FreeBSD-src-aea807046e13a0ba51a55e0c3b13ef5ccc5e0d99.tar.gz |
Zap a number of #ifdef sunos blocks, and all of the `register'
keywords.
-rw-r--r-- | sbin/dump/dump.h | 14 | ||||
-rw-r--r-- | sbin/dump/dumprmt.c | 21 | ||||
-rw-r--r-- | sbin/dump/itime.c | 19 | ||||
-rw-r--r-- | sbin/dump/main.c | 18 | ||||
-rw-r--r-- | sbin/dump/optr.c | 18 | ||||
-rw-r--r-- | sbin/dump/tape.c | 24 | ||||
-rw-r--r-- | sbin/dump/traverse.c | 41 |
7 files changed, 53 insertions, 102 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h index cbca3f2..f265886 100644 --- a/sbin/dump/dump.h +++ b/sbin/dump/dump.h @@ -195,17 +195,3 @@ extern int errno; #ifndef _PATH_FSTAB #define _PATH_FSTAB "/etc/fstab" #endif - -#ifdef sunos -extern char *calloc(); -extern char *malloc(); -extern long atol(); -extern char *strcpy(); -extern char *strncpy(); -extern char *strcat(); -extern time_t time(); -extern void endgrent(); -extern void exit(); -extern off_t lseek(); -extern const char *strerror(); -#endif diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index ffc009d..c424903 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -43,13 +43,8 @@ static const char rcsid[] = #include <sys/mtio.h> #include <sys/socket.h> #include <sys/time.h> -#ifdef sunos -#include <sys/vnode.h> -#include <ufs/inode.h> -#else #include <ufs/ufs/dinode.h> -#endif #include <netinet/in.h> #include <netinet/in_systm.h> @@ -141,8 +136,8 @@ rmtconnaborted() void rmtgetconn() { - register char *cp; - register const char *rmt; + char *cp; + const char *rmt; static struct servent *sp = NULL; static struct passwd *pwd = NULL; char *tuser; @@ -209,8 +204,8 @@ static int okname(cp0) char *cp0; { - register char *cp; - register int c; + char *cp; + int c; for (cp = cp0; *cp; cp++) { c = *cp; @@ -319,8 +314,8 @@ struct mtget mts; struct mtget * rmtstatus() { - register int i; - register char *cp; + int i; + char *cp; if (rmtstate != TS_OPEN) return (NULL); @@ -356,7 +351,7 @@ static int rmtreply(cmd) char *cmd; { - register char *cp; + char *cp; char code[30], emsg[BUFSIZ]; rmtgets(code, sizeof (code)); @@ -397,7 +392,7 @@ rmtgets(line, len) char *line; int len; { - register char *cp = line; + char *cp = line; while (len > 1) { *cp = rmtgetb(); diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index 593edee..3b622b2 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -42,15 +42,8 @@ static const char rcsid[] = #include <sys/param.h> #include <sys/queue.h> #include <sys/time.h> -#ifdef sunos -#include <sys/vnode.h> -#include <ufs/fsdir.h> -#include <ufs/inode.h> -#include <ufs/fs.h> -#else #include <ufs/ufs/dinode.h> -#endif #include <protocols/dumprestore.h> @@ -114,8 +107,8 @@ static void readdumptimes(df) FILE *df; { - register int i; - register struct dumptime *dtwalk; + int i; + struct dumptime *dtwalk; for (;;) { dtwalk = (struct dumptime *)calloc(1, sizeof (struct dumptime)); @@ -140,8 +133,8 @@ readdumptimes(df) void getdumptime() { - register struct dumpdates *ddp; - register int i; + struct dumpdates *ddp; + int i; char *fname; fname = disk; @@ -173,8 +166,8 @@ void putdumptime() { FILE *df; - register struct dumpdates *dtwalk; - register int i; + struct dumpdates *dtwalk; + int i; int fd; char *fname; char *tmsg; diff --git a/sbin/dump/main.c b/sbin/dump/main.c index eb9c232..9cc8a7e 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -48,15 +48,9 @@ static const char rcsid[] = #include <sys/param.h> #include <sys/stat.h> #include <sys/time.h> -#ifdef sunos -#include <sys/vnode.h> -#include <ufs/inode.h> -#include <ufs/fs.h> -#else #include <ufs/ufs/dinode.h> #include <ufs/ffs/fs.h> -#endif #include <protocols/dumprestore.h> @@ -98,12 +92,12 @@ main(argc, argv) char *argv[]; { struct stat sb; - register ino_t ino; - register int dirty; - register struct dinode *dp; - register struct fstab *dt; - register char *map; - register int ch; + ino_t ino; + int dirty; + struct dinode *dp; + struct fstab *dt; + char *map; + int ch; int i, anydirskipped, bflag = 0, Tflag = 0, honorlevel = 1; ino_t maxino; char *tmsg; diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 74f261c..1c53cdd 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -289,9 +289,9 @@ quit(fmt, va_alist) struct fstab * allocfsent(fs) - register struct fstab *fs; + struct fstab *fs; { - register struct fstab *new; + struct fstab *new; new = (struct fstab *)malloc(sizeof (*fs)); if (new == NULL || @@ -314,8 +314,8 @@ static SLIST_HEAD(, pfstab) table; void getfstab() { - register struct fstab *fs; - register struct pfstab *pf; + struct fstab *fs; + struct pfstab *pf; if (setfsent() == 0) { msg("Can't open %s for dump table information: %s\n", @@ -346,8 +346,8 @@ struct fstab * fstabsearch(key) char *key; { - register struct pfstab *pf; - register struct fstab *fs; + struct pfstab *pf; + struct fstab *fs; char *rn; SLIST_FOREACH(pf, &table, pf_list) { @@ -377,9 +377,9 @@ void lastdump(arg) char arg; /* w ==> just what to do; W ==> most recent dumps */ { - register int i; - register struct fstab *dt; - register struct dumpdates *dtwalk; + int i; + struct fstab *dt; + struct dumpdates *dtwalk; char *lastname, *date; int dumpme; time_t tnow; diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index 28ced90..807239a 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -43,15 +43,9 @@ static const char rcsid[] = #include <sys/socket.h> #include <sys/time.h> #include <sys/wait.h> -#ifdef sunos -#include <sys/vnode.h> -#include <ufs/fs.h> -#include <ufs/inode.h> -#else #include <ufs/ufs/dinode.h> #include <ufs/ffs/fs.h> -#endif #include <protocols/dumprestore.h> @@ -396,8 +390,8 @@ close_rewind() void rollforward() { - register struct req *p, *q, *prev; - register struct slave *tslp; + struct req *p, *q, *prev; + struct slave *tslp; int i, size, savedtapea, got; union u_spcl *ntb, *otb; tslp = &slaves[SLAVES]; @@ -517,11 +511,7 @@ startnewtape(top) int status; int waitpid; char *p; -#ifdef sunos - void (*interrupt_save)(); -#else sig_t interrupt_save; -#endif interrupt_save = signal(SIGINT, SIG_IGN); parentpid = getpid(); @@ -689,7 +679,7 @@ void enslave() { int cmd[2]; - register int i, j; + int i, j; master = getpid(); @@ -732,7 +722,7 @@ enslave() void killall() { - register int i; + int i; for (i = 0; i < SLAVES; i++) if (slaves[i].pid > 0) { @@ -750,10 +740,10 @@ killall() */ static void doslave(cmd, slave_number) - register int cmd; + int cmd; int slave_number; { - register int nread; + int nread; int nextslave, size, wrote, eot_count; /* @@ -775,7 +765,7 @@ doslave(cmd, slave_number) * Get list of blocks to dump, read the blocks into tape buffer */ while ((nread = atomic(read, cmd, (char *)slp->req, reqsiz)) == reqsiz) { - register struct req *p = slp->req; + struct req *p = slp->req; for (trecno = 0; trecno < ntrec; trecno += p->count, p += p->count) { diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index f428e16..6ed98ad 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -41,17 +41,10 @@ static const char rcsid[] = #include <sys/param.h> #include <sys/stat.h> -#ifdef sunos -#include <sys/vnode.h> -#include <ufs/fs.h> -#include <ufs/fsdir.h> -#include <ufs/inode.h> -#else #include <ufs/ufs/dir.h> #include <ufs/ufs/dinode.h> #include <ufs/ffs/fs.h> -#endif #include <protocols/dumprestore.h> @@ -89,7 +82,7 @@ static int searchdir __P((ino_t ino, daddr_t blkno, long size, long filesize, */ long blockest(dp) - register struct dinode *dp; + struct dinode *dp; { long blkest, sizeest; @@ -145,9 +138,9 @@ mapfiles(maxino, tapesize) ino_t maxino; long *tapesize; { - register int mode; - register ino_t ino; - register struct dinode *dp; + int mode; + ino_t ino; + struct dinode *dp; int anydirskipped = 0; for (ino = ROOTINO; ino < maxino; ino++) { @@ -202,10 +195,10 @@ mapdirs(maxino, tapesize) ino_t maxino; long *tapesize; { - register struct dinode *dp; - register int i, isdir, nodump; - register char *map; - register ino_t ino; + struct dinode *dp; + int i, isdir, nodump; + char *map; + ino_t ino; struct dinode di; long filesize; int ret, change = 0; @@ -279,7 +272,7 @@ dirindir(ino, blkno, ind_level, filesize, tapesize, nodump) int nodump; { int ret = 0; - register int i; + int i; daddr_t idblk[MAXNINDIR]; bread(fsbtodb(sblock, blkno), (char *)idblk, (int)sblock->fs_bsize); @@ -315,14 +308,14 @@ static int searchdir(ino, blkno, size, filesize, tapesize, nodump) ino_t ino; daddr_t blkno; - register long size; + long size; long filesize; long *tapesize; int nodump; { - register struct direct *dp; - register struct dinode *ip; - register long loc, ret = 0; + struct direct *dp; + struct dinode *ip; + long loc, ret = 0; char dblk[MAXBSIZE]; bread(fsbtodb(sblock, blkno), dblk, (int)size); @@ -378,7 +371,7 @@ searchdir(ino, blkno, size, filesize, tapesize, nodump) */ void dumpino(dp, ino) - register struct dinode *dp; + struct dinode *dp; ino_t ino; { int ind_level, cnt; @@ -493,7 +486,7 @@ blksout(blkp, frags, ino) int frags; ino_t ino; { - register daddr_t *bp; + daddr_t *bp; int i, j, count, blks, tbperdb; blks = howmany(frags * sblock->fs_fsize, TP_BSIZE); @@ -531,7 +524,7 @@ dumpmap(map, type, ino) int type; ino_t ino; { - register int i; + int i; char *cp; spcl.c_type = type; @@ -548,7 +541,7 @@ void writeheader(ino) ino_t ino; { - register int32_t sum, cnt, *lp; + int32_t sum, cnt, *lp; spcl.c_inumber = ino; spcl.c_magic = NFS_MAGIC; |