git: 0266a5d610be - main - pax: comment typo fixes from NetBSD / OpenBSD.

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Tue, 13 Sep 2022 15:59:51 UTC
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=0266a5d610be4fb546475934125a037ca5748184

commit 0266a5d610be4fb546475934125a037ca5748184
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2022-09-13 15:58:59 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2022-09-13 15:58:59 +0000

    pax: comment typo fixes from NetBSD / OpenBSD.
    
    Sponsored by:   Klara, Inc.
---
 bin/pax/ar_io.c     | 16 ++++++++--------
 bin/pax/ar_subs.c   |  5 +++--
 bin/pax/buf_subs.c  |  2 +-
 bin/pax/cpio.c      |  2 +-
 bin/pax/file_subs.c |  2 +-
 bin/pax/options.c   |  4 ++--
 bin/pax/pax.c       |  2 +-
 bin/pax/sel_subs.c  |  4 ++--
 bin/pax/tables.c    | 14 +++++++-------
 bin/pax/tar.c       | 12 ++++++------
 10 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c
index e00d6f0457f6..4128a91e3dc2 100644
--- a/bin/pax/ar_io.c
+++ b/bin/pax/ar_io.c
@@ -206,7 +206,7 @@ ar_open(const char *name)
 	 * set default blksz on read. APPNDs writes rdblksz on the last volume
 	 * On all new archive volumes, we shift to wrblksz (if the user
 	 * specified one, otherwise we will continue to use rdblksz). We
