Home | History | Annotate | Download | only in pax

Lines Matching refs:ARCHIVE

75  * Routines which deal directly with the archive I/O device/file.
80 #define AR_MODE (O_WRONLY | O_CREAT | O_TRUNC) /* mode for archive */
85 static int arfd = -1; /* archive file descriptor */
86 static int artyp = ISREG; /* archive type: file/FIFO/tape */
87 static int arvol = 1; /* archive volume number */
92 static struct stat arsb; /* stat of archive device at open */
96 const char *arcname; /* printable name of archive */
122 * Opens the next archive volume. Determines the type of the device and
123 * sets up block sizes as required by the archive device and the format.
175 case ARCHIVE:
219 tty_warn(0, "Cannot write an archive on top of a directory %s",
250 act = -ARCHIVE;
252 case ARCHIVE:
267 if (act == ARCHIVE) {
275 * On all new archive volumes, we shift to wrblksz (if the user
277 * must set blocksize based on what kind of device the archive is
343 * When we cannot find a match, we may have a flawed archive.
368 * closes archive device, increments volume number, and prints i/o summary
382 * Close archive file. This may take a LONG while on tapes (we may be
397 * if nothing was written to the archive (and we created it), we remove
439 * and we have already determined the archive format.
450 * Print out a summary of I/O for this archive volume.
471 * drain any archive format independent padding from an archive read
474 * reading an archive once a format dependent trailer is detected).
513 * For all archive devices we are already positioned at the place we want
526 * will stop us if the archive containing the trailer was not written
536 * Ok we have an archive in a regular file. If we were rewriting a
542 syswarn(1, errno, "Unable to truncate archive file");
550 * check if the last volume in the archive allows appends. We cannot check
552 * volumes in a single archive have to be of the same type...
562 "Cannot append to an archive obtained from a pipe.");
717 * read up to a specified number of bytes from the archive into the
798 syswarn(1, errno, "Failed read on archive volume %d", arvol);
800 tty_warn(0, "End of archive volume %d reached", arvol);
806 * Write a specified number of bytes in supplied buffer to the archive
812 * error in the archive occurred.
822 * do not allow pax to create a "bad" archive. Once a write fails on
823 * an archive volume prevent further writes to it.
835 * writes that may violate pax spec to the next archive volume.
847 * in size by forcing the runt record to next archive
880 "Write failed, archive is write protected.");
901 * if this is a block aligned archive format, we may have a bad archive
904 * archive readers will likely fail. if the format is not block
905 * aligned, the user may be lucky (and the archive is ok).
924 tty_warn(0, "End of archive volume %d reached", arvol);
926 syswarn(1, errno, "Failed write to archive volume: %d", arvol);
929 "WARNING: partial archive write. Archive MAY BE FLAWED");
931 tty_warn(1,"WARNING: partial archive write. Archive IS FLAWED");
937 * Try to move past a bad spot on a flawed archive as needed to continue
955 * an update/append to a existing archive. if last i/o hit media end,
961 if ((act == APPND) || (act == ARCHIVE)) {
962 tty_warn(1, "Cannot allow updates to an archive with flaws.");
1024 * cannot recover on these archive device types
1030 tty_warn(1, "Unable to recover from an archive read failure.");
1033 tty_warn(0, "Attempting to recover from an archive read failure.");
1039 * Move the I/O position within the archive forward the specified number of
1077 * figure out where we are in the archive
1097 syswarn(1, errno, "Forward positioning operation on archive failed");
1104 * move the i/o position within the archive backwards the specified byte
1108 * last records (the trailer) of an archive (APPEND).
1123 * make sure we do not have try to reverse on a flawed archive
1150 * First we figure out where we are in the archive.
1154 "Unable to obtain current archive byte offset");
1160 * we may try to go backwards past the start when the archive
1162 * multi-volume archive, we need to go to the end of the
1179 syswarn(1, errno, "Unable to seek archive backwards");
1334 syswarn(1, errno, "Cannot determine archive tape blocksize.");
1411 * prompts the user for the next volume in this archive. For some devices
1412 * we may allow the media to be changed. Otherwise a new archive is
1441 tty_prnt("\nATTENTION! %s archive volume change required.\n",
1455 tty_prnt("%s ready for archive tape volume: %d\n",
1459 tty_prnt("%s ready for archive volume: %d\n",
1464 if ((act == ARCHIVE) || (act == APPND))
1505 tty_prnt("Switching to a different archive\n");
1515 tty_warn(1, "Unexpected EOF on archive file");
1518 tty_prnt("Ready for archive volume: %d\n", arvol);
1522 * have to go to a different archive
1525 tty_prnt("Input archive name or \".\" to quit %s.\n", argv0);
1526 tty_prnt("Archive name > ");
1549 * try to open new archive
1559 tty_warn(0, "Cannot save archive name.");
1703 * when necessary to write a file read from the archive, but this
1711 * M: number of files in archive