extern.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int ar_open (const char *)
void ar_close (void)
void ar_drain (void)
int ar_set_wr (void)
int ar_app_ok (void)
int ar_read (char *, int)
int ar_write (char *, int)
int ar_rdsync (void)
int ar_fow (off_t, off_t *)
int ar_rev (off_t)
int ar_next (void)
void list (void)
void extract (void)
void append (void)
void archive (void)
void copy (void)
int wr_start (void)
int rd_start (void)
void cp_start (void)
int appnd_start (off_t)
int rd_sync (void)
void pback (char *, int)
int rd_skip (off_t)
void wr_fin (void)
int wr_rdbuf (char *, int)
int rd_wrbuf (char *, int)
int wr_skip (off_t)
int wr_rdfile (ARCHD *, int, off_t *)
int rd_wrfile (ARCHD *, int, off_t *)
void cp_file (ARCHD *, int, int)
int buf_fill (void)
int buf_flush (int)
int uidtb_start (void)
int gidtb_start (void)
int usrtb_start (void)
int grptb_start (void)
const char * name_uid (uid_t, int)
const char * name_gid (gid_t, int)
int uid_name (char *, uid_t *)
int gid_name (char *, gid_t *)
int cpio_strd (void)
int cpio_trail (ARCHD *)
int cpio_endwr (void)
int cpio_id (char *, int)
int cpio_rd (ARCHD *, char *)
off_t cpio_endrd (void)
int cpio_stwr (void)
int cpio_wr (ARCHD *)
int vcpio_id (char *, int)
int crc_id (char *, int)
int crc_strd (void)
int vcpio_rd (ARCHD *, char *)
off_t vcpio_endrd (void)
int crc_stwr (void)
int vcpio_wr (ARCHD *)
int bcpio_id (char *, int)
int bcpio_rd (ARCHD *, char *)
off_t bcpio_endrd (void)
int bcpio_wr (ARCHD *)
int file_creat (ARCHD *)
void file_close (ARCHD *, int)
int lnk_creat (ARCHD *)
int cross_lnk (ARCHD *)
int chk_same (ARCHD *)
int node_creat (ARCHD *)
int unlnk_exist (char *, int)
int chk_path (char *, uid_t, gid_t)
void set_ftime (char *fnm, time_t mtime, time_t atime, int frc)
int set_ids (char *, uid_t, gid_t)
int set_lids (char *, uid_t, gid_t)
void set_pmode (char *, mode_t)
int file_write (int, char *, int, int *, int *, int, char *)
void file_flush (int, char *, int)
void rdfile_close (ARCHD *, int *)
int set_crc (ARCHD *, int)
int ftree_start (void)
int ftree_add (char *, int)
void ftree_sel (ARCHD *)
void ftree_notsel (void)
void ftree_chk (void)
int next_file (ARCHD *)
void ls_list (ARCHD *, time_t, FILE *)
void ls_tty (ARCHD *)
int l_strncpy (char *, const char *, int)
u_long asc_ul (char *, int, int)
int ul_asc (u_long, char *, int, int)
u_quad_t asc_uqd (char *, int, int)
int uqd_asc (u_quad_t, char *, int, int)
int getoldopt (int, char **, const char *)
void options (int, char **)
OPLISTopt_next (void)
int opt_add (const char *)
int bad_opt (void)
int rep_add (char *)
int pat_add (char *, char *)
void pat_chk (void)
int pat_sel (ARCHD *)
int pat_match (ARCHD *)
int mod_name (ARCHD *)
int set_dest (ARCHD *, char *, int)
void sig_cleanup (int)
int sel_chk (ARCHD *)
int grp_add (char *)
int usr_add (char *)
int trng_add (char *)
int lnk_start (void)
int chk_lnk (ARCHD *)
void purg_lnk (ARCHD *)
void lnk_end (void)
int ftime_start (void)
int chk_ftime (ARCHD *)
int name_start (void)
int add_name (char *, int, char *)
void sub_name (char *, int *, size_t)
int dev_start (void)
int add_dev (ARCHD *)
int map_dev (ARCHD *, u_long, u_long)
int atdir_start (void)
void atdir_end (void)
void add_atdir (char *, dev_t, ino_t, time_t, time_t)
int get_atdir (dev_t, ino_t, time_t *, time_t *)
int dir_start (void)
void add_dir (char *, int, struct stat *, int)
void proc_dir (void)
u_int st_hash (char *, int, int)
int tar_endwr (void)
off_t tar_endrd (void)
int tar_trail (char *, int, int *)
int tar_id (char *, int)
int tar_opt (void)
int tar_rd (ARCHD *, char *)
int tar_wr (ARCHD *)
int ustar_strd (void)
int ustar_stwr (void)
int ustar_id (char *, int)
int ustar_rd (ARCHD *, char *)
int ustar_wr (ARCHD *)
int tty_init (void)
void tty_prnt (const char *,...)
int tty_read (char *, int)
void paxwarn (int, const char *,...)
void syswarn (int, int, const char *,...)

Variables

const char * arcname
const char * gzip_program
u_long flcnt
int blksz
int wrblksz
int maxflt
int rdblksz
off_t wrlimit
off_t rdcnt
off_t wrcnt
FSUB fsub []
int ford []
char * chdname
int act
FSUBfrmt
int cflag
int cwdfd
int dflag
int iflag
int kflag
int lflag
int nflag
int tflag
int uflag
int vflag
int Dflag
int Hflag
int Lflag
int Xflag
int Yflag
int Zflag
int vfpart
int patime
int pmtime
int nodirs
int pmode
int pids
int rmleadslash
int exit_val
int docrc
char * dirptr
const char * argv0
FILElistf
char * tempfile
char * tempbase


Function Documentation

void add_atdir char *  ,
dev_t  ,
ino_t  ,
time_t  ,
time_t 
 

Definition at line 952 of file tables.c.

References A_TAB_SZ, atab, atdir::dev, atdir::fow, indx(), atdir::ino, and NULL.

int add_dev ARCHD  ) 
 

Definition at line 680 of file tables.c.

References chk_dev(), NULL, archd::sb, and stat::st_dev.

Referenced by append().

void add_dir char *  ,
int  ,
struct stat ,
int 
 

Definition at line 1122 of file tables.c.

References dirdata::atime, dircnt, dirfd, dirdata::frc_mode, L, lseek, dirdata::mode, dirdata::mtime, dirdata::nlen, dirdata::npos, paxwarn(), SEEK_CUR, stat::st_atime, stat::st_mode, stat::st_mtime, and write.

int add_name char *  ,
int  ,
char * 
 

Definition at line 506 of file tables.c.

References namt::fow, free, indx(), malloc(), N_TAB_SZ, namt::nname, ntab, NULL, namt::oname, paxwarn(), st_hash(), strcmp, and strdup().

void append void   ) 
 

Definition at line 562 of file ar_subs.c.

References add_dev(), appnd_start(), argv0, chk_ftime(), dev_start(), fsub::end_rd, fprintf(), fputs(), frmt, ftime_start(), get_arc(), listf, lnk_end(), fsub::name, next_head(), NULL, fsub::options, archd::pad, paxwarn(), rd_skip(), sel_chk(), archd::skip, fsub::st_rd, fsub::udev, uflag, vflag, vfpart, and wr_archive().

