#include <sys/types.h>#include <sys/ioctl.h>#include <sys/mtio.h>#include <sys/stat.h>#include <sys/wait.h>#include <errno.h>#include <fcntl.h>#include <signal.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include "pax.h"#include "options.h"#include "extern.h"Include dependency graph for ar_io.c:

Go to the source code of this file.
Defines | |
| #define | DMOD 0666 |
| #define | EXT_MODE O_RDONLY |
| #define | AR_MODE (O_WRONLY | O_CREAT | O_TRUNC) |
| #define | APP_MODE O_RDWR |
Functions | |
| static int | get_phys (void) |
| static void | ar_start_gzip (int, const char *, int) |
| int | ar_open (const char *name) |
| void | ar_close (void) |
| void | ar_drain (void) |
| int | ar_set_wr (void) |
| int | ar_app_ok (void) |
| int | ar_read (char *buf, int cnt) |
| int | ar_write (char *buf, int bsz) |
| int | ar_rdsync (void) |
| int | ar_fow (off_t sksz, off_t *skipped) |
| int | ar_rev (off_t sksz) |
| int | ar_next (void) |
Variables | |
| static char | none [] = "<NONE>" |
| static char | stdo [] = "<STDOUT>" |
| static char | stdn [] = "<STDIN>" |
| static int | arfd = -1 |
| static int | artyp = ISREG |
| static int | arvol = 1 |
| static int | lstrval = -1 |
| static int | io_ok |
| static int | did_io |
| static int | done |
| static struct stat | arsb |
| static int | invld_rec |
| static int | wr_trail = 1 |
| static int | can_unlnk = 0 |
| const char * | arcname |
| const char * | gzip_program |
| static pid_t | zpid = -1 |
| sigset_t | s_mask |
|
|
Definition at line 64 of file ar_io.c. Referenced by ar_open(). |
|
|
Definition at line 63 of file ar_io.c. Referenced by ar_open(). |
|
|
Definition at line 61 of file ar_io.c. Referenced by ar_open(). |
|
|
Definition at line 62 of file ar_io.c. Referenced by ar_open(). |
|
|
Definition at line 494 of file ar_io.c. References argv0, artyp, invld_rec, ISPIPE, paxwarn(), and rdblksz. Referenced by appnd_start(). |
|
|
Definition at line 301 of file ar_io.c. References act, arcname, arfd, argv0, arsb, artyp, arvol, can_unlnk, close, did_io, EXTRACT, fflush(), flcnt, fprintf(), fputs(), frmt, fstat, io_ok, ISTAPE, kill, LIST, listf, fsub::name, nflag, NM_CPIO, NM_TAR, NULL, putc, rdcnt, S_ISREG, SIGINT, stat::st_mode, stat::st_size, status, strcmp, unlink, vflag, vfpart, waitpid, wrcnt, and zpid. Referenced by ar_next(), copy(), extract(), list(), sig_cleanup(), and wr_archive(). |
|
|
|
|
||||||||||||
|
Definition at line 812 of file ar_io.c. References arfd, arsb, artyp, errno, ISREG, L, lseek, lstrval, SEEK_CUR, SEEK_SET, stat::st_size, and syswarn(). Referenced by rd_skip(). |
|
|
Definition at line 1116 of file ar_io.c. References act, APPND, ar_close(), ar_open(), ARCHIVE, arcname, argv0, artyp, arvol, done, errno, ISPIPE, ISREG, ISTAPE, lstrval, NM_TAR, NULL, PAXPATHLEN, s_mask, sigprocmask, stdn, stdo, strcmp, syswarn(), tty_prnt(), tty_read(), vfpart, and wr_trail. Referenced by buf_flush(), rd_start(), rd_sync(), and wr_start(). |
|
|
Definition at line 98 of file ar_io.c. References act, APP_MODE, APPND, AR_MODE, ar_start_gzip(), ARCHIVE, arcname, arfd, arsb, artyp, BLKMULT, blksz, can_unlnk, chdir, chdname, close, COPY, DEVBLK, did_io, DMOD, errno, ESPIPE, EXT_MODE, EXTRACT, FILEBLK, flcnt, fstat, gzip_program, if(), invld_rec, io_ok, ioctl, ISBLK, ISCHR, ISPIPE, ISREG, ISTAPE, L, LIST, lseek, lstrval, MAXBLK, mb, MTIOCGET, none, NULL, open, paxwarn(), rdblksz, S_ISBLK, S_ISCHR, S_ISDIR, SEEK_CUR, stat::st_mode, stat::st_size, STDIN_FILENO, stdn, stdo, STDOUT_FILENO, syswarn(), and wrblksz. Referenced by ar_next(), rd_start(), and wr_start(). |
|
|
Definition at line 723 of file ar_io.c. References act, APPND, ARCHIVE, arfd, arsb, artyp, BLKMULT, did_io, done, io_ok, ioctl, ISBLK, ISCHR, ISPIPE, ISREG, ISTAPE, L, lseek, lstrval, mb, MTFSR, MTIOCTOP, paxwarn(), and SEEK_CUR. Referenced by rd_sync(). |
|
||||||||||||
|
Definition at line 518 of file ar_io.c. References arfd, artyp, arvol, BLKMULT, errno, invld_rec, io_ok, ISBLK, ISCHR, ISPIPE, ISREG, ISTAPE, lstrval, paxwarn(), rdblksz, read, and syswarn(). Referenced by appnd_start(), buf_fill(), and rd_sync(). |
|
|
Definition at line 871 of file ar_io.c. References arfd, artyp, arvol, errno, get_phys(), ioctl, ISBLK, ISCHR, ISPIPE, ISREG, ISTAPE, L, lseek, lstrval, mb, MTBSR, MTIOCTOP, paxwarn(), rdblksz, SEEK_CUR, SEEK_SET, and syswarn(). Referenced by appnd_start(). |
|
|
Definition at line 456 of file ar_io.c. References arfd, artyp, errno, ftruncate, ISREG, L, lseek, SEEK_CUR, syswarn(), and wr_trail. Referenced by appnd_start(). |
|
||||||||||||||||
|
Definition at line 1262 of file ar_io.c. References close, dup2, err, execlp, fds, fork, NULL, pipe, STDIN_FILENO, STDOUT_FILENO, and zpid. Referenced by ar_open(). |
|
||||||||||||
|
Definition at line 601 of file ar_io.c. References arfd, artyp, arvol, fsub::blkalgn, BLKMULT, EACCES, EFBIG, EIO, ENOSPC, ENXIO, errno, frmt, ftruncate, io_ok, ISBLK, ISCHR, ISPIPE, ISREG, ISTAPE, L, lseek, lstrval, paxwarn(), SEEK_CUR, syswarn(), wr_trail, and write. Referenced by buf_flush(). |
|
|
Definition at line 1003 of file ar_io.c. References arfd, errno, ioctl, lstrval, MAXBLK, mb, MTBSF, MTBSR, MTIOCTOP, paxwarn(), read, and syswarn(). Referenced by ar_rev(). |
|
|
Definition at line 80 of file ar_io.c. Referenced by ar_close(), ar_next(), ar_open(), cpio_options(), pax_options(), rd_start(), tar_options(), and wr_start(). |
|
|
Definition at line 69 of file ar_io.c. Referenced by ar_close(), ar_drain(), ar_fow(), ar_open(), ar_rdsync(), ar_read(), ar_rev(), ar_set_wr(), ar_write(), and get_phys(). |
|
|
Definition at line 76 of file ar_io.c. Referenced by ar_close(), ar_fow(), ar_open(), and ar_rdsync(). |
|
|
Definition at line 70 of file ar_io.c. Referenced by ar_app_ok(), ar_close(), ar_drain(), ar_fow(), ar_next(), ar_open(), ar_rdsync(), ar_read(), ar_rev(), ar_set_wr(), and ar_write(). |
|
|
Definition at line 71 of file ar_io.c. Referenced by ar_close(), ar_next(), ar_read(), ar_rev(), and ar_write(). |
|
|
Definition at line 79 of file ar_io.c. Referenced by ar_close(), and ar_open(). |
|
|
Definition at line 74 of file ar_io.c. Referenced by ar_close(), ar_open(), and ar_rdsync(). |
|
|
|
Definition at line 81 of file ar_io.c. Referenced by ar_open(), cpio_options(), main(), pax_options(), and tar_options(). |
|
|
Definition at line 77 of file ar_io.c. Referenced by ar_app_ok(), ar_open(), and ar_read(). |
|
|
Definition at line 73 of file ar_io.c. Referenced by ar_close(), ar_open(), ar_rdsync(), ar_read(), and ar_write(). |
|
|
Definition at line 72 of file ar_io.c. Referenced by ar_drain(), ar_fow(), ar_next(), ar_open(), ar_rdsync(), ar_read(), ar_rev(), ar_write(), and get_phys(). |
|
|
|
|
|
Definition at line 99 of file pax.c. Referenced by ar_next(), copy(), extract(), gen_init(), list(), and wr_archive(). |
|
|
|
|
|
|
|
|
Definition at line 78 of file ar_io.c. Referenced by ar_next(), ar_set_wr(), and ar_write(). |
|
|
Definition at line 82 of file ar_io.c. Referenced by ar_close(), and ar_start_gzip(). |
1.4.6