diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-01 18:30:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-09-01 18:30:39 +0000 |
commit | a43ab78081569419e6c61ef03c154da56a667dd8 (patch) | |
tree | 9d27b3251a03c6298aa14827691ac2399227b0e5 /bin/pax | |
parent | 380f0870e4aafdd13a6050959648e2e735f2ea56 (diff) |
i am bored enough to fix terminal space/tab uglies
Diffstat (limited to 'bin/pax')
-rw-r--r-- | bin/pax/ar_io.c | 22 | ||||
-rw-r--r-- | bin/pax/ar_subs.c | 10 | ||||
-rw-r--r-- | bin/pax/buf_subs.c | 10 | ||||
-rw-r--r-- | bin/pax/file_subs.c | 8 | ||||
-rw-r--r-- | bin/pax/ftree.c | 6 | ||||
-rw-r--r-- | bin/pax/gen_subs.c | 12 | ||||
-rw-r--r-- | bin/pax/getoldopt.c | 6 | ||||
-rw-r--r-- | bin/pax/options.c | 14 | ||||
-rw-r--r-- | bin/pax/pat_rep.c | 16 | ||||
-rw-r--r-- | bin/pax/pax.c | 14 | ||||
-rw-r--r-- | bin/pax/tables.c | 30 | ||||
-rw-r--r-- | bin/pax/tar.c | 16 |
12 files changed, 82 insertions, 82 deletions
diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c index 5509d8c6610..ffda2463aab 100644 --- a/bin/pax/ar_io.c +++ b/bin/pax/ar_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_io.c,v 1.16 1997/07/25 18:58:21 mickey Exp $ */ +/* $OpenBSD: ar_io.c,v 1.17 1997/09/01 18:29:42 deraadt Exp $ */ /* $NetBSD: ar_io.c,v 1.5 1996/03/26 23:54:13 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ar_io.c,v 1.16 1997/07/25 18:58:21 mickey Exp $"; +static char rcsid[] = "$OpenBSD: ar_io.c,v 1.17 1997/09/01 18:29:42 deraadt Exp $"; #endif #endif /* not lint */ @@ -478,7 +478,7 @@ ar_set_wr() * will stop us if the archive containing the trailer was not written */ wr_trail = 0; - + /* * Add any device dependent code as required here */ @@ -612,7 +612,7 @@ ar_read(buf, cnt) else paxwarn(0, "End of archive volume %d reached", arvol); return(res); -} +} /* * ar_write() @@ -730,8 +730,8 @@ ar_write(buf, bsz) paxwarn(1,"Unable to append, trailer re-write failed. Quitting."); return(res); } - - if (res == 0) + + if (res == 0) paxwarn(0, "End of archive volume %d reached", arvol); else if (res < 0) syswarn(1, errno, "Failed write to archive volume: %d", arvol); @@ -811,7 +811,7 @@ ar_rdsync() if ((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) break; mpos = fsbz - (cpos % (off_t)fsbz); - if (lseek(arfd, mpos, SEEK_CUR) < 0) + if (lseek(arfd, mpos, SEEK_CUR) < 0) break; lstrval = 1; break; @@ -870,7 +870,7 @@ ar_fow(sksz, skipped) * number of physical blocks to skip (we do not know physical block * size at this point), so we must only read foward on tapes! */ - if (artyp != ISREG) + if (artyp != ISREG) return(0); /* @@ -918,7 +918,7 @@ ar_rev(sksz) { off_t cpos; struct mtop mb; - register int phyblk; + register int phyblk; /* * make sure we do not have try to reverse on a flawed archive @@ -928,7 +928,7 @@ ar_rev(sksz) switch(artyp) { case ISPIPE: - if (sksz <= 0) + if (sksz <= 0) break; /* * cannot go backwards on these critters @@ -1238,7 +1238,7 @@ ar_next() /* * we are to continue with the same device */ - if (ar_open(arcname) >= 0) + if (ar_open(arcname) >= 0) return(0); tty_prnt("Cannot re-open %s, try again\n", arcname); diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c index cb36d93b822..8727fdb751f 100644 --- a/bin/pax/ar_subs.c +++ b/bin/pax/ar_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_subs.c,v 1.11 1997/07/25 18:58:24 mickey Exp $ */ +/* $OpenBSD: ar_subs.c,v 1.12 1997/09/01 18:29:44 deraadt Exp $ */ /* $NetBSD: ar_subs.c,v 1.5 1995/03/21 09:07:06 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)ar_subs.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ar_subs.c,v 1.11 1997/07/25 18:58:24 mickey Exp $"; +static char rcsid[] = "$OpenBSD: ar_subs.c,v 1.12 1997/09/01 18:29:44 deraadt Exp $"; #endif #endif /* not lint */ @@ -915,7 +915,7 @@ copy() * try to create a hard link to the src file if requested * but make sure we are not trying to overwrite ourselves. */ - if (lflag) + if (lflag) res = cross_lnk(arcn); else res = chk_same(arcn); @@ -1022,7 +1022,7 @@ next_head(arcn) register int hsz; register int in_resync = 0; /* set when we are in resync mode */ int cnt = 0; /* counter for trailer function */ - + /* * set up initial conditions, we want a whole frmt->hsz block as we * have no data yet. @@ -1166,7 +1166,7 @@ get_arc() register int minhd = BLKMULT; char *hdend; int notice = 0; - + /* * find the smallest header size in all archive formats and then set up * to read the archive. diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c index f256c2d0826..ad5f78eb7b5 100644 --- a/bin/pax/buf_subs.c +++ b/bin/pax/buf_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf_subs.c,v 1.6 1997/07/25 18:58:25 mickey Exp $ */ +/* $OpenBSD: buf_subs.c,v 1.7 1997/09/01 18:29:46 deraadt Exp $ */ /* $NetBSD: buf_subs.c,v 1.5 1995/03/21 09:07:08 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: buf_subs.c,v 1.6 1997/07/25 18:58:25 mickey Exp $"; +static char rcsid[] = "$OpenBSD: buf_subs.c,v 1.7 1997/09/01 18:29:46 deraadt Exp $"; #endif #endif /* not lint */ @@ -105,7 +105,7 @@ wr_start() * archive that might be hard to read elsewhere. If all ok, we then * open the first archive volume */ - if (!wrblksz) + if (!wrblksz) wrblksz = frmt->bsz; if (wrblksz > MAXBLK) { paxwarn(1, "Write block size of %d too large, maximium is: %d", @@ -819,7 +819,7 @@ rd_wrfile(arcn, ofd, left) /* * if we failed from archive read, we do not want to skip */ - if ((size > 0L) && (*left == 0L)) + if ((size > 0L) && (*left == 0L)) return(-1); /* @@ -1028,7 +1028,7 @@ buf_flush(bufcnt) /* * write a block and check if it all went out ok */ - cnt = ar_write(buf, blksz); + cnt = ar_write(buf, blksz); if (cnt == blksz) { /* * the write went ok diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c index ab0b8b85290..2241c3885f1 100644 --- a/bin/pax/file_subs.c +++ b/bin/pax/file_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_subs.c,v 1.12 1997/07/25 18:58:29 mickey Exp $ */ +/* $OpenBSD: file_subs.c,v 1.13 1997/09/01 18:29:48 deraadt Exp $ */ /* $NetBSD: file_subs.c,v 1.4 1995/03/21 09:07:18 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: file_subs.c,v 1.12 1997/07/25 18:58:29 mickey Exp $"; +static char rcsid[] = "$OpenBSD: file_subs.c,v 1.13 1997/09/01 18:29:48 deraadt Exp $"; #endif #endif /* not lint */ @@ -582,7 +582,7 @@ unlnk_exist(name, type) */ if (rmdir(name) < 0) { if (type == PAX_DIR) - return(1); + return(1); syswarn(1,errno,"Unable to remove directory %s", name); return(-1); } @@ -898,7 +898,7 @@ file_write(fd, str, cnt, rem, isempt, sz, name) register char *end; register int wcnt; register char *st = str; - + /* * while we have data to process */ diff --git a/bin/pax/ftree.c b/bin/pax/ftree.c index 1694f6c9893..5dea2090be2 100644 --- a/bin/pax/ftree.c +++ b/bin/pax/ftree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftree.c,v 1.7 1997/07/25 18:58:30 mickey Exp $ */ +/* $OpenBSD: ftree.c,v 1.8 1997/09/01 18:29:49 deraadt Exp $ */ /* $NetBSD: ftree.c,v 1.4 1995/03/21 09:07:21 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ftree.c,v 1.7 1997/07/25 18:58:30 mickey Exp $"; +static char rcsid[] = "$OpenBSD: ftree.c,v 1.8 1997/09/01 18:29:49 deraadt Exp $"; #endif #endif /* not lint */ @@ -220,7 +220,7 @@ ftree_sel(arcn) * when file trees are supplied pax as args. The list is not used when * the trees are read from stdin. */ - if (ftcur != NULL) + if (ftcur != NULL) ftcur->refcnt = 1; /* diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c index 049cba22ff5..6ff16f0a6eb 100644 --- a/bin/pax/gen_subs.c +++ b/bin/pax/gen_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gen_subs.c,v 1.7 1997/07/25 18:58:31 mickey Exp $ */ +/* $OpenBSD: gen_subs.c,v 1.8 1997/09/01 18:29:51 deraadt Exp $ */ /* $NetBSD: gen_subs.c,v 1.5 1995/03/21 09:07:26 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)gen_subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.7 1997/07/25 18:58:31 mickey Exp $"; +static char rcsid[] = "$OpenBSD: gen_subs.c,v 1.8 1997/09/01 18:29:51 deraadt Exp $"; #endif #endif /* not lint */ @@ -313,7 +313,7 @@ ul_asc(val, str, len, base) { register char *pt; u_long digit; - + /* * WARNING str is not '\0' terminated by this routine */ @@ -328,7 +328,7 @@ ul_asc(val, str, len, base) while (pt >= str) { if ((digit = (val & 0xf)) < 10) *pt-- = '0' + (char)digit; - else + else *pt-- = 'a' + (char)(digit - 10); if ((val = (val >> 4)) == (u_long)0) break; @@ -427,7 +427,7 @@ uqd_asc(val, str, len, base) { register char *pt; u_quad_t digit; - + /* * WARNING str is not '\0' terminated by this routine */ @@ -442,7 +442,7 @@ uqd_asc(val, str, len, base) while (pt >= str) { if ((digit = (val & 0xf)) < 10) *pt-- = '0' + (char)digit; - else + else *pt-- = 'a' + (char)(digit - 10); if ((val = (val >> 4)) == (u_quad_t)0) break; diff --git a/bin/pax/getoldopt.c b/bin/pax/getoldopt.c index 3d5af2f00fe..7da7f85e1aa 100644 --- a/bin/pax/getoldopt.c +++ b/bin/pax/getoldopt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getoldopt.c,v 1.2 1996/06/23 14:20:36 deraadt Exp $ */ +/* $OpenBSD: getoldopt.c,v 1.3 1997/09/01 18:29:52 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /* @@ -11,7 +11,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.2 1996/06/23 14:20:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getoldopt.c,v 1.3 1997/09/01 18:29:52 deraadt Exp $"; #endif /* not lint */ #include <stdio.h> @@ -32,7 +32,7 @@ getoldopt(argc, argv, optstring) char *place; optarg = NULL; - + if (key == NULL) { /* First time */ if (argc < 2) return EOF; key = argv[1]; diff --git a/bin/pax/options.c b/bin/pax/options.c index 5f43ff5e861..fc378c84c02 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.29 1997/07/25 18:58:32 mickey Exp $ */ +/* $OpenBSD: options.c,v 1.30 1997/09/01 18:29:54 deraadt Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.29 1997/07/25 18:58:32 mickey Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.30 1997/09/01 18:29:54 deraadt Exp $"; #endif #endif /* not lint */ @@ -612,8 +612,8 @@ tar_options(argc, argv) * process option flags */ while ((c = getoldopt(argc, argv, - "b:cef:hmopruts:vwxzBC:HLOPXZ014578")) - != EOF) { + "b:cef:hmopruts:vwxzBC:HLOPXZ014578")) + != EOF) { switch(c) { case 'b': /* @@ -816,7 +816,7 @@ tar_options(argc, argv) default: { int sawpat = 0; - + while (*argv != NULL) { if (strcmp(*argv, "-C") == 0) { if(*++argv == NULL) @@ -833,9 +833,9 @@ tar_options(argc, argv) * if patterns were added, we are doing chdir() * on a file-by-file basis, else, just one * global chdir (if any) after opening input. - */ + */ if (sawpat > 0) - chdname = NULL; + chdname = NULL; } break; case ARCHIVE: diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c index ad4bbd9ea84..a93809f7436 100644 --- a/bin/pax/pat_rep.c +++ b/bin/pax/pat_rep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pat_rep.c,v 1.10 1997/07/25 18:58:34 mickey Exp $ */ +/* $OpenBSD: pat_rep.c,v 1.11 1997/09/01 18:29:56 deraadt Exp $ */ /* $NetBSD: pat_rep.c,v 1.4 1995/03/21 09:07:33 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.10 1997/07/25 18:58:34 mickey Exp $"; +static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.11 1997/09/01 18:29:56 deraadt Exp $"; #endif #endif /* not lint */ @@ -380,7 +380,7 @@ pat_sel(arcn) */ if (pt->pend != NULL) *pt->pend = '\0'; - + if ((pt->pstr = strdup(arcn->name)) == NULL) { paxwarn(1, "Pattern select out of memory"); if (pt->pend != NULL) @@ -405,7 +405,7 @@ pat_sel(arcn) if (*(pt->pstr + len) == '/') { *(pt->pstr + len) = '\0'; pt->plen = len; - } + } pt->flgs = DIR_MTCH | MTCH; arcn->pat = pt; return(0); @@ -1055,7 +1055,7 @@ rep_name(name, nlen, prnt) */ } while (pt->flgs & GLOB); - if (found) + if (found) break; /* @@ -1078,7 +1078,7 @@ rep_name(name, nlen, prnt) paxwarn(1,"Replacement name too long %s >> %s", name, nname); return(1); - } + } /* * inform the user of the result if wanted @@ -1087,7 +1087,7 @@ rep_name(name, nlen, prnt) if (*nname == '\0') (void)fprintf(stderr,"%s >> <empty string>\n", name); - else + else (void)fprintf(stderr,"%s >> %s\n", name, nname); } @@ -1095,7 +1095,7 @@ rep_name(name, nlen, prnt) * if empty inform the caller this file is to be skipped * otherwise copy the new name over the orig name and return */ - if (*nname == '\0') + if (*nname == '\0') return(1); *nlen = l_strncpy(name, nname, PAXPATHLEN + 1); name[PAXPATHLEN] = '\0'; diff --git a/bin/pax/pax.c b/bin/pax/pax.c index 47c4966bb1a..c5b55527f2b 100644 --- a/bin/pax/pax.c +++ b/bin/pax/pax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pax.c,v 1.10 1997/07/25 18:58:35 mickey Exp $ */ +/* $OpenBSD: pax.c,v 1.11 1997/09/01 18:29:58 deraadt Exp $ */ /* $NetBSD: pax.c,v 1.5 1996/03/26 23:54:20 mrg Exp $ */ /*- @@ -48,7 +48,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)pax.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: pax.c,v 1.10 1997/07/25 18:58:35 mickey Exp $"; +static char rcsid[] = "$OpenBSD: pax.c,v 1.11 1997/09/01 18:29:58 deraadt Exp $"; #endif #endif /* not lint */ @@ -390,27 +390,27 @@ gen_init() n_hand.sa_handler = sig_cleanup; if ((sigaction(SIGHUP, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGHUP, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGTERM, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGTERM, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGINT, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGINT, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGQUIT, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGQUIT, &o_hand, &o_hand) < 0)) goto out; if ((sigaction(SIGXCPU, &n_hand, &o_hand) < 0) && - (o_hand.sa_handler == SIG_IGN) && + (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGXCPU, &o_hand, &o_hand) < 0)) goto out; diff --git a/bin/pax/tables.c b/bin/pax/tables.c index 6be18476bcd..51221d159be 100644 --- a/bin/pax/tables.c +++ b/bin/pax/tables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tables.c,v 1.8 1997/07/25 18:58:37 mickey Exp $ */ +/* $OpenBSD: tables.c,v 1.9 1997/09/01 18:30:00 deraadt Exp $ */ /* $NetBSD: tables.c,v 1.4 1995/03/21 09:07:45 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tables.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: tables.c,v 1.8 1997/07/25 18:58:37 mickey Exp $"; +static char rcsid[] = "$OpenBSD: tables.c,v 1.9 1997/09/01 18:30:00 deraadt Exp $"; #endif #endif /* not lint */ @@ -89,7 +89,7 @@ static DEVT *chk_dev __P((dev_t, int)); /* * hard link table routines * - * The hard link table tries to detect hard links to files using the device and + * The hard link table tries to detect hard links to files using the device and * inode values. We do this when writing an archive, so we can tell the format * write routine that this file is a hard link to another file. The format * write routine then can store this file in whatever way it wants (as a hard @@ -338,10 +338,10 @@ lnk_end() * that this is one HUGE database. To save memory space, the actual file names * are stored in a scatch file and indexed by an in memory hash table. The * hash table is indexed by hashing the file path. The nodes in the table store - * the length of the filename and the lseek offset within the scratch file + * the length of the filename and the lseek offset within the scratch file * where the actual name is stored. Since there are never any deletions to this * table, fragmentation of the scratch file is never a issue. Lookups seem to - * not exhibit any locality at all (files in the database are rarely + * not exhibit any locality at all (files in the database are rarely * looked up more than once...). So caching is just a waste of memory. The * only limitation is the amount of scatch file space available to store the * path names. @@ -472,7 +472,7 @@ chk_ftime(arcn) */ pt->mtime = arcn->sb.st_mtime; return(0); - } + } /* * file is older */ @@ -497,7 +497,7 @@ chk_ftime(arcn) return(0); } syswarn(1, errno, "Failed write to file time table"); - } else + } else syswarn(1, errno, "Failed seek on file time table"); } else paxwarn(1, "File time table ran out of memory"); @@ -571,7 +571,7 @@ add_name(oname, onamelen, nname) * should never happen */ paxwarn(0, "No interactive rename table, links may fail\n"); - return(0); + return(0); } /* @@ -672,7 +672,7 @@ sub_name(oname, onamelen, onamesize) */ return; } - + /* * device/inode mapping table routines * (used with formats that store device and inodes fields) @@ -862,7 +862,7 @@ map_dev(arcn, dev_mask, ino_mask) return(0); /* * check for device and inode truncation, and extract the truncated - * bit pattern. + * bit pattern. */ if ((arcn->sb.st_dev & (dev_t)dev_mask) != arcn->sb.st_dev) ++trc_dev; @@ -1070,7 +1070,7 @@ add_atdir(fname, dev, ino, mtime, atime) return; /* - * make sure this directory is not already in the table, if so just + * make sure this directory is not already in the table, if so just * return (the older entry always has the correct time). The only * way this will happen is when the same subtree can be traversed by * different args to pax and the -n option is aborting fts out of a @@ -1239,7 +1239,7 @@ dir_start() * name is name of the directory, psb the stat buffer with the data in it, * frc_mode is a flag that says whether to force the setting of the mode * (ignoring the user set values for preserving file mode). Frc_mode is - * for the case where we created a file and found that the resulting + * for the case where we created a file and found that the resulting * directory was not writeable and the user asked for file modes to NOT * be preserved. (we have to preserve what was created by default, so we * have to force the setting at the end. this is stated explicitly in the @@ -1318,15 +1318,15 @@ proc_dir() * read the trailer, then the file name, if this fails * just give up. */ - if (lseek(dirfd, -((off_t)sizeof(dblk)), SEEK_CUR) < 0) + if (lseek(dirfd, -((off_t)sizeof(dblk)), SEEK_CUR) < 0) break; if (read(dirfd,(char *)&dblk, sizeof(dblk)) != sizeof(dblk)) break; - if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) + if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) break; if (read(dirfd, name, dblk.nlen) != dblk.nlen) break; - if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) + if (lseek(dirfd, dblk.npos, SEEK_SET) < 0) break; /* diff --git a/bin/pax/tar.c b/bin/pax/tar.c index 9e83f8ed883..6a4c3e00cca 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.11 1997/07/25 18:58:38 mickey Exp $ */ +/* $OpenBSD: tar.c,v 1.12 1997/09/01 18:30:03 deraadt Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: tar.c,v 1.11 1997/07/25 18:58:38 mickey Exp $"; +static char rcsid[] = "$OpenBSD: tar.c,v 1.12 1997/09/01 18:30:03 deraadt Exp $"; #endif #endif /* not lint */ @@ -186,7 +186,7 @@ ul_oct(val, str, len, term) #endif { register char *pt; - + /* * term selects the appropriate character(s) for the end of the string */ @@ -250,7 +250,7 @@ uqd_oct(val, str, len, term) #endif { register char *pt; - + /* * term selects the appropriate character(s) for the end of the string */ @@ -319,8 +319,8 @@ tar_chksm(blk, len) */ pt = blk; stop = blk + CHK_OFFSET; - while (pt < stop) - chksm += (u_long)(*pt++ & 0xff); + while (pt < stop) + chksm += (u_long)(*pt++ & 0xff); /* * move past the checksum field and keep going, spec counts the * checksum field as the sum of 8 blanks (which is pre-computed as @@ -331,7 +331,7 @@ tar_chksm(blk, len) pt += CHK_LEN; stop = blk + len; while (pt < stop) - chksm += (u_long)(*pt++ & 0xff); + chksm += (u_long)(*pt++ & 0xff); return(chksm); } @@ -1032,7 +1032,7 @@ ustar_wr(arcn) l_strncpy(hd->name, pt, sizeof(hd->name) - 1); hd->name[sizeof(hd->name) - 1] = '\0'; - /* + /* * set the fields in the header that are type dependent */ switch(arcn->type) { |