int appnd_start off_t   ) 
 

Definition at line 207 of file buf_subs.c.

References act, ar_app_ok(), ar_read(), ar_rev(), ar_set_wr(), ARCHIVE, blksz, bufend, bufpt, cnt, exit_val, out, paxwarn(), rdblksz, rdcnt, wrblksz, and wrcnt.

Referenced by append().

int ar_app_ok void   ) 
 

Definition at line 494 of file ar_io.c.

References argv0, artyp, invld_rec, ISPIPE, paxwarn(), and rdblksz.

Referenced by appnd_start().

void ar_close void   ) 
 

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().

void ar_drain void   ) 
 

Definition at line 424 of file ar_io.c.

References arfd, artyp, ISPIPE, lstrval, MAXBLK, and read.

int ar_fow off_t  ,
off_t
 

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().

int ar_next void   ) 
 

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().

int ar_open const char *   ) 
 

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().

int ar_rdsync void   ) 
 

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().

int ar_read char *  ,
int 
 

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().

int ar_rev off_t   ) 
 

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().

int ar_set_wr void   ) 
 

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().

int ar_write char *  ,
int 
 

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().

void archive void   ) 
 

Definition at line 698 of file ar_subs.c.

References frmt, ftime_start(), fsub::options, uflag, wr_archive(), and wr_start().

Referenced by main().

u_long asc_ul char *  ,
int  ,
int 
 

Definition at line 233 of file gen_subs.c.

References HEX, and stop().

Referenced by cpio_rd(), tar_id(), tar_rd(), ustar_id(), ustar_rd(), and vcpio_rd().

u_quad_t asc_uqd char *  ,
int  ,
int 
 

Definition at line 330 of file gen_subs.c.

References HEX, and stop().

Referenced by cpio_rd(), tar_rd(), ustar_rd(), and vcpio_rd().

void atdir_end void   ) 
 

Definition at line 921 of file tables.c.

References A_TAB_SZ, atab, atdir::atime, atdir::fow, i, atdir::mtime, atdir::name, NULL, and set_ftime().

Referenced by ftree_chk(), and sig_cleanup().

int atdir_start void   ) 
 

Definition at line 901 of file tables.c.

References A_TAB_SZ, atab, calloc(), NULL, and paxwarn().

Referenced by ftree_start().

int bad_opt void   ) 
 

Definition at line 1333 of file options.c.

References fprintf(), oplist::name, NULL, ophead, opt_next(), pax_usage(), paxwarn(), stderr, and oplist::value.

off_t bcpio_endrd void   ) 
 

Definition at line 980 of file cpio.c.

References TRAILER.

int bcpio_id char *  ,
int 
 

Definition at line 855 of file cpio.c.

References MAGIC, and swp_head.

Referenced by bcpio_rd().

int bcpio_rd ARCHD ,
char * 
 

Definition at line 883 of file cpio.c.

References bcpio_id(), C_IFMT, C_ISLNK, com_rd(), HD_BCPIO::h_dev, HD_BCPIO::h_filesize_1, HD_BCPIO::h_filesize_2, HD_BCPIO::h_gid, HD_BCPIO::h_ino, HD_BCPIO::h_mode, HD_BCPIO::h_mtime_1, HD_BCPIO::h_mtime_2, HD_BCPIO::h_namesize, HD_BCPIO::h_nlink, HD_BCPIO::h_rdev, HD_BCPIO::h_uid, int(), L, archd::ln_name, archd::ln_nlen, archd::nlen, archd::pad, rd_ln_nm(), rd_nm(), rd_skip(), archd::sb, stat::st_atime, stat::st_ctime, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, swp_head, and time_t.

int bcpio_wr ARCHD  ) 
 

Definition at line 998 of file cpio.c.

References HD_BCPIO::h_dev, HD_BCPIO::h_filesize_1, HD_BCPIO::h_filesize_2, HD_BCPIO::h_gid, HD_BCPIO::h_ino, HD_BCPIO::h_magic, HD_BCPIO::h_mode, HD_BCPIO::h_mtime_1, HD_BCPIO::h_mtime_2, HD_BCPIO::h_namesize, HD_BCPIO::h_nlink, HD_BCPIO::h_rdev, HD_BCPIO::h_uid, int(), L, archd::ln_name, archd::ln_nlen, MAGIC, map_dev(), archd::name, archd::nlen, archd::org_name, out, archd::pad, PAX_BLK, PAX_CHR, PAX_CTG, PAX_HRG, PAX_REG, PAX_SLK, paxwarn(), archd::sb, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, time_t, archd::type, wr_rdbuf(), and wr_skip().

int buf_fill void   ) 
 

Definition at line 841 of file buf_subs.c.

References ar_read(), blksz, bufend, bufpt, cnt, and rdcnt.

Referenced by rd_skip(), rd_wrbuf(), and rd_wrfile().

int buf_flush int   ) 
 

Definition at line 886 of file buf_subs.c.

References ar_next(), ar_write(), blksz, bufend, bufpt, cnt, exit_val, memcpy(), paxwarn(), wrcnt, and wrlimit.

int chk_ftime ARCHD  ) 
 

Definition at line 366 of file tables.c.

References errno, F_TAB_SZ, ffd, ftm::fow, free, ftab, indx(), lseek, malloc(), ftm::mtime, archd::name, namelen, ftm::namelen, archd::nlen, NULL, PAXPATHLEN, paxwarn(), read, archd::sb, ftm::seek, SEEK_END, SEEK_SET, st_hash(), stat::st_mtime, strncmp(), syswarn(), and write.

Referenced by append(), and wr_archive().

int chk_lnk ARCHD  ) 
 

Definition at line 127 of file tables.c.

References hrdlnk::dev, hrdlnk::fow, free, indx(), hrdlnk::ino, l_strncpy(), L_TAB_SZ, archd::ln_name, archd::ln_nlen, ltab, hrdlnk::name, hrdlnk::nlink, NULL, PAX_DIR, PAX_HLK, PAX_HRG, PAX_REG, archd::sb, stat::st_dev, stat::st_ino, stat::st_nlink, and archd::type.

Referenced by com_rd(), copy(), and wr_archive().

int chk_path char *  ,
uid_t  ,
gid_t 
 

Definition at line 555 of file file_subs.c.

References lstat, NULL, retval, sb, and strchr.

Referenced by file_creat(), and mk_link().

int chk_same ARCHD  ) 
 

Definition at line 230 of file file_subs.c.

References kflag, lstat, archd::name, paxwarn(), sb, archd::sb, stat::st_dev, and stat::st_ino.

Referenced by copy().

void copy void   ) 
 

Definition at line 724 of file ar_subs.c.

References ar_close(), chk_lnk(), chk_same(), cp_file(), cp_start(), cross_lnk(), Dflag, dir_start(), dirbuf, dirptr, dlen, errno, file_close(), file_creat(), flcnt, fputs(), ftree_chk(), ftree_notsel(), ftree_sel(), ftree_start(), iflag, l_strncpy(), lflag, listf, lnk_creat(), lnk_start(), lstat, mod_name(), archd::name, name_start(), next_file(), archd::nlen, node_creat(), NULL, O_RDONLY, open, archd::org_name, PAX_CTG, PAX_HLK, PAX_HRG, PAX_REG, PAXPATHLEN, paxwarn(), proc_dir(), purg_lnk(), putc, rdfile_close(), S_ISDIR, s_mask, archd::sb, sb, sel_chk(), set_dest(), sigprocmask, stat::st_ctime, stat::st_mtime, stat, strncpy(), syswarn(), archd::type, uflag, vflag, vfpart, Yflag, and Zflag.

