pax: comment typo fixes from NetBSD / OpenBSD.

Sponsored by:	Klara, Inc.
This commit is contained in:
Dag-Erling Smørgrav 2022-09-13 17:58:59 +02:00
parent 30c30e220a
commit 0266a5d610
10 changed files with 32 additions and 31 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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:

View file

@ -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

View file

@ -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.

View file

@ -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;

View file

@ -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) ||

View file

@ -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

View file

@ -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) {

View file

@ -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);