-	 * must to set blocksize based on what kind of device the archive is
+	 * must set blocksize based on what kind of device the archive is
 	 * stored.
 	 */
 	switch(artyp) {
@@ -286,7 +286,7 @@ ar_open(const char *name)
 		break;
 	default:
 		/*
-		 * should never happen, worse case, slow...
+		 * should never happen, worst case, slow...
 		 */
 		blksz = rdblksz = BLKMULT;
 		break;
@@ -533,10 +533,10 @@ ar_read(char *buf, int cnt)
 			io_ok = 1;
 			if (res != rdblksz) {
 				/*
-				 * Record size changed. If this is happens on
+				 * Record size changed. If this happens on
 				 * any record after the first, we probably have
 				 * a tape drive which has a fixed record size
-				 * we are getting multiple records in a single
+				 * (we are getting multiple records in a single
 				 * read). Watch out for record blocking that
 				 * violates pax spec (must be a multiple of
 				 * BLKMULT).
@@ -716,7 +716,7 @@ ar_rdsync(void)
 	struct mtop mb;
 
 	/*
-	 * Fail resync attempts at user request (done) or this is going to be
+	 * Fail resync attempts at user request (done) or if this is going to be
 	 * an update/append to an existing archive. If last i/o hit media end,
 	 * we need to go to the next volume not try a resync.
 	 */
@@ -922,12 +922,12 @@ ar_rev(off_t sksz)
 		break;
 	case ISTAPE:
 		/*
-	 	 * Calculate and move the proper number of PHYSICAL tape
+		 * Calculate and move the proper number of PHYSICAL tape
 		 * blocks. If the sksz is not an even multiple of the physical
 		 * tape size, we cannot do the move (this should never happen).
-		 * (We also cannot handler trailers spread over two vols).
+		 * (We also cannot handle trailers spread over two vols).
 		 * get_phys() also makes sure we are in front of the filemark.
-	 	 */
+		 */
 		if ((phyblk = get_phys()) <= 0) {
 			lstrval = -1;
 			return(-1);
diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
index b18dc3710942..68dbced6917d 100644
--- a/bin/pax/ar_subs.c
+++ b/bin/pax/ar_subs.c
@@ -202,7 +202,7 @@ extract(void)
 
 		/*
 		 * with -u or -D only extract when the archive member is newer
-		 * than the file with the same name in the file system (nos
+		 * than the file with the same name in the file system (no
 		 * test of being the same type is required).
 		 * NOTE: this test is done BEFORE name modifications as
 		 * specified by pax. this operation can be confusing to the
@@ -387,7 +387,8 @@ wr_archive(ARCHD *arcn, int is_app)
 		return;
 
 	/*
-	 * if this not append, and there are no files, we do no write a trailer
+	 * if this is not append, and there are no files, we do not write a
+	 * trailer
 	 */
 	wr_one = is_app;
 
diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c
index 6d50a280f29c..54c65150b467 100644
--- a/bin/pax/buf_subs.c
+++ b/bin/pax/buf_subs.c
@@ -199,7 +199,7 @@ cp_start(void)
  *	A major problem is rewriting this last record. For archives stored
  *	on disk files, this is trivial. However, many devices are really picky
  *	about the conditions under which they will allow a write to occur.
- *	Often devices restrict the conditions where writes can be made writes,
+ *	Often devices restrict the conditions where writes can be made,
  *	so it may not be feasible to append archives stored on all types of
  *	devices.
  * Return:
diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
index f16162efffe7..4aea03b47e34 100644
--- a/bin/pax/cpio.c
+++ b/bin/pax/cpio.c
@@ -149,7 +149,7 @@ com_rd(ARCHD *arcn)
 }
 
 /*
- * cpio_end_wr()
+ * cpio_endwr()
  *	write the special file with the name trailer in the proper format
  * Return:
  *	result of the write of the trailer from the cpio specific write func
diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
index 31fb9112c586..8976d055e238 100644
--- a/bin/pax/file_subs.c
+++ b/bin/pax/file_subs.c
@@ -623,7 +623,7 @@ chk_path( char *name, uid_t st_uid, gid_t st_gid)
  *	non-zero we force these times to be set even if the user did not
  *	request access and/or modification time preservation (this is also
  *	used by -t to reset access times).
- *	When ign is zero, only those times the user has asked for are set, the
+ *	When frc is zero, only those times the user has asked for are set, the
  *	other ones are left alone. We do not assume the un-documented feature
  *	of many lutimes() implementations that consider a 0 time value as a do
  *	not set request.
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 280a52a86d6c..698300087302 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -87,7 +87,7 @@ char *chdname;
 
 #define GZIP_CMD	"gzip"		/* command to run as gzip */
 #define COMPRESS_CMD	"compress"	/* command to run as compress */
-#define BZIP2_CMD	"bzip2"		/* command to run as gzip */
+#define BZIP2_CMD	"bzip2"		/* command to run as bzip2 */
 
 /*
  *	Format specific routine table - MUST BE IN SORTED ORDER BY NAME
@@ -308,7 +308,7 @@ pax_options(int argc, char **argv)
 					break;
 				case 'p':
 					/*
-					 * preserver file mode bits
+					 * preserve file mode bits
 					 */
 					pmode = 1;
 					break;
diff --git a/bin/pax/pax.c b/bin/pax/pax.c
index 4f7456f31a78..3c3ba345e3cb 100644
--- a/bin/pax/pax.c
+++ b/bin/pax/pax.c
@@ -392,7 +392,7 @@ gen_init(void)
 	/*
 	 * signal handling to reset stored directory times and modes. Since
 	 * we deal with broken pipes via failed writes we ignore it. We also
-	 * deal with any file size limit thorough failed writes. Cpu time
+	 * deal with any file size limit through failed writes. Cpu time
 	 * limits are caught and a cleanup is forced.
 	 */
 	if ((sigemptyset(&s_mask) < 0) || (sigaddset(&s_mask, SIGTERM) < 0) ||
diff --git a/bin/pax/sel_subs.c b/bin/pax/sel_subs.c
index f1e644a55ac9..12975f21946f 100644
--- a/bin/pax/sel_subs.c
+++ b/bin/pax/sel_subs.c
@@ -89,7 +89,7 @@ sel_chk(ARCHD *arcn)
  * User/group selection routines
  *
  * Routines to handle user selection of files based on the file uid/gid. To
- * add an entry, the user supplies either then name or the uid/gid starting with
+ * add an entry, the user supplies either the name or the uid/gid starting with
  * a # on the command line. A \# will escape the #.
  */
 
@@ -520,7 +520,7 @@ trng_match(ARCHD *arcn)
 
 /*
  * str_sec()
- *	Convert a time string in the format of [yy[mm[dd[hh]]]]mm[.ss] to gmt
+ *	Convert a time string in the format of [[[[yy[mm[dd[hh]mm[.ss] to gmt
  *	seconds. Tval already has current time loaded into it at entry.
  * Return:
  *	0 if converted ok, -1 otherwise
diff --git a/bin/pax/tables.c b/bin/pax/tables.c
index 97d430cb742f..06694727858a 100644
--- a/bin/pax/tables.c
+++ b/bin/pax/tables.c
@@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
  * large archives. These database routines carefully combine memory usage and
  * temporary file storage in ways which will not significantly impact runtime
  * performance while allowing the largest possible archives to be handled.
- * Trying to force the fit to the POSIX databases routines was not considered
+ * Trying to force the fit to the POSIX database routines was not considered
  * time well spent.
  */
 
@@ -311,9 +311,9 @@ lnk_end(void)
  * are stored in a scratch 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
- * where the actual name is stored. Since there are never any deletions to this
- * table, fragmentation of the scratch file is never an issue. Lookups seem to
- * not exhibit any locality at all (files in the database are rarely
+ * where the actual name is stored. Since there are never any deletions from
+ * this table, fragmentation of the scratch file is never an issue. Lookups
+ * seem to 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 scratch file space available to store the
  * path names.
@@ -880,14 +880,14 @@ map_dev(ARCHD *arcn, u_long dev_mask, u_long ino_mask)
 /*
  * directory access/mod time reset table routines (for directories READ by pax)
  *
- * The pax -t flag requires that access times of archive files to be the same
+ * The pax -t flag requires that access times of archive files be the same
  * before being read by pax. For regular files, access time is restored after
  * the file has been copied. This database provides the same functionality for
  * directories read during file tree traversal. Restoring directory access time
  * is more complex than files since directories may be read several times until
  * all the descendants in their subtree are visited by fts. Directory access
  * and modification times are stored during the fts pre-order visit (done
- * before any descendants in the subtree is visited) and restored after the
+ * before any descendants in the subtree are visited) and restored after the
  * fts post-order visit (after all the descendants have been visited). In the
  * case of premature exit from a subtree (like from the effects of -n), any
  * directory entries left in this database are reset during final cleanup
@@ -966,7 +966,7 @@ add_atdir(char *fname, dev_t dev, ino_t ino, time_t mtime, time_t atime)
 	 * 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
-	 * subtree before all the post-order visits have been made).
+	 * subtree before all the post-order visits have been made.
 	 */
 	indx = ((unsigned)ino) % A_TAB_SZ;
 	if ((pt = atab[indx]) != NULL) {
diff --git a/bin/pax/tar.c b/bin/pax/tar.c
index 41cdb1f0d2e7..36e4e9920f80 100644
--- a/bin/pax/tar.c
+++ b/bin/pax/tar.c
@@ -553,12 +553,12 @@ tar_wr(ARCHD *arcn)
 	}
 
 	/*
-	 * copy the data out of the ARCHD into the tar header based on the type
-	 * of the file. Remember many tar readers want the unused fields to be
-	 * padded with zero. We set the linkflag field (type), the linkname
-	 * (or zero if not used),the size, and set the padding (if any) to be
-	 * added after the file data (0 for all other types, as they only have
-	 * a header)
+	 * Copy the data out of the ARCHD into the tar header based on the type
+	 * of the file. Remember, many tar readers want all fields to be
+	 * padded with zero so we zero the header first.  We then set the
+	 * linkflag field (type), the linkname, the size, and set the padding
+	 * (if any) to be added after the file data (0 for all other types,
+	 * as they only have a header).
 	 */
 	hd = &hdblk;
 	l_strncpy(hd->name, arcn->name, sizeof(hd->name) - 1);