void cp_file ARCHD ,
int  ,
int 
 

Definition at line 754 of file buf_subs.c.

References BLKMULT, blksz, cnt, errno, file_write(), fstat, L, MINFBSZ, archd::name, read, rem, archd::sb, sb, stat::st_size, syswarn(), and write.

Referenced by copy().

void cp_start void   ) 
 

Definition at line 168 of file buf_subs.c.

References BLKMULT, blksz, bufmem, MAXBLK, and rdblksz.

Referenced by copy().

off_t cpio_endrd void   ) 
 

Definition at line 359 of file cpio.c.

References TRAILER.

int cpio_endwr void   ) 
 

Definition at line 157 of file cpio.c.

References frmt, memset(), PAX_REG, strcpy(), TRAILER, and fsub::wr.

int cpio_id char *  ,
int 
 

Definition at line 261 of file cpio.c.

References strncmp().

Referenced by cpio_rd().

int cpio_rd ARCHD ,
char * 
 

Definition at line 278 of file cpio.c.

References asc_ul(), asc_uqd(), HD_CPIO::c_dev, HD_CPIO::c_filesize, HD_CPIO::c_gid, C_IFMT, HD_CPIO::c_ino, C_ISLNK, HD_CPIO::c_mode, HD_CPIO::c_mtime, HD_CPIO::c_namesize, HD_CPIO::c_nlink, HD_CPIO::c_rdev, HD_CPIO::c_uid, com_rd(), cpio_id(), L, archd::ln_name, archd::ln_nlen, archd::nlen, OCT, archd::pad, rd_ln_nm(), rd_nm(), archd::sb, stat::st_atime, stat::st_ctime, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, and time_t.

int cpio_strd void   ) 
 

Definition at line 74 of file cpio.c.

References lnk_start().

int cpio_stwr void   ) 
 

Definition at line 372 of file cpio.c.

References dev_start().

int cpio_trail ARCHD  ) 
 

Definition at line 90 of file cpio.c.

References archd::name, archd::sb, stat::st_size, strcmp, and TRAILER.

int cpio_wr ARCHD  ) 
 

Definition at line 387 of file cpio.c.

References HD_CPIO::c_dev, HD_CPIO::c_filesize, HD_CPIO::c_gid, HD_CPIO::c_ino, HD_CPIO::c_magic, HD_CPIO::c_mode, HD_CPIO::c_mtime, HD_CPIO::c_namesize, HD_CPIO::c_nlink, HD_CPIO::c_rdev, HD_CPIO::c_uid, L, archd::ln_name, archd::ln_nlen, MAGIC, map_dev(), archd::name, archd::nlen, OCT, archd::org_name, out, archd::pad, PAX_BLK, PAX_CHR, PAX_CTG, PAX_HRG, PAX_REG, PAX_SLK, paxwarn(), archd::sb, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, archd::type, ul_asc(), uqd_asc(), and wr_rdbuf().

int crc_id char *  ,
int 
 

Definition at line 534 of file cpio.c.

References strncmp().

Referenced by vcpio_rd().

int crc_strd void   ) 
 

Definition at line 550 of file cpio.c.

References docrc, and lnk_start().

int crc_stwr void   ) 
 

Definition at line 682 of file cpio.c.

References dev_start(), and docrc.

int cross_lnk ARCHD  ) 
 

Definition at line 206 of file file_subs.c.

References mk_link(), archd::name, archd::org_name, PAX_DIR, archd::sb, and archd::type.

Referenced by copy().

int dev_start void   ) 
 

Definition at line 658 of file tables.c.

References calloc(), D_TAB_SZ, dtab, NULL, and paxwarn().

Referenced by append(), cpio_stwr(), and crc_stwr().

int dir_start void   ) 
 

Definition at line 1089 of file tables.c.

References _TFILE_BASE, dirfd, memcpy(), mkstemp(), paxwarn(), tempbase, tempfile, and unlink.

Referenced by copy(), and extract().

void extract void   ) 
 

Definition at line 151 of file ar_subs.c.

References ar_close(), chdir, pattern::chdname, cnt, cwdfd, Dflag, dir_start(), fsub::end_rd, errno, fchdir, file_close(), file_creat(), fputs(), frmt, get_arc(), iflag, listf, lnk_creat(), ls_list(), lstat, mod_name(), archd::name, name_start(), next_head(), node_creat(), now, NULL, fsub::options, archd::pad, archd::pat, pat_chk(), pat_match(), pat_sel(), PAX_CTG, PAX_HLK, PAX_HRG, PAX_REG, proc_dir(), purg_lnk(), putc, fsub::rd_data, rd_skip(), s_mask, archd::sb, sb, sel_chk(), sigprocmask, archd::skip, stat::st_ctime, stat::st_mtime, fsub::st_rd, syswarn(), time, time_t, archd::type, uflag, vflag, vfpart, Yflag, and Zflag.

void file_close ARCHD ,
int 
 

Definition at line 132 of file file_subs.c.

References close, errno, archd::name, patime, pids, pmode, pmtime, archd::sb, set_ftime(), set_ids(), set_pmode(), SETBITS, stat::st_atime, stat::st_gid, stat::st_mode, stat::st_mtime, stat::st_uid, and syswarn().

Referenced by copy(), and extract().

int file_creat ARCHD  ) 
 

Definition at line 75 of file file_subs.c.

References chk_path(), errno, FILEBITS, if(), archd::name, nodirs, O_CREAT, O_EXCL, O_TRUNC, O_WRONLY, open, archd::sb, stat::st_gid, stat::st_mode, stat::st_uid, syswarn(), archd::type, and unlnk_exist().

Referenced by copy(), and extract().

void file_flush int  ,
char *  ,
int 
 

Definition at line 875 of file file_subs.c.

References errno, lseek, SEEK_CUR, syswarn(), and write.

int file_write int  ,
char *  ,
int  ,
int *  ,
int *  ,
int  ,
char * 
 

Definition at line 794 of file file_subs.c.

References errno, lseek, MIN, SEEK_CUR, st, syswarn(), and write.

int ftime_start void   ) 
 

Definition at line 328 of file tables.c.

References _TFILE_BASE, calloc(), errno, F_TAB_SZ, ffd, ftab, memcpy(), mkstemp(), NULL, paxwarn(), syswarn(), tempbase, tempfile, and unlink.

Referenced by append(), and archive().

int ftree_add char *  ,
int 
 

Definition at line 143 of file ftree.c.

References ftree::chflg, ftree::fname, ftree::fow, fthead, fttail, malloc(), NULL, paxwarn(), ftree::refcnt, and strlen().

Referenced by cpio_options(), and tar_options().

void ftree_chk void   ) 
 

Definition at line 233 of file ftree.c.

References atdir_end(), ftree::chflg, ftree::fow, fthead, if(), NULL, paxwarn(), ftree::refcnt, and tflag.

Referenced by copy(), and wr_archive().

void ftree_notsel void   ) 
 

Definition at line 220 of file ftree.c.

References ftent, fts_set(), FTS_SKIP, ftsp, and NULL.

Referenced by copy(), and wr_archive().

void ftree_sel ARCHD  ) 
 

Definition at line 188 of file ftree.c.

References dflag, ftcur, ftent, ftree_skip, fts_set(), FTS_SKIP, ftsp, nflag, NULL, PAX_DIR, ftree::refcnt, and archd::type.

Referenced by copy(), and wr_archive().

int ftree_start void   ) 
 

Definition at line 89 of file ftree.c.

References atdir_start(), farray, fthead, ftree_arg(), FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOCHDIR, FTS_PHYSICAL, FTS_XDEV, ftsopts, Hflag, Lflag, malloc(), NULL, PAXPATHLEN, paxwarn(), tflag, and Xflag.

Referenced by copy(), and wr_archive().

int get_atdir dev_t  ,
ino_t  ,
time_t ,
time_t
 

Definition at line 1014 of file tables.c.

References A_TAB_SZ, atab, atdir::atime, atdir::dev, atdir::fow, free, indx(), atdir::ino, atdir::mtime, atdir::name, and NULL.

int getoldopt int  ,
char **  ,
const char * 
 

Definition at line 24 of file getoldopt.c.

References c, EOF, fprintf(), getopt(), key, NULL, optarg, optind, place(), stderr, and strchr.

Referenced by tar_options().

int gid_name char *  ,
gid_t
 

Definition at line 376 of file cache.c.

References getgrnam(), GID_SZ, GNMLEN, group::gr_gid, gropn, grptb, grptb_start(), INVALID, malloc(), namelen, NULL, ptr, setgroupent, st_hash(), strcmp, strlen(), strncpy(), and VALID.

Referenced by ustar_rd().

int gidtb_start void   ) 
 

Definition at line 98 of file cache.c.

References calloc(), fail, GID_SZ, gidtb, NULL, and paxwarn().

Referenced by list(), name_gid(), and ustar_stwr().

int grp_add char *   ) 
 

Definition at line 203 of file sel_subs.c.

References atoi, calloc(), endgrent(), grpt::fow, getgrnam(), gid, grpt::gid, group::gr_gid, GRP_TB_SZ, grptb, indx(), NULL, paxwarn(), and strtoul().

Referenced by pax_options().

int grptb_start void   ) 
 

Definition at line 146 of file cache.c.

References calloc(), fail, GNM_SZ, grptb, NULL, and paxwarn().

Referenced by gid_name(), and ustar_strd().

int l_strncpy char *  ,
const char *  ,
int 
 

Definition at line 207 of file gen_subs.c.

References start, and stop().

Referenced by chk_lnk(), copy(), rep_name(), resub(), sub_name(), tar_rd(), tar_wr(), ustar_rd(), and ustar_wr().

void list void   ) 
 

Definition at line 74 of file ar_subs.c.

References ar_close(), fsub::end_rd, exit(), frmt, get_arc(), get_mtab_entry(), gidtb_start(), load_mtab(), ls_list(), mod_name(), n, next_head(), now, NULL, fsub::options, archd::pad, pat_chk(), pat_match(), pat_sel(), PATH_MAX, rd_skip(), s_mask, sel_chk(), sigprocmask, archd::skip, special(), fsub::st_rd, stdout, strcmp, strlen(), tell(), time, time_t, uidtb_start(), version, vflag, and write.

int lnk_creat ARCHD  ) 
 

Definition at line 172 of file file_subs.c.

References errno, archd::ln_name, lstat, mk_link(), archd::name, paxwarn(), S_ISDIR, sb, and syswarn().

Referenced by copy(), and extract().

void lnk_end void   ) 
 

Definition at line 268 of file tables.c.

References hrdlnk::fow, free, i, L_TAB_SZ, ltab, hrdlnk::name, and NULL.

Referenced by append().

int lnk_start void   ) 
 

Definition at line 103 of file tables.c.

References calloc(), L_TAB_SZ, ltab, NULL, and paxwarn().

Referenced by copy(), cpio_strd(), crc_strd(), and wr_archive().

void ls_list ARCHD ,
time_t  ,
FILE
 

Definition at line 80 of file gen_subs.c.

References CURFRMTD, CURFRMTM, d_first, DATELEN, fflush(), fp, fprintf(), archd::ln_name, localtime(), major, minor, MODELEN, archd::name, name_gid(), name_uid(), OLDFRMTD, OLDFRMTM, PAX_BLK, PAX_CHR, PAX_HLK, PAX_HRG, PAX_SLK, putc, archd::sb, SIXMONTHS, stat::st_gid, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, strcpy(), strftime(), archd::type, UT_GRPSIZE, UT_NAMESIZE, and vflag.

Referenced by extract(), list(), and wr_archive().

void ls_tty ARCHD  ) 
 

Definition at line 166 of file gen_subs.c.

References CURFRMTD, CURFRMTM, d_first, DATELEN, localtime(), MODELEN, archd::name, NULL, OLDFRMTD, OLDFRMTM, archd::sb, SIXMONTHS, stat::st_mode, stat::st_mtime, strcpy(), strftime(), time, and tty_prnt().

Referenced by tty_rename().

int map_dev ARCHD ,
u_long  ,
u_long 
 

Definition at line 759 of file tables.c.

References bad, chk_dev(), dlist::dev, dtab, dlist::fow, devt::list, malloc(), archd::name, NULL, paxwarn(), archd::sb, stat::st_dev, stat::st_ino, and dlist::trunc_bits.

Referenced by bcpio_wr(), cpio_wr(), and vcpio_wr().

int mod_name ARCHD  ) 
 

Definition at line 608 of file pat_rep.c.

References iflag, archd::ln_name, archd::ln_nlen, memmove(), archd::name, archd::nlen, NULL, PAX_HLK, PAX_HRG, PAX_SLK, paxwarn(), rep_name(), rephead, rmleadslash, strlen(), sub_name(), tty_rename(), and archd::type.

Referenced by copy(), extract(), list(), and wr_archive().

const char* name_gid gid_t  ,
int 
 

Definition at line 242 of file cache.c.

References getgrgid(), GID_SZ, gidtb, gidtb_start(), GNMLEN, group::gr_name, gropn, INVALID, malloc(), NULL, ptr, setgroupent, snprintf(), strncpy(), and VALID.

Referenced by ls_list(), and ustar_wr().

int name_start void   ) 
 

Definition at line 485 of file tables.c.

References calloc(), N_TAB_SZ, ntab, NULL, and paxwarn().

Referenced by copy(), extract(), and wr_archive().

const char* name_uid uid_t  ,
int 
 

Definition at line 171 of file cache.c.

References getpwuid(), INVALID, malloc(), NULL, ptr, passwd::pw_name, pwopn, setpassent, snprintf(), strncpy(), UID_SZ, uidtb, uidtb_start(), UNMLEN, and VALID.

Referenced by ls_list(), and ustar_wr().

int next_file ARCHD  ) 
 

Definition at line 344 of file ftree.c.

References atime, cnt, ftent, ftree_arg(), ftree_skip, fts_read(), ftsp, mtime, NULL, and time_t.

Referenced by copy(), and wr_archive().

int node_creat ARCHD  ) 
 

Definition at line 340 of file file_subs.c.

References FILEBITS, if(), archd::ln_name, mkdir, mkfifo, mknod, archd::name, PAX_BLK, PAX_CHR, PAX_CTG, PAX_DIR, PAX_FIF, PAX_HLK, PAX_HRG, PAX_REG, PAX_SCK, PAX_SLK, paxwarn(), S_IFBLK, S_IFCHR, sb, archd::sb, stat::st_mode, stat::st_rdev, symlink, and archd::type.

Referenced by copy(), and extract().

int opt_add const char *   ) 
 

Definition at line 1359 of file options.c.

References endpt, oplist::fow, free, malloc(), oplist::name, NULL, ophead, optail, paxwarn(), strchr, strdup(), and oplist::value.

Referenced by pax_options(), and tar_options().

OPLIST* opt_next void   ) 
 

Definition at line 1317 of file options.c.

References oplist::fow, NULL, and ophead.

Referenced by bad_opt(), and tar_opt().

void options int  ,
char ** 
 

Definition at line 158 of file options.c.

References argv0, cpio_options(), NM_CPIO, NM_PAX, NM_TAR, NULL, pax_options(), strcmp, strrchr(), and tar_options().

int pat_add char *  ,
char * 
 

Definition at line 219 of file pat_rep.c.

References pattern::chdname, pattern::flgs, pattern::fow, malloc(), NULL, pathead, pattail, paxwarn(), pattern::pend, pattern::plen, pattern::pstr, and strlen().

Referenced by cpio_options(), and tar_options().

void pat_chk void   ) 
 

Definition at line 264 of file pat_rep.c.

References pattern::flgs, pattern::fow, if(), MTCH, NULL, pathead, and paxwarn().

Referenced by extract(), and list().

int pat_match ARCHD  ) 
 

Definition at line 420 of file pat_rep.c.

References cflag, DIR_MTCH, pattern::flgs, fn_match(), pattern::fow, archd::name, nflag, NULL, archd::pat, pat_sel(), pathead, pattern::pend, pattern::plen, pattern::pstr, and strncmp().

Referenced by extract(), and list().

int pat_sel ARCHD  ) 
 

Definition at line 301 of file pat_rep.c.

References dflag, DIR_MTCH, pattern::flgs, pattern::fow, free, MTCH, archd::name, nflag, NULL, archd::pat, pathead, PAX_DIR, paxwarn(), pattern::pend, pattern::plen, pattern::pstr, strdup(), strlen(), and archd::type.

Referenced by extract(), list(), and pat_match().

void paxwarn int  ,
const char *  ,
  ...
 

Definition at line 136 of file tty_subs.c.

References argv0, exit_val, fflush(), fprintf(), fputc(), listf, stderr, va_end, va_start, vflag, vfpart, and vfprintf().

Referenced by add_dir(), add_name(), append(), appnd_start(), ar_app_ok(), ar_open(), ar_rdsync(), ar_read(), ar_rev(), ar_write(), atdir_start(), bad_opt(), bcpio_wr(), buf_flush(), chk_ftime(), chk_same(), copy(), cpio_options(), cpio_wr(), dev_start(), dir_start(), fix_path(), ftime_start(), ftree_add(), ftree_chk(), ftree_start(), gen_init(), get_phys(), gidtb_start(), grp_add(), grptb_start(), lnk_creat(), lnk_start(), main(), map_dev(), mk_link(), mkpath(), mod_name(), name_start(), next_head(), node_creat(), opt_add(), pat_add(), pat_chk(), pat_sel(), pax_options(), rd_ln_nm(), rd_nm(), rd_start(), rd_sync(), rd_wrfile(), rep_add(), rep_name(), sig_cleanup(), tar_opt(), tar_options(), tar_wr(), trng_add(), tty_init(), uidtb_start(), usr_add(), usrtb_start(), ustar_wr(), vcpio_wr(), wr_rdfile(), and wr_start().

void pback char *  ,
int 
 

Definition at line 374 of file buf_subs.c.

References bufpt, and memcpy().

void proc_dir void   ) 
 

Definition at line 1163 of file tables.c.

References cnt, dircnt, dirfd, if(), lseek, patime, PAXPATHLEN, pmode, pmtime, read, SEEK_CUR, SEEK_SET, set_ftime(), and set_pmode().

Referenced by copy(), extract(), sig_cleanup(), and wr_archive().

void purg_lnk ARCHD  ) 
 

Definition at line 214 of file tables.c.

References hrdlnk::dev, hrdlnk::fow, free, indx(), hrdlnk::ino, L_TAB_SZ, ltab, hrdlnk::name, NULL, PAX_DIR, PAX_HLK, PAX_HRG, archd::sb, stat::st_dev, stat::st_ino, stat::st_nlink, and archd::type.

Referenced by copy(), extract(), and wr_archive().

int rd_skip off_t   ) 
 

Definition at line 390 of file buf_subs.c.

References ar_fow(), buf_fill(), bufend, bufpt, cnt, L, MIN, rdblksz, and rdcnt.

Referenced by append(), bcpio_rd(), extract(), list(), and vcpio_rd().

int rd_start void   ) 
 

Definition at line 130 of file buf_subs.c.

References act, APPND, ar_next(), ar_open(), arcname, BLKMULT, bufend, bufmem, bufpt, MAXBLK, paxwarn(), rdblksz, rdcnt, and wrblksz.

int rd_sync void   ) 
 

Definition at line 306 of file buf_subs.c.

References act, APPND, ar_next(), ar_rdsync(), ar_read(), blksz, bufend, bufpt, errcnt, maxflt, paxwarn(), and rdcnt.

Referenced by next_head().

int rd_wrbuf char *  ,
int 
 

Definition at line 516 of file buf_subs.c.

References buf_fill(), bufend, bufpt, cnt, memcpy(), and MIN.

Referenced by next_head(), rd_ln_nm(), and rd_nm().

int rd_wrfile ARCHD ,
int  ,
off_t
 

Definition at line 663 of file buf_subs.c.

References buf_fill(), bufend, bufpt, cnt, archd::crc, crc(), docrc, errno, file_flush(), file_write(), fstat, int(), L, MIN, MINFBSZ, archd::name, paxwarn(), rem, sb, archd::sb, size, stat::st_size, and syswarn().

void rdfile_close ARCHD ,
int * 
 

Definition at line 906 of file file_subs.c.

References close, archd::org_name, archd::sb, set_ftime(), stat::st_atime, stat::st_mtime, and tflag.

Referenced by copy(), and wr_archive().

int rep_add char *   ) 
 

Definition at line 97 of file pat_rep.c.

References BUFSIZ, replace::flgs, replace::fow, free, GLOB, malloc(), replace::nstr, NULL, paxwarn(), PRNT, replace::rcmp, regcomp, regerror, regfree(), rephead, reptail, and strchr.

Referenced by pax_options(), and tar_options().

int sel_chk ARCHD  ) 
 

Definition at line 77 of file sel_subs.c.

References grp_match(), grptb, NULL, trhead, trng_match(), usr_match(), and usrtb.

Referenced by append(), copy(), extract(), list(), and wr_archive().

int set_crc ARCHD ,
int 
 

Definition at line 936 of file file_subs.c.

References crc(), archd::crc, FILEBLK, i, L, read, sb, archd::sb, and size.

Referenced by wr_archive().

int set_dest ARCHD ,
char *  ,
int 
 

Definition at line 767 of file pat_rep.c.

References fix_path(), archd::ln_name, archd::ln_nlen, archd::name, archd::nlen, PAX_HLK, PAX_HRG, and archd::type.

Referenced by copy().

void set_ftime char *  fnm,
time_t  mtime,
time_t  atime,
int  frc
 

Definition at line 639 of file file_subs.c.

References utimbuf::actime, errno, L, lstat, utimbuf::modtime, patime, pmtime, sb, syswarn(), timeval::tv_sec, and utime.

Referenced by atdir_end(), file_close(), proc_dir(), and rdfile_close().

int set_ids char *  ,
uid_t  ,
gid_t 
 

Definition at line 686 of file file_subs.c.

References argv0, chown, EPERM, errno, geteuid, NM_PAX, strcmp, syswarn(), and vflag.

Referenced by file_close().

int set_lids char *  ,
uid_t  ,
gid_t 
 

Definition at line 710 of file file_subs.c.

References argv0, EPERM, errno, geteuid, NM_PAX, strcmp, syswarn(), and vflag.

void set_pmode char *  ,
mode_t 
 

Definition at line 737 of file file_subs.c.

References ABITS, chmod, errno, and syswarn().

Referenced by file_close(), and proc_dir().

void sig_cleanup int   ) 
 

Definition at line 302 of file pax.c.

References ar_close(), atdir_end(), exit(), paxwarn(), proc_dir(), tflag, vflag, and vfpart.

Referenced by gen_init().

u_int st_hash char *  ,
int  ,
int 
 

Definition at line 1226 of file tables.c.

References i, key, MAXKEYLEN, and val.

Referenced by add_name(), chk_ftime(), gid_name(), sub_name(), and uid_name().

void sub_name char *  ,
int *  ,
size_t 
 

Definition at line 574 of file tables.c.

References namt::fow, indx(), l_strncpy(), N_TAB_SZ, namt::nname, ntab, NULL, namt::oname, st_hash(), and strcmp.

Referenced by mod_name().

void syswarn int  ,
int  ,
const char *  ,
  ...
 

Definition at line 164 of file tty_subs.c.

References argv0, exit_val, fflush(), fprintf(), fputc(), listf, stderr, strerror(), va_end, va_start, vflag, vfpart, and vfprintf().

Referenced by ar_fow(), ar_next(), ar_open(), ar_read(), ar_rev(), ar_set_wr(), ar_write(), chk_ftime(), copy(), cp_file(), extract(), file_close(), file_creat(), file_flush(), file_write(), ftime_start(), gen_init(), get_phys(), lnk_creat(), main(), mk_link(), mkpath(), rd_wrfile(), set_ftime(), set_ids(), set_lids(), set_pmode(), unlnk_exist(), wr_archive(), and wr_rdfile().

off_t tar_endrd void   ) 
 

Definition at line 89 of file tar.c.

References BLKMULT.

int tar_endwr void   ) 
 

Definition at line 76 of file tar.c.

References BLKMULT, and wr_skip().

int tar_id char *  ,
int 
 

Definition at line 299 of file tar.c.

References asc_ul(), BLKMULT, HD_TAR::chksum, HD_USTAR::magic, HD_TAR::name, OCT, strncmp(), tar_chksm(), TMAGIC, and TMAGLEN.

Referenced by tar_rd().

int tar_opt void   ) 
 

Definition at line 333 of file tar.c.

References act, APPND, ARCHIVE, oplist::name, NULL, opt_next(), paxwarn(), strcmp, tar_nodir, and oplist::value.

int tar_rd ARCHD ,
char * 
 

Definition at line 370 of file tar.c.

References AREGTYPE, asc_ul(), asc_uqd(), BLKMULT, DIRTYPE, HD_TAR::gid, l_strncpy(), HD_TAR::linkflag, HD_TAR::linkname, archd::ln_name, archd::ln_nlen, LNKTYPE, MIN, HD_TAR::mode, HD_TAR::mtime, archd::name, HD_TAR::name, archd::nlen, NULL, OCT, archd::org_name, archd::pad, archd::pat, PAX_DIR, PAX_HLK, PAX_REG, PAX_SLK, REGTYPE, S_IFDIR, S_IFLNK, S_IFREG, archd::sb, HD_TAR::size, archd::skip, stat::st_atime, stat::st_ctime, stat::st_gid, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_size, stat::st_uid, SYMTYPE, tar_id(), time_t, archd::type, and HD_TAR::uid.

int tar_trail char *  ,
int  ,
int * 
 

Definition at line 106 of file tar.c.

References BLKMULT, and i.

int tar_wr ARCHD  ) 
 

Definition at line 507 of file tar.c.

References AREGTYPE, BLKMULT, HD_TAR::chksum, HD_TAR::gid, L, l_strncpy(), HD_TAR::linkflag, HD_TAR::linkname, archd::ln_name, archd::ln_nlen, LNKTYPE, memset(), HD_TAR::mode, HD_TAR::mtime, HD_TAR::name, archd::name, archd::nlen, archd::org_name, out, archd::pad, PAX_BLK, PAX_CHR, PAX_CTG, PAX_DIR, PAX_FIF, PAX_HLK, PAX_HRG, PAX_REG, PAX_SCK, PAX_SLK, paxwarn(), archd::sb, HD_TAR::size, stat::st_gid, stat::st_mode, stat::st_mtime, stat::st_size, stat::st_uid, SYMTYPE, tar_chksm(), tar_nodir, archd::type, HD_TAR::uid, ul_oct(), uqd_oct(), wr_rdbuf(), and wr_skip().

int trng_add char *   ) 
 

Definition at line 326 of file sel_subs.c.

References NULL, paxwarn(), and strrchr().

Referenced by pax_options().

int tty_init void   ) 
 

Definition at line 66 of file tty_subs.c.

References CONS_MINOR, END_TTY, FIRST_TTY, if(), kb_init(), NR_CONS, s, scr_init(), sigaction, termios_defaults, tmr_inittimer, tp, tty_addr, and tty_devnop().

Referenced by main().

void tty_prnt const char *  ,
  ...
 

Definition at line 93 of file tty_subs.c.

References fflush(), NULL, ttyoutf, va_end, va_start, and vfprintf().

Referenced by ar_next(), ls_tty(), and tty_rename().

int tty_read char *  ,
int 
 

Definition at line 113 of file tty_subs.c.

References fgets(), NULL, strchr, and ttyinf.

Referenced by ar_next(), and tty_rename().

int uid_name char *  ,
uid_t
 

Definition at line 312 of file cache.c.

References getpwnam(), INVALID, malloc(), namelen, NULL, ptr, passwd::pw_uid, pwopn, setpassent, st_hash(), strcmp, strlen(), strncpy(), UNM_SZ, UNMLEN, usrtb, usrtb_start(), and VALID.

Referenced by ustar_rd().

int uidtb_start void   ) 
 

Definition at line 74 of file cache.c.

References calloc(), fail, NULL, paxwarn(), UID_SZ, and uidtb.

Referenced by list(), name_uid(), and ustar_stwr().

int ul_asc u_long  ,
char *  ,
int  ,
int 
 

Definition at line 276 of file gen_subs.c.

References digit, and HEX.

Referenced by cpio_wr(), and vcpio_wr().

int unlnk_exist char *  ,
int 
 

Definition at line 504 of file file_subs.c.

References errno, kflag, lstat, PAX_DIR, rmdir, S_ISDIR, sb, syswarn(), and unlink.

Referenced by file_creat().

int uqd_asc u_quad_t  ,
char *  ,
int  ,
int 
 

Definition at line 373 of file gen_subs.c.

References digit, and HEX.

Referenced by cpio_wr(), and vcpio_wr().

int usr_add char *   ) 
 

Definition at line 102 of file sel_subs.c.

References atoi, calloc(), endpwent(), usrt::fow, getpwnam(), indx(), NULL, paxwarn(), passwd::pw_uid, strtoul(), uid, usrt::uid, USR_TB_SZ, and usrtb.

Referenced by pax_options().

int usrtb_start void   ) 
 

Definition at line 122 of file cache.c.

References calloc(), fail, NULL, paxwarn(), UNM_SZ, and usrtb.

Referenced by uid_name(), and ustar_strd().

int ustar_id char *  ,
int 
 

Definition at line 699 of file tar.c.

References asc_ul(), BLKMULT, HD_USTAR::chksum, HD_USTAR::magic, HD_USTAR::name, OCT, strncmp(), tar_chksm(), TMAGIC, and TMAGLEN.

Referenced by ustar_rd().

int ustar_rd ARCHD ,
char * 
 

Definition at line 731 of file tar.c.

References AREGTYPE, asc_ul(), asc_uqd(), BLKMULT, BLKTYPE, CHRTYPE, cnt, CONTTYPE, HD_USTAR::devmajor, HD_USTAR::devminor, DIRTYPE, FIFOTYPE, HD_USTAR::gid, gid_name(), HD_USTAR::gname, l_strncpy(), HD_USTAR::linkname, archd::ln_name, archd::ln_nlen, LNKTYPE, MIN, HD_USTAR::mode, HD_USTAR::mtime, archd::name, HD_USTAR::name, archd::nlen, NULL, OCT, archd::org_name, archd::pad, archd::pat, PAX_BLK, PAX_CHR, PAX_DIR, PAX_FIF, PAX_HLK, PAX_REG, PAX_SLK, HD_USTAR::prefix, REGTYPE, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFREG, archd::sb, HD_USTAR::size, archd::skip, stat::st_atime, stat::st_ctime, stat::st_gid, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, SYMTYPE, time_t, TODEV, archd::type, HD_USTAR::typeflag, HD_USTAR::uid, uid_name(), HD_USTAR::uname, and ustar_id().

int ustar_strd void   ) 
 

Definition at line 668 of file tar.c.

References grptb_start(), and usrtb_start().

int ustar_stwr void   ) 
 

Definition at line 683 of file tar.c.

References gidtb_start(), and uidtb_start().

int ustar_wr ARCHD  ) 
 

Definition at line 895 of file tar.c.

References BLKMULT, BLKTYPE, HD_USTAR::chksum, CHRTYPE, CONTTYPE, HD_USTAR::devmajor, HD_USTAR::devminor, DIRTYPE, FIFOTYPE, HD_USTAR::gid, HD_USTAR::gname, L, l_strncpy(), HD_USTAR::linkname, archd::ln_name, archd::ln_nlen, LNKTYPE, HD_USTAR::magic, major, memset(), minor, HD_USTAR::mode, HD_USTAR::mtime, archd::name, HD_USTAR::name, name_gid(), name_split(), name_uid(), archd::nlen, NULL, archd::org_name, out, archd::pad, PAX_BLK, PAX_CHR, PAX_CTG, PAX_DIR, PAX_FIF, PAX_HLK, PAX_HRG, PAX_REG, PAX_SCK, PAX_SLK, paxwarn(), HD_USTAR::prefix, REGTYPE, archd::sb, HD_USTAR::size, stat::st_gid, stat::st_mode, stat::st_mtime, stat::st_rdev, stat::st_size, stat::st_uid, SYMTYPE, tar_chksm(), TMAGIC, TMAGLEN, TVERSION, TVERSLEN, archd::type, HD_USTAR::typeflag, HD_USTAR::uid, ul_oct(), HD_USTAR::uname, uqd_oct(), HD_USTAR::version, wr_rdbuf(), and wr_skip().

off_t vcpio_endrd void   ) 
 

Definition at line 668 of file cpio.c.

References TRAILER.

int vcpio_id char *  ,
int 
 

Definition at line 517 of file cpio.c.

References strncmp().

Referenced by vcpio_rd().

int vcpio_rd ARCHD ,
char * 
 

Definition at line 565 of file cpio.c.

References asc_ul(), asc_uqd(), HD_VCPIO::c_chksum, HD_VCPIO::c_filesize, HD_VCPIO::c_gid, C_IFMT, HD_VCPIO::c_ino, C_ISLNK, HD_VCPIO::c_maj, HD_VCPIO::c_min, HD_VCPIO::c_mode, HD_VCPIO::c_mtime, HD_VCPIO::c_namesize, HD_VCPIO::c_nlink, HD_VCPIO::c_rmaj, HD_VCPIO::c_rmin, HD_VCPIO::c_uid, com_rd(), archd::crc, crc_id(), docrc, HEX, L, archd::ln_name, archd::ln_nlen, archd::nlen, archd::pad, rd_ln_nm(), rd_nm(), rd_skip(), archd::sb, stat::st_atime, stat::st_ctime, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, time_t, TODEV, and vcpio_id().

int vcpio_wr ARCHD  ) 
 

Definition at line 698 of file cpio.c.

References HD_VCPIO::c_chksum, HD_VCPIO::c_filesize, HD_VCPIO::c_gid, HD_VCPIO::c_ino, HD_VCPIO::c_magic, HD_VCPIO::c_maj, HD_VCPIO::c_min, HD_VCPIO::c_mode, HD_VCPIO::c_mtime, HD_VCPIO::c_namesize, HD_VCPIO::c_nlink, HD_VCPIO::c_rmaj, HD_VCPIO::c_rmin, HD_VCPIO::c_uid, archd::crc, docrc, HEX, L, archd::ln_name, archd::ln_nlen, major, map_dev(), minor, archd::name, archd::nlen, OCT, archd::org_name, out, archd::pad, PAX_BLK, PAX_CHR, PAX_CTG, PAX_HRG, PAX_REG, PAX_SLK, paxwarn(), archd::sb, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_nlink, stat::st_rdev, stat::st_size, stat::st_uid, archd::type, ul_asc(), uqd_asc(), VCMAGIC, VMAGIC, wr_rdbuf(), and wr_skip().

void wr_fin void   ) 
 

Definition at line 459 of file buf_subs.c.

References blksz, buf_flush(), bufend, bufpt, and memset().

Referenced by wr_archive().

int wr_rdbuf char *  ,
int 
 

Definition at line 480 of file buf_subs.c.

References blksz, buf_flush(), bufend, bufpt, cnt, memcpy(), and MIN.

Referenced by bcpio_wr(), cpio_wr(), tar_wr(), ustar_wr(), and vcpio_wr().

int wr_rdfile ARCHD ,
int  ,
off_t
 

Definition at line 602 of file buf_subs.c.

References blksz, buf_flush(), bufend, bufpt, cnt, errno, fstat, L, MIN, archd::org_name, paxwarn(), read, sb, archd::sb, size, stat::st_mtime, stat::st_size, and syswarn().

int wr_skip off_t   ) 
 

Definition at line 564 of file buf_subs.c.

References blksz, buf_flush(), bufend, bufpt, cnt, L, memset(), and MIN.

Referenced by bcpio_wr(), tar_endwr(), tar_wr(), ustar_wr(), vcpio_wr(), and wr_archive().

int wr_start void   ) 
 

Definition at line 82 of file buf_subs.c.

References ar_next(), ar_open(), arcname, BLKMULT, blksz, fsub::bsz, bufend, bufmem, bufpt, frmt, MAXBLK, MAXBLK_POSIX, paxwarn(), rdblksz, wrblksz, and wrcnt.

Referenced by archive().


Variable Documentation

int act
 

Definition at line 70 of file pax.c.

Referenced by appnd_start(), ar_close(), ar_next(), ar_open(), ar_rdsync(), cpio_options(), main(), print_conflicts(), rd_start(), rd_sync(), tar_opt(), and tar_options().

const char* arcname
 

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().

const char* argv0
 

Definition at line 98 of file pax.c.

Referenced by append(), ar_app_ok(), ar_close(), ar_next(), options(), paxwarn(), set_ids(), set_lids(), syswarn(), and tty_rename().

int blksz
 

Definition at line 66 of file buf_subs.c.

Referenced by appnd_start(), ar_open(), buf_fill(), buf_flush(), cp_file(), cp_start(), rd_sync(), wr_fin(), wr_rdbuf(), wr_rdfile(), wr_skip(), and wr_start().

int cflag
 

Definition at line 72 of file pax.c.

Referenced by copylink(), cpio_options(), display(), dumpfile(), ini_terminal(), main(), next_screen(), parsopt(), pat_match(), pax_options(), prev_screen(), and show().

char* chdname
 

Definition at line 187 of file extern.h.

Referenced by ar_open(), and tar_options().

int cwdfd
 

Definition at line 73 of file pax.c.

Referenced by extract(), and main().

int Dflag
 

Definition at line 82 of file pax.c.

Referenced by cat(), copy(), extract(), and pax_options().

int dflag
 

Definition at line 5 of file main.c.

char* dirptr
 

Definition at line 97 of file pax.c.

Referenced by copy(), and cpio_options().

int docrc
 

Definition at line 96 of file pax.c.

Referenced by crc_strd(), crc_stwr(), doSITE(), rd_wrfile(), vcpio_rd(), vcpio_wr(), and wr_archive().

int exit_val
 

Definition at line 95 of file pax.c.

Referenced by appnd_start(), buf_flush(), main(), paxwarn(), and syswarn().

u_long flcnt
 

Definition at line 65 of file ar_subs.c.

Referenced by ar_close(), ar_open(), copy(), and wr_archive().

int ford[]
 

Definition at line 149 of file options.c.

Referenced by get_arc().

FSUB* frmt
 

Definition at line 71 of file pax.c.

Referenced by append(), ar_close(), ar_write(), archive(), cpio_endwr(), cpio_options(), extract(), list(), next_head(), pax_options(), tar_options(), wr_archive(), and wr_start().

FSUB fsub[]
 

Definition at line 106 of file options.c.

Referenced by cpio_options(), pax_options(), and tar_options().

const char* gzip_program
 

Definition at line 81 of file ar_io.c.

Referenced by ar_open(), cpio_options(), main(), pax_options(), and tar_options().

int Hflag
 

Definition at line 83 of file pax.c.

Referenced by ftree_start(), pax_options(), and tar_options().

int iflag
 

Definition at line 75 of file pax.c.

int kflag
 

Definition at line 76 of file pax.c.

Referenced by chk_same(), cpio_options(), main(), mk_link(), pax_options(), and unlnk_exist().

int Lflag
 

Definition at line 84 of file pax.c.

int lflag
 

Definition at line 6 of file main.c.

FILE* listf
 

Definition at line 100 of file pax.c.

Referenced by append(), ar_close(), copy(), cpio_options(), extract(), main(), paxwarn(), syswarn(), tar_options(), and wr_archive().

int maxflt
 

Definition at line 68 of file buf_subs.c.

Referenced by cpio_options(), pax_options(), rd_sync(), and tar_options().

int nflag
 

Definition at line 53 of file backup.c.

int nodirs
 

Definition at line 91 of file pax.c.

Referenced by cpio_options(), file_creat(), and mk_link().

int patime
 

Definition at line 89 of file pax.c.

Referenced by file_close(), pax_options(), proc_dir(), and set_ftime().

int pids
 

Definition at line 93 of file pax.c.

Referenced by cpio_options(), file_close(), pax_options(), pclose(), popen(), and tar_options().

int pmode
 

Definition at line 92 of file pax.c.

Referenced by cpio_options(), file_close(), pax_options(), proc_dir(), and tar_options().

int pmtime
 

Definition at line 90 of file pax.c.

Referenced by cpio_options(), file_close(), pax_options(), proc_dir(), set_ftime(), and tar_options().

int rdblksz
 

Definition at line 69 of file buf_subs.c.

Referenced by appnd_start(), ar_app_ok(), ar_open(), ar_read(), ar_rev(), cp_start(), rd_skip(), rd_start(), and wr_start().

off_t rdcnt
 

Definition at line 72 of file buf_subs.c.

Referenced by appnd_start(), ar_close(), buf_fill(), rd_skip(), rd_start(), and rd_sync().

int rmleadslash
 

Definition at line 94 of file pax.c.

Referenced by mod_name(), and tar_options().

char* tempbase
 

Definition at line 102 of file pax.c.

Referenced by dir_start(), ftime_start(), and main().

char* tempfile
 

Definition at line 101 of file pax.c.

Referenced by dir_start(), ftime_start(), initialize(), main(), opentemp(), and subr().

int tflag
 

Definition at line 8 of file main.c.

int uflag
 

Definition at line 80 of file pax.c.

Referenced by append(), archive(), copy(), extract(), fmtdate(), ini_terminal(), main(), parsopt(), pax_options(), show(), switch(), and wr_archive().

int vflag
 

Definition at line 9 of file main.c.

int vfpart
 

Definition at line 88 of file pax.c.

Referenced by append(), ar_close(), ar_next(), copy(), extract(), paxwarn(), sig_cleanup(), syswarn(), and wr_archive().

int wrblksz
 

Definition at line 67 of file buf_subs.c.

Referenced by appnd_start(), ar_open(), cpio_options(), pax_options(), rd_start(), tar_options(), and wr_start().

off_t wrcnt
 

Definition at line 71 of file buf_subs.c.

Referenced by appnd_start(), ar_close(), buf_flush(), and wr_start().

off_t wrlimit
 

Definition at line 70 of file buf_subs.c.

Referenced by buf_flush(), and pax_options().

int Xflag
 

Definition at line 85 of file pax.c.

Referenced by ftree_start(), pax_options(), and tar_options().

int Yflag
 

Definition at line 86 of file pax.c.

Referenced by copy(), extract(), and pax_options().

int Zflag
 

Definition at line 87 of file pax.c.

Referenced by copy(), extract(), and pax_options().


Generated on Fri Apr 14 23:05:43 2006 for minix by  doxygen 1.4.6