diff options
author | joerg <joerg@pkgsrc.org> | 2010-03-16 17:05:42 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2010-03-16 17:05:42 +0000 |
commit | 2f4361fa7655585f981c7394c83c6e747bb52048 (patch) | |
tree | 68dc0a9414a284fa5a19a4f5770378a3675d3cbc /archivers | |
parent | 1360c7b7c8b222d6909481734ab07522ee6df4e7 (diff) | |
download | pkgsrc-2f4361fa7655585f981c7394c83c6e747bb52048.tar.gz |
libarchive-2.8.3: Build fix for Linux
Diffstat (limited to 'archivers')
54 files changed, 9410 insertions, 15827 deletions
diff --git a/archivers/libarchive/files/build/autoconf/compile b/archivers/libarchive/files/build/autoconf/compile index c0096a7b563..1b1d2321695 100755 --- a/archivers/libarchive/files/build/autoconf/compile +++ b/archivers/libarchive/files/build/autoconf/compile @@ -1,10 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. -scriptversion=2009-10-06.20; # UTC +scriptversion=2005-05-14.22 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -18,7 +17,8 @@ scriptversion=2009-10-06.20; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -103,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then fi # Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break @@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15 ret=$? if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" + mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" + mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" @@ -138,6 +138,5 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: diff --git a/archivers/libarchive/files/build/autoconf/config.guess b/archivers/libarchive/files/build/autoconf/config.guess index c2246a4f7f4..0e30d56e94e 100755 --- a/archivers/libarchive/files/build/autoconf/config.guess +++ b/archivers/libarchive/files/build/autoconf/config.guess @@ -1,10 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2003-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -18,25 +17,23 @@ timestamp='2009-12-30' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - -# Originally written by Per Bothner. Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry. +# Originally written by Per Bothner <per@bothner.com>. +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +53,8 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -70,11 +66,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; + echo "$timestamp" ; exit 0 ;; --version | -v ) - echo "$version" ; exit ;; + echo "$version" ; exit 0 ;; --help | --h* | -h ) - echo "$usage"; exit ;; + echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -108,7 +104,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -127,7 +123,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -162,7 +158,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -171,7 +166,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ + | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -201,32 +196,50 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit ;; + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) + if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac + fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -264,49 +277,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac - # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit ;; + exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit ;; + exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit ;; + exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; + exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit ;; + exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit ;; + exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -314,51 +320,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit ;; + exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit ;; + exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; + sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -367,10 +354,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; + exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; + exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -382,10 +369,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit ;; + exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; + exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -396,40 +383,37 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; + exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; + exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit ;; + exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; + exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; + exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; + exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -453,33 +437,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} - exit ;; + exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit ;; + exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit ;; + exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit ;; + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit ;; + exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit ;; + exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit ;; + exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit ;; + exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -495,29 +478,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit ;; + exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit ;; + exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit ;; + exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit ;; + exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; + exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit ;; + exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -525,7 +508,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -540,19 +523,15 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit ;; - *:AIX:*:[456]) + exit 0 ;; + *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -565,28 +544,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; + exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix - exit ;; + exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit ;; + exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit ;; + exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit ;; + exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit ;; + exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit ;; + exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -648,19 +627,9 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -668,11 +637,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; + exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit ;; + exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -700,248 +669,211 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 - exit ;; + exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit ;; + exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit ;; + exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit ;; + exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit ;; + exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit ;; + exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit ;; + exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit ;; + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + exit 0 ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; + exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; + exit 0 ;; + *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/FreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) + exit 0 ;; + i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; + exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit ;; + exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit ;; + exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; + exit 0 ;; *:GNU:*:*) - # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; + exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; + exit 0 ;; arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; + exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) + exit 0 ;; + mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + CPU=mips #else CPU= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -949,40 +881,84 @@ EOF PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit ;; + exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; + exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit ;; + exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -990,27 +966,24 @@ EOF # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; + exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; + exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit ;; + exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1018,16 +991,15 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + exit 0 ;; + i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; + exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` @@ -1045,86 +1017,73 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv32 fi - exit ;; + exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 - exit ;; + exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 - exit ;; + exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit ;; + exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit ;; + exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit ;; + exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit ;; + exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit ;; + exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit ;; + exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit ;; + exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1132,94 +1091,68 @@ EOF else echo ns32k-sni-sysv fi - exit ;; + exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 - exit ;; + exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit ;; + exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; + exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit ;; + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit ;; + exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit ;; + exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit ;; + exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit ;; + exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; + exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1227,25 +1160,22 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; + exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; + exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit ;; + exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit ;; + exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; + exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1256,50 +1186,28 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; + exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit ;; + exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit ;; + exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit ;; + exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit ;; + exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit ;; + exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its - exit ;; + exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1331,7 +1239,7 @@ main () #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); + printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1420,12 +1328,11 @@ main () } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) @@ -1434,22 +1341,22 @@ then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit ;; + exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit 0 ;; c34*) echo c34-convex-bsd - exit ;; + exit 0 ;; c38*) echo c38-convex-bsd - exit ;; + exit 0 ;; c4*) echo c4-convex-bsd - exit ;; + exit 0 ;; esac fi @@ -1460,9 +1367,7 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + ftp://ftp.gnu.org/pub/gnu/config/ If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/archivers/libarchive/files/build/autoconf/config.sub b/archivers/libarchive/files/build/autoconf/config.sub index 85186096a9e..9d7f7339054 100755 --- a/archivers/libarchive/files/build/autoconf/config.sub +++ b/archivers/libarchive/files/build/autoconf/config.sub @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2009-12-31' +timestamp='2003-07-04' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -22,26 +21,22 @@ timestamp='2009-12-31' # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. - # Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -75,9 +70,8 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -89,11 +83,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; + echo "$timestamp" ; exit 0 ;; --version | -v ) - echo "$version" ; exit ;; + echo "$version" ; exit 0 ;; --help | --h* | -h ) - echo "$usage"; exit ;; + echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -105,7 +99,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit ;; + exit 0;; * ) break ;; @@ -124,10 +118,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -153,13 +144,10 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk - ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -181,10 +169,6 @@ case $os in -hiux*) os=-hiuxwe2 ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -201,10 +185,6 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -248,71 +228,53 @@ case $basic_machine in | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | moxie \ - | mt \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ - | or32 \ + | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) + | x86 | xscale | xstormy16 | xtensa \ + | z8k) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) + m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; - ms1) - basic_machine=mt-unknown - ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -330,70 +292,56 @@ case $basic_machine in | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ + | avr-* \ + | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ + | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ + | ip2k-* \ + | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ - | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -411,9 +359,6 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) - basic_machine=abacus-unknown - ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -431,9 +376,6 @@ case $basic_machine in amd64) basic_machine=x86_64-pc ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -457,10 +399,6 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; - aros) - basic_machine=i386-pc - os=-aros - ;; aux) basic_machine=m68k-apple os=-aux @@ -469,26 +407,10 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -513,27 +435,12 @@ case $basic_machine in basic_machine=j90-cray os=-unicos ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; crds | unos) basic_machine=m68k-crds ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -556,14 +463,6 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -714,14 +613,6 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -733,17 +624,10 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) - basic_machine=microblaze-xilinx - ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) basic_machine=m68000-convergent ;; @@ -757,6 +641,10 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -769,9 +657,6 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; mvs) basic_machine=i370-ibm os=-mvs @@ -840,6 +725,10 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -847,12 +736,9 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - openrisc | openrisc-*) + or32 | or32-*) basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 + os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -870,14 +756,6 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; pbd) basic_machine=sparc-tti ;; @@ -887,12 +765,6 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -949,10 +821,6 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -979,10 +847,6 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; sei) basic_machine=mips-sei os=-seiux @@ -994,9 +858,6 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sh5el) - basic_machine=sh5le-unknown - ;; sh64) basic_machine=sh64-unknown ;; @@ -1086,10 +947,6 @@ case $basic_machine in basic_machine=tic6x-unknown os=-coff ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; tx39) basic_machine=mipstx39-unknown ;; @@ -1103,10 +960,6 @@ case $basic_machine in tower | tower-32) basic_machine=m68k-ncr ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; udi29k) basic_machine=a29k-amd os=-udi @@ -1150,10 +1003,6 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; xps | xps100) basic_machine=xps100-honeywell ;; @@ -1165,10 +1014,6 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1188,9 +1033,6 @@ case $basic_machine in romp) basic_machine=romp-ibm ;; - mmix) - basic_machine=mmix-knuth - ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1207,10 +1049,13 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1257,9 +1102,6 @@ case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1280,30 +1122,25 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1321,15 +1158,12 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1342,9 +1176,6 @@ case $os in -opened*) os=-openedition ;; - -os400*) - os=-os400 - ;; -wince*) os=-wince ;; @@ -1366,9 +1197,6 @@ case $os in -atheos*) os=-atheos ;; - -syllable*) - os=-syllable - ;; -386bsd) os=-bsd ;; @@ -1391,9 +1219,6 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) - os=-tpf - ;; -triton*) os=-sysv3 ;; @@ -1430,14 +1255,6 @@ case $os in -kaos*) os=-kaos ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; -none) ;; *) @@ -1460,12 +1277,6 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1475,9 +1286,9 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1503,9 +1314,6 @@ case $basic_machine in m68*-cisco) os=-aout ;; - mep-*) - os=-elf - ;; mips*-cisco) os=-elf ;; @@ -1524,15 +1332,9 @@ case $basic_machine in *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; - *-knuth) - os=-mmixware - ;; *-wec) os=-proelf ;; @@ -1635,7 +1437,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -cnk*|-aix*) + -aix*) vendor=ibm ;; -beos*) @@ -1665,15 +1467,9 @@ case $basic_machine in -mvs* | -opened*) vendor=ibm ;; - -os400*) - vendor=ibm - ;; -ptx*) vendor=sequent ;; - -tpf*) - vendor=ibm - ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; @@ -1698,7 +1494,7 @@ case $basic_machine in esac echo $basic_machine$os -exit +exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/archivers/libarchive/files/build/autoconf/depcomp b/archivers/libarchive/files/build/autoconf/depcomp index df8eea7e4ce..e5f9736c723 100755 --- a/archivers/libarchive/files/build/autoconf/depcomp +++ b/archivers/libarchive/files/build/autoconf/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2007-03-29.01 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,9 @@ scriptversion=2009-04-28.21; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -85,15 +87,6 @@ if test "$depmode" = dashXmstdout; then depmode=dashmstdout fi -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -199,14 +192,14 @@ sgi) ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' -' ' ' >> "$depfile" - echo >> "$depfile" +' ' ' >> $depfile + echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -335,12 +328,7 @@ hp2) if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -416,7 +404,7 @@ dashmstdout) # Remove the call to Libtool. if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do + while test $1 != '--mode=compile'; do shift done shift @@ -467,39 +455,32 @@ makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do + while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no eat=no - for arg - do + cleared=no + for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac - if test $eat = yes; then - eat=no - continue - fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix=`echo "$object" | sed 's/^.*\././'` + obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" @@ -519,7 +500,7 @@ cpp) # Remove the call to Libtool. if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do + while test $1 != '--mode=compile'; do shift done shift @@ -557,27 +538,13 @@ cpp) msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - IFS=" " for arg do case "$arg" in - -o) - shift - ;; - $object) - shift - ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -590,23 +557,16 @@ msvisualcpp) ;; esac done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - none) exec "$@" ;; @@ -625,6 +585,5 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: diff --git a/archivers/libarchive/files/build/autoconf/install-sh b/archivers/libarchive/files/build/autoconf/install-sh index ea199dbf6a9..a5897de6ea7 100755 --- a/archivers/libarchive/files/build/autoconf/install-sh +++ b/archivers/libarchive/files/build/autoconf/install-sh @@ -1,23 +1,38 @@ #!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# $NetBSD: install-sh,v 1.1.1.2 2010/03/14 17:56:28 joerg Exp $ -# This script now also installs multiple files, but might choke on installing -# multiple files with spaces in the file names. +# Copyright (C) 1994 X Consortium # -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. # -# Copyright 1991 by the Massachusetts Institute of Technology # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it @@ -26,266 +41,479 @@ # This script is compatible with the BSD install script, but was written # from scratch. +nl=' +' +IFS=" "" $nl" + # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -awkprog="${AWKPROG-awk}" -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -instcmd="$mvprog" -pathcompchmodcmd="$chmodprog 755" -chmodcmd="$chmodprog 755" -chowncmd="" -chgrpcmd="" -stripcmd="" -stripflags="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -msrc="" -dst="" -dir_arg="" -suffix="" -suffixfmt="" - -while [ x"$1" != x ]; do - case $1 in - -b) suffix=".old" - shift - continue;; - - -B) suffixfmt="$2" - shift - shift - continue;; - - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -S) stripcmd="$stripprog" - stripflags="-S $2 $stripflags" - shift - shift - continue;; - - *) if [ x"$msrc" = x ] - then - msrc="$dst" - else - msrc="$msrc $dst" - fi - src="$dst" - dst="$1" - shift - continue;; - esac -done - -if [ x"$dir_arg" = x ] -then - dstisfile="" - if [ ! -d "$dst" ] - then - if [ x"$msrc" = x"$src" ] - then - dstisfile=true - else - echo "install: destination is not a directory" - exit 1 - fi - fi +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec else - msrc="$msrc $dst" + doit_exec=$doit fi -if [ x"$msrc" = x ] -then - echo "install: no destination specified" - exit 1 -fi +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -for srcarg in $msrc; do +posix_mkdir= -if [ x"$dir_arg" != x ]; then +# Desired mode of installed file. +mode=0755 - dstarg="$srcarg" -else - dstarg="$dst" - -# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f "$srcarg" ] - then - doinst="$instcmd" - elif [ -d "$srcarg" ] - then - echo "install: $srcarg: not a regular file" - exit 1 - elif [ "$srcarg" = "/dev/null" ] - then - doinst="$cpprog" - else - echo "install: $srcarg does not exist" - exit 1 - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= - if [ -d "$dstarg" ] - then - dstarg="$dstarg"/`basename "$srcarg"` - fi -fi +src= +dst= +dir_arg= +dst_arg= -## this sed command emulates the dirname command -dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +copy_on_change=false +no_target_directory= -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" +Options: + --help display this help and exit. + --version display version info and exit. -pathcomp='' + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" - if [ ! -d "${pathcomp}" ] ; - then - $doit $mkdirprog "${pathcomp}" - if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi && - if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi +while test $# -ne 0; do + case $1 in + -c) ;; - else - true - fi + -C) copy_on_change=true;; - pathcomp="${pathcomp}/" + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done fi - if [ x"$dir_arg" != x ] - then - if [ -d "$dstarg" ]; then - true - else - $doit $mkdirprog "$dstarg" && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi - fi - else +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi - if [ x"$dstisfile" = x ] - then - file=$srcarg - else - file=$dst - fi - - dstfile=`basename "$file"` - dstfinal="$dstdir/$dstfile" - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Make a backup file name in the proper directory. - case x$suffixfmt in - *%*) suffix=`echo x | - $awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" ' - { cnt = 0; - do { - sfx = sprintf(fmt, cnt++); - name = bname sfx; - } while (system("test -f " name) == 0); - print sfx; }' -`;; - x) ;; - *) suffix="$suffixfmt";; - esac - dstbackup="$dstfinal$suffix" - -# Move or copy the file name to the temp name - - $doit $doinst $srcarg "$dsttmp" && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi && - -# Now rename the file to the real destination. - - if [ x"$suffix" != x ] && [ -f "$dstfinal" ] - then - $doit $mvcmd "$dstfinal" "$dstbackup" - else - $doit $rmcmd -f "$dstfinal" - fi && - $doit $mvcmd "$dsttmp" "$dstfinal" +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= fi -done && + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/archivers/libarchive/files/build/autoconf/ltmain.sh b/archivers/libarchive/files/build/autoconf/ltmain.sh index 8239238348e..fb6640c90b6 100755 --- a/archivers/libarchive/files/build/autoconf/ltmain.sh +++ b/archivers/libarchive/files/build/autoconf/ltmain.sh @@ -111,9 +111,9 @@ done $lt_unset CDPATH -unset CP -unset MV -unset RM + + + : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} @@ -1010,6 +1010,21 @@ func_source () func_infer_tag () { $opt_debug + + # FreeBSD-specific: where we install compilers with non-standard names + tag_compilers_CC="*cc cc* *gcc gcc*" + tag_compilers_CXX="*c++ c++* *g++ g++*" + base_compiler=`set -- "$@"; echo $1` + + # If $tagname isn't set, then try to infer if the default "CC" tag applies + if test -z "$tagname"; then + for zp in $tag_compilers_CC; do + case $base_compiler in + $zp) tagname="CC"; break;; + esac + done + fi + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -1042,7 +1057,22 @@ func_infer_tag () break ;; esac - fi + + # FreeBSD-specific: try compilers based on inferred tag + if test -z "$tagname"; then + eval "tag_compilers=\$tag_compilers_${z}" + if test -n "$tag_compilers"; then + for zp in $tag_compilers; do + case $base_compiler in + $zp) tagname=$z; break;; + esac + done + if test -n "$tagname"; then + break + fi + fi + fi + fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command @@ -2528,6 +2558,9 @@ static const void *lt_preloaded_setup() { ;; esac ;; + *-*-freebsd*) + # FreeBSD doesn't need this... + ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; @@ -4584,6 +4617,7 @@ func_mode_link () *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac + deplibs="$deplibs $arg" continue ;; @@ -5073,13 +5107,30 @@ func_mode_link () finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; - esac - fi fi + + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + ;; + *) + ;; + esac # linkmode + continue ;; -l*) diff --git a/archivers/libarchive/files/build/autoconf/missing b/archivers/libarchive/files/build/autoconf/missing index 28055d2ae6f..1c8ff7049d8 100755 --- a/archivers/libarchive/files/build/autoconf/missing +++ b/archivers/libarchive/files/build/autoconf/missing @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -18,7 +18,9 @@ scriptversion=2009-04-28.21; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -87,9 +89,6 @@ Supported PROGRAM values: tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - Send bug reports to <bug-automake@gnu.org>." exit $? ;; @@ -107,22 +106,15 @@ Send bug reports to <bug-automake@gnu.org>." esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. +# the program). case $1 in - lex*|yacc*) + lex|yacc) # Not GNU programs, they don't have --version. ;; - tar*) + tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 @@ -146,7 +138,7 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $program in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -156,7 +148,7 @@ WARNING: \`$1' is $msg. You should only need it if touch aclocal.m4 ;; - autoconf*) + autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -165,7 +157,7 @@ WARNING: \`$1' is $msg. You should only need it if touch configure ;; - autoheader*) + autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -195,7 +187,7 @@ WARNING: \`$1' is $msg. You should only need it if while read f; do touch "$f"; done ;; - autom4te*) + autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -218,7 +210,7 @@ WARNING: \`$1' is needed, but is $msg. fi ;; - bison*|yacc*) + bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package @@ -248,7 +240,7 @@ WARNING: \`$1' $msg. You should only need it if fi ;; - lex*|flex*) + lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package @@ -271,7 +263,7 @@ WARNING: \`$1' is $msg. You should only need it if fi ;; - help2man*) + help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the @@ -285,11 +277,11 @@ WARNING: \`$1' is $msg. You should only need it if else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit $? + exit 1 fi ;; - makeinfo*) + makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -318,7 +310,7 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar*) + tar) shift # We have already tried tar in the generic part. @@ -371,6 +363,5 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" +# time-stamp-end: "$" # End: diff --git a/archivers/libarchive/files/build/version b/archivers/libarchive/files/build/version index 947dab5640b..3b7735059ff 100644 --- a/archivers/libarchive/files/build/version +++ b/archivers/libarchive/files/build/version @@ -1 +1 @@ -2008002 +2008003 diff --git a/archivers/libarchive/files/build/windows/mvcpp.nt b/archivers/libarchive/files/build/windows/mvcpp.nt index 94184757143..e8d74e78ceb 100644 --- a/archivers/libarchive/files/build/windows/mvcpp.nt +++ b/archivers/libarchive/files/build/windows/mvcpp.nt @@ -15,25 +15,16 @@ # * $Locker: $
# * $ProjectName: $
# * $ProjectRevision: $
-# * $LastChangedRevision: 29 $
-# * $LastChangedDate: 2008-05-06 00:10:33 +0200 (Tue, 06 May 2008) $
+# * $LastChangedRevision: 1827 $
+# * $LastChangedDate: 2010-01-16 16:21:36 -0800 (Sat, 16 Jan 2010) $
# * $State: Exp $
# * $RCSfile: mvcpp.nt,v $
# * $Source: /cvsroot/pkgsrc/archivers/libarchive/files/build/windows/Attic/mvcpp.nt,v $
# *
# * Change Log:
# * $Log: mvcpp.nt,v $ -# * Revision 1.1.1.2 2010/03/14 17:56:32 joerg -# * libarchive-2.8.2: -# * - Fix NULL deference for short self-extracting zip archives -# * - Don't dereference symlinks on Linux when reading ACLs -# * - Better detection of SHA2 support for old OpenSSL versions -# * - Fix parsing of input files for bsdtar -T -# * - Do not leak setup_xattr into the global namespace -# * - Fix build when an older libarchive is already installed -# * - Use O_BINARY opening files in bsdtar -# * - Include missing archive_crc32.h -# * - Correctly include iconv.h required by libxml2 +# * Revision 1.1.1.3 2010/03/16 17:05:52 joerg +# * libarchive-2.8.3: Build fix for Linux # *
# *
# */
diff --git a/archivers/libarchive/files/build/windows/wccpp.nt b/archivers/libarchive/files/build/windows/wccpp.nt index a7ad82bc0ac..d92d5094412 100644 --- a/archivers/libarchive/files/build/windows/wccpp.nt +++ b/archivers/libarchive/files/build/windows/wccpp.nt @@ -15,25 +15,16 @@ # * $Locker: $
# * $ProjectName: $
# * $ProjectRevision: $
-# * $LastChangedRevision: 29 $
-# * $LastChangedDate: 2008-05-06 00:10:33 +0200 (Tue, 06 May 2008) $
+# * $LastChangedRevision: 1827 $
+# * $LastChangedDate: 2010-01-16 16:21:36 -0800 (Sat, 16 Jan 2010) $
# * $State: Exp $
# * $RCSfile: wccpp.nt,v $
# * $Source: /cvsroot/pkgsrc/archivers/libarchive/files/build/windows/Attic/wccpp.nt,v $
# *
# * Change Log:
# * $Log: wccpp.nt,v $ -# * Revision 1.1.1.2 2010/03/14 17:56:32 joerg -# * libarchive-2.8.2: -# * - Fix NULL deference for short self-extracting zip archives -# * - Don't dereference symlinks on Linux when reading ACLs -# * - Better detection of SHA2 support for old OpenSSL versions -# * - Fix parsing of input files for bsdtar -T -# * - Do not leak setup_xattr into the global namespace -# * - Fix build when an older libarchive is already installed -# * - Use O_BINARY opening files in bsdtar -# * - Include missing archive_crc32.h -# * - Correctly include iconv.h required by libxml2 +# * Revision 1.1.1.3 2010/03/16 17:05:52 joerg +# * libarchive-2.8.3: Build fix for Linux # *
# *
# */
diff --git a/archivers/libarchive/files/doc/html/Makefile b/archivers/libarchive/files/doc/html/Makefile index 1bcf70dbbe3..e8e0ba0cac2 100644 --- a/archivers/libarchive/files/doc/html/Makefile +++ b/archivers/libarchive/files/doc/html/Makefile @@ -3,44 +3,44 @@ default: all archive_entry.3.html: ../../libarchive/archive_entry.3 - groff -mdoc2html ../../libarchive/archive_entry.3 > archive_entry.3.html + groff -mdoc -T html ../../libarchive/archive_entry.3 > archive_entry.3.html archive_read.3.html: ../../libarchive/archive_read.3 - groff -mdoc2html ../../libarchive/archive_read.3 > archive_read.3.html + groff -mdoc -T html ../../libarchive/archive_read.3 > archive_read.3.html archive_read_disk.3.html: ../../libarchive/archive_read_disk.3 - groff -mdoc2html ../../libarchive/archive_read_disk.3 > archive_read_disk.3.html + groff -mdoc -T html ../../libarchive/archive_read_disk.3 > archive_read_disk.3.html archive_util.3.html: ../../libarchive/archive_util.3 - groff -mdoc2html ../../libarchive/archive_util.3 > archive_util.3.html + groff -mdoc -T html ../../libarchive/archive_util.3 > archive_util.3.html archive_write.3.html: ../../libarchive/archive_write.3 - groff -mdoc2html ../../libarchive/archive_write.3 > archive_write.3.html + groff -mdoc -T html ../../libarchive/archive_write.3 > archive_write.3.html archive_write_disk.3.html: ../../libarchive/archive_write_disk.3 - groff -mdoc2html ../../libarchive/archive_write_disk.3 > archive_write_disk.3.html + groff -mdoc -T html ../../libarchive/archive_write_disk.3 > archive_write_disk.3.html cpio.5.html: ../../libarchive/cpio.5 - groff -mdoc2html ../../libarchive/cpio.5 > cpio.5.html + groff -mdoc -T html ../../libarchive/cpio.5 > cpio.5.html libarchive-formats.5.html: ../../libarchive/libarchive-formats.5 - groff -mdoc2html ../../libarchive/libarchive-formats.5 > libarchive-formats.5.html + groff -mdoc -T html ../../libarchive/libarchive-formats.5 > libarchive-formats.5.html libarchive.3.html: ../../libarchive/libarchive.3 - groff -mdoc2html ../../libarchive/libarchive.3 > libarchive.3.html + groff -mdoc -T html ../../libarchive/libarchive.3 > libarchive.3.html libarchive_internals.3.html: ../../libarchive/libarchive_internals.3 - groff -mdoc2html ../../libarchive/libarchive_internals.3 > libarchive_internals.3.html + groff -mdoc -T html ../../libarchive/libarchive_internals.3 > libarchive_internals.3.html mtree.5.html: ../../libarchive/mtree.5 - groff -mdoc2html ../../libarchive/mtree.5 > mtree.5.html + groff -mdoc -T html ../../libarchive/mtree.5 > mtree.5.html tar.5.html: ../../libarchive/tar.5 - groff -mdoc2html ../../libarchive/tar.5 > tar.5.html + groff -mdoc -T html ../../libarchive/tar.5 > tar.5.html bsdtar.1.html: ../../tar/bsdtar.1 - groff -mdoc2html ../../tar/bsdtar.1 > bsdtar.1.html + groff -mdoc -T html ../../tar/bsdtar.1 > bsdtar.1.html bsdcpio.1.html: ../../cpio/bsdcpio.1 - groff -mdoc2html ../../cpio/bsdcpio.1 > bsdcpio.1.html + groff -mdoc -T html ../../cpio/bsdcpio.1 > bsdcpio.1.html all: archive_entry.3.html archive_read.3.html archive_read_disk.3.html archive_util.3.html archive_write.3.html archive_write_disk.3.html cpio.5.html libarchive-formats.5.html libarchive.3.html libarchive_internals.3.html mtree.5.html tar.5.html bsdtar.1.html bsdcpio.1.html diff --git a/archivers/libarchive/files/doc/html/archive_entry.3.html b/archivers/libarchive/files/doc/html/archive_entry.3.html index 1885f826cd4..47d6a5e6863 100644 --- a/archivers/libarchive/files/doc/html/archive_entry.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry.3.html @@ -1,1065 +1,694 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:15 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 73 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(May 12, 2008 archi)74.5 48 Q -.15(ve)-.25 G(_entry 3).15 E(</title>)36 -72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_acl_add_entry</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_acl_add_entry_w</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_entry_acl_clear</b>,).15 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_acl_count</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_entry_acl_ne).15 E(xt</b>,)-.15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_acl_ne).15 E(xt_w</b>,)-.15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_acl_reset</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_acl_te).15 E(xt_w</b>,)-.15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_entry_atime</b>,).15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_atime_nsec</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_entry_clear</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_clone</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_f)-.1 E(\215ags_te)-.25 E(xt</b>,)-.15 E(<b>archi)0 60 Q -.15(ve)-.25 -G(_entry_cop).15 E(y_f)-.1 E(\215ags_te)-.25 E(xt_w</b>,)-.15 E -(<b>archi)0 72 Q -.15(ve)-.25 G(_entry_cop).15 E(y_gname</b>,)-.1 E 0 Cg -EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_gname_w</b>,)-.1 E(<b>archi)0 24 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_hardlink</b>,)-.1 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_hardlink_w</b>,)-.1 E(<b>archi)0 48 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_link</b>,)-.1 E(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_link_w</b>,)-.1 E(<b>archi)0 72 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_pathname_w</b>,)-.1 E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_sourcepath</b>,)-.1 E(<b>archi)0 24 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_stat</b>,)-.1 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_symlink</b>,)-.1 E(<b>archi)0 48 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_symlink_w</b>,)-.1 E(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_uname</b>,)-.1 E(<b>archi)0 72 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_uname_w</b>,)-.1 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_de).15 E -(v</b>,)-.25 E(<b>archi)0 24 Q -.15(ve)-.25 G(_entry_de).15 E -(vmajor</b>,)-.25 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_de).15 E -(vminor</b>,)-.25 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_\214letype</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_f) -.15 E(\215ags</b>,)-.25 E(<b>archi)0 72 Q -.15(ve)-.25 G(_entry_f).15 E -(\215ags_te)-.25 E(xt</b>,)-.15 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_free</b>,) -.15 E(<b>archi)0 24 Q -.15(ve)-.25 G(_entry_gid</b>,).15 E(<b>archi)0 36 -Q -.15(ve)-.25 G(_entry_gname</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_hardlink</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_ino</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G(_entry_mode</b>,) -.15 E 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_mtime</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_entry_mtime_nsec</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_nlink</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G(_entry_ne).15 E -(w</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_pathname</b>,).15 E -(<b>archi)0 72 Q -.15(ve)-.25 G(_entry_pathname_w</b>,).15 E 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_rde).15 E -(v</b>,)-.25 E(<b>archi)0 24 Q -.15(ve)-.25 G(_entry_rde).15 E -(vmajor</b>,)-.25 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_rde).15 E -(vminor</b>,)-.25 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_set_atime</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_set_ctime</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_entry_set_de).15 E(v</b>,)-.25 E 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_set_de).15 -E(vmajor</b>,)-.25 E(<b>archi)0 24 Q -.15(ve)-.25 G(_entry_set_de).15 E -(vminor</b>,)-.25 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_set_\214letype</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_set_f).15 E(\215ags</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_set_gid</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_entry_set_gname</b>,).15 E 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_set_hardlink</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_entry_set_link</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_set_mode</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_set_mtime</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_set_pathname</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_entry_set_rde).15 E(vmajor</b>,)-.25 E 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_set_rde) -.15 E(vminor</b>,)-.25 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_entry_set_size</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_set_symlink</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_set_uid</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_set_uname</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_entry_size</b>,).15 E 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_sourcepath</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_entry_stat</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_symlink</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_entry_uid</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_uname</b>) -.15 E 2.5(-f)0 72 S(unctions for manipulating archi)-2.5 E .3 -.15(ve e) --.25 H(ntry descriptions).15 E 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="SYNOPSIS">)36 12 Q(SYNOPSIS)36 24 Q -(</h3>)36 36 Q(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E -(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_acl_add_entry</b>\(<code></code>) -.15 E(<code></code><code>struct archi)0 72 Q -.15(ve)-.25 G -(_entry *</code>).15 E 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>int type</code>)0 12 Q -(<code></code><code>int permset</code>)0 24 Q -(<code></code><code>int tag</code>)0 36 Q -(<code></code><code>int qual</code>)0 48 Q -(<code></code><code>const char *name</code>)0 60 Q(\))0 72 Q 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>v)0 12 Q(oid</code>) --.2 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_entry_acl_add_entry_w</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 36 Q -.15(ve)-.25 G(_entry *</code>) -.15 E(<code></code><code>int type</code>)0 48 Q -(<code></code><code>int permset</code>)0 60 Q -(<code></code><code>int tag</code>)0 72 Q 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>int qual</code>)0 12 Q -(<code></code><code>const wchar_t *name</code>)0 24 Q(\))0 36 Q -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_acl_clear</b>\(<code></code><code>struct archi).15 -E -.15(ve)-.25 G(_entry *</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_acl_count</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code><code>, int type</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_entry_acl_ne).15 E(xt</b>\(<code></code>)-.15 E -(<code></code><code>struct archi)0 48 Q -.15(ve)-.25 G(_entry *</code>) -.15 E(<code></code><code>int w)0 60 Q(ant_type</code>)-.1 E -(<code></code><code>int *type</code>)0 72 Q 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>int *permset</code>)0 12 Q -(<code></code><code>int *tag</code>)0 24 Q -(<code></code><code>int *qual</code>)0 36 Q -(<code></code><code>const char **name</code>)0 48 Q(\))0 60 Q -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_acl_ne).15 -E(xt_w</b>\(<code></code>)-.15 E(<code></code><code>struct archi)0 24 Q --.15(ve)-.25 G(_entry *</code>).15 E(<code></code><code>int w)0 36 Q -(ant_type</code>)-.1 E(<code></code><code>int *type</code>)0 48 Q -(<code></code><code>int *permset</code>)0 60 Q -(<code></code><code>int *tag</code>)0 72 Q 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>int *qual</code>)0 12 Q -(<code></code><code>const wchar_t **name</code>)0 24 Q(\))0 36 Q -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_entry_acl_reset</b>\(<code></code><code>struct archi).15 E -.15 -(ve)-.25 G(_entry *</code><code>, int w).15 E(ant_type</code>\))-.1 E(<\ -br><br><code></code><code>const</code><code> wchar_t</code><code> *</co\ -de>)0 72 Q 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_acl_te).15 -E(xt_w</b>\(<code></code><code>struct archi)-.15 E -.15(ve)-.25 G -(_entry *</code><code>, int \215ags</code>\)).15 E -(<br><br><code></code><code>time_t</code>)0 24 Q(<b>archi)0 36 Q -.15 -(ve)-.25 G(_entry_atime</b>\(<code></code><code>struct archi).15 E -.15 -(ve)-.25 G(_entry *</code>\)).15 E -(<br><br><code></code><code>long</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_entry_atime_nsec</b>\(<code></code><code>struct archi).15 E -.15 -(ve)-.25 G(_entry *</code>\)).15 E -(<br><br><code></code><code>struct archi)0 72 Q -.15(ve)-.25 G -(_entry *</code>).15 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_clear</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E -(<br><br><code></code><code>struct</code><code> archi)0 24 Q -.15(ve) --.25 G(_entry</code><code> *</code>).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_clone</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>const</code><code> \ -char</code><code> *</code><code> *</code>)0 48 Q(<b>archi)0 60 Q -.15 -(ve)-.25 G(_entry_cop).15 E(y_f)-.1 E(\215ags_te)-.25 E -(xt_w</b>\(<code></code><code>struct archi)-.15 E -.15(ve)-.25 G -(_entry *</code><code>, const char *</code>\)).15 E(<br><br><code></cod\ -e><code>const</code><code> wchar_t</code><code> *</code>)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_f)-.1 E(\215ags_te)-.25 E(xt_w</b>\(<code></code><code>struct archi) --.15 E -.15(ve)-.25 G(_entry *</code><code>, const wchar_t *</code>\)) -.15 E(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 -Q -.15(ve)-.25 G(_entry_cop).15 E -(y_gname</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_cop).15 E -(y_gname_w</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const wchar_t *</code>\)).15 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_hardlink</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_cop).15 E -(y_hardlink_w</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const wchar_t *</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_cop).15 E -(y_sourcepath</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_pathname_w</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const wchar_t *</code>\)).15 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_cop).15 E -(y_stat</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const struct stat *</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_cop).15 E -(y_symlink</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_symlink_w</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const wchar_t *</code>\)).15 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_cop).15 E -(y_uname</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_cop).15 E -(y_uname_w</b>\(<code></code><code>struct archi)-.1 E -.15(ve)-.25 G -(_entry *</code><code>, const wchar_t *</code>\)).15 E -(<br><br><code></code><code>de)0 72 Q(v_t</code>)-.25 E 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_de).15 E -(v</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>de)0 24 Q -(v_t</code>)-.25 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_de).15 E -(vmajor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>de)0 48 Q -(v_t</code>)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_de).15 E -(vminor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>mode_t</code>)0 72 Q -0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_\214letype</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code>\)).15 E(<br><br><code></code><code>v)0 24 Q -(oid</code>)-.2 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_f).15 E -(\215ags</b>\(<code></code>)-.25 E(<code></code><code>struct archi)0 48 -Q -.15(ve)-.25 G(_entry *</code>).15 E -(<code></code><code>unsigned long *set</code>)0 60 Q -(<code></code><code>unsigned long *clear</code>)0 72 Q 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\))0 12 Q(<br><br><code></code><code>const</cod\ -e><code> char</code><code> *</code>)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 -G(_entry_f).15 E(\215ags_te)-.25 E -(xt</b>\(<code></code><code>struct archi)-.15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>v)0 48 Q(oid</code>) --.2 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_free</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>const</code><code> \ -char</code><code> *</code>)0 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_gname</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>const</code><code> \ -char</code><code> *</code>)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_hardlink</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 -G(_entry *</code>\)).15 E(<br><br><code></code><code>ino_t</code>)0 48 Q -(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_ino</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>mode_t</code>)0 72 Q -0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_mode</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>time_t</code>)0 24 Q -(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_mtime</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>long</code>)0 48 Q -(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_mtime_nsec</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code>\)).15 E -(<br><br><code></code><code>unsigned</code><code> int</code>)0 72 Q 0 Cg -EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_nlink</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E -(<br><br><code></code><code>struct</code><code> archi)0 24 Q -.15(ve) --.25 G(_entry</code><code> *</code>).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_ne).15 E(w</b>\(<code></code><code>v)-.25 E(oid</code>\))-.2 E(\ -<br><br><code></code><code>const</code><code> char</code><code> *</code\ ->)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_entry_pathname</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 -G(_entry *</code>\)).15 E(<br><br><code></code><code>const</code><code>\ - wchar_t</code><code> *</code>)0 72 Q 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_pathname_w</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code>\)).15 E(<br><br><code></code><code>de)0 24 Q -(v_t</code>)-.25 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_rde).15 E -(v</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>de)0 48 Q -(v_t</code>)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G(_entry_rde).15 E -(vmajor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>de)0 72 Q -(v_t</code>)-.25 E 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_rde).15 E -(vminor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>v)0 24 Q(oid</code>) --.2 E(<b>archi)0 36 Q -.15(ve)-.25 G(_entry_set_de).15 E -(v</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code><code>, de).15 E(v_t</code>\))-.25 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_de).15 E -(vmajor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code><code>, de).15 E(v_t</code>\))-.25 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_set_de).15 -E(vminor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code><code>, de).15 E(v_t</code>\))-.25 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G -(_entry_set_\214letype</b>\(<code></code><code>struct archi).15 E -.15 -(ve)-.25 G(_entry *</code><code>, unsigned int</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_f).15 E(\215ags</b>\(<code></code>)-.25 E -(<code></code><code>struct archi)0 72 Q -.15(ve)-.25 G(_entry *</code>) -.15 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>unsigned long set</code>)0 12 -Q(<code></code><code>unsigned long clear</code>)0 24 Q(\))0 36 Q -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_gid</b>\(<code></code><code>struct archi).15 E --.15(ve)-.25 G(_entry *</code><code>, gid_t</code>\)).15 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_set_gname</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_set_hardlink</b>\(<code></code><code>struct archi) -.15 E -.15(ve)-.25 G(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_ino</b>\(<code></code><code>struct archi).15 E --.15(ve)-.25 G(_entry *</code><code>, unsigned long</code>\)).15 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_set_link</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 -G(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_set_mode</b>\(<code></code><code>struct archi).15 -E -.15(ve)-.25 G(_entry *</code><code>, mode_t</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_mtime</b>\(<code></code><code>struct archi).15 -E -.15(ve)-.25 G -(_entry *</code><code>, time_t</code><code>, long nanos</code>\)).15 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_set_nlink</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code><code>, unsigned int</code>\)).15 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_set_pathname</b>\(<code></code><code>struct archi) -.15 E -.15(ve)-.25 G(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_rde).15 E -(v</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code><code>, de).15 E(v_t</code>\))-.25 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry_set_rde) -.15 E(vmajor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code><code>, de).15 E(v_t</code>\))-.25 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_set_rde).15 E -(vminor</b>\(<code></code><code>struct archi)-.25 E -.15(ve)-.25 G -(_entry *</code><code>, de).15 E(v_t</code>\))-.25 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_size</b>\(<code></code><code>struct archi).15 -E -.15(ve)-.25 G(_entry *</code><code>, int64_t</code>\)).15 E -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_set_symlink</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>v)0 24 Q(oid</code>)-.2 E(<b>archi)0 36 Q --.15(ve)-.25 G(_entry_set_uid</b>\(<code></code><code>struct archi).15 E --.15(ve)-.25 G(_entry *</code><code>, uid_t</code>\)).15 E -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_entry_set_uname</b>\(<code></code><code>struct archi).15 -E -.15(ve)-.25 G(_entry *</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>int64_t</code>)0 72 Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_size</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>const</code><code> \ -char</code><code> *</code>)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_sourcepath</b>\(<code></code><code>struct archi).15 E -.15(ve) --.25 G(_entry *</code>\)).15 E(<br><br><code></code><code>const</code><\ -code> struct</code><code> stat</code><code> *</code>)0 48 Q(<b>archi)0 -60 Q -.15(ve)-.25 G(_entry_stat</b>\(<code></code><code>struct archi).15 -E -.15(ve)-.25 G(_entry *</code>\)).15 E(<br><br><code></code><code>con\ -st</code><code> char</code><code> *</code>)0 72 Q 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_entry_symlink</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 -G(_entry *</code>\)).15 E(<br><br><code></code><code>const</code><code>\ - char</code><code> *</code>)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_entry_uname</b>\(<code></code><code>struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<h3 id="DESCRIPTION">)36 48 Q(DESCRIPTION)36 60 -Q(</h3>)36 72 Q 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(These functions create and manipulate data objects that)0 12 Q -(represent entries within an archi)0 24 Q -.15(ve)-.25 G(.).15 E -1.1 -(Yo)0 36 S 2.5(uc)1.1 G(an think of a)-2.5 E(<font size="-1"></font><fo\ -nt size="-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G -(_entry</font>).15 E(as a hea)0 60 Q(vy-duty v)-.2 E(ersion of)-.15 E(<\ -font size="-1"></font><font size="-1">struct</font><font size="-1"> sta\ -t</font>:)0 72 Q 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(it includes e)0 12 Q -.15(ve)-.25 G -(rything from).15 E(<font size="-1"></font><font size="-1">struct</font\ -><font size="-1"> stat</font>)0 24 Q(plus associated pathname, te)0 36 Q -(xtual group and user names, etc.)-.15 E(These objects are used by)0 48 -Q(<a href="../html3/libarchi)0 60 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E -(to represent the metadata associated with a particular)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(entry in an archi)0 12 Q -.15(ve)-.25 G(.).15 E -(<h4 id="Create and Destro)36 24 Q(y">)-.1 E(Create and Destro)36 36 Q -(y)-.1 E(</h4>)36 48 Q(There are functions to allocate, destro)0 60 Q -1.3 -.65(y, c)-.1 H(lear).65 E 2.5(,a)-.4 G(nd cop)-2.5 E(y)-.1 E -(<i></i><i>archi)0 72 Q -.15(ve)-.25 G(_entry</i>).15 E 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(objects:)0 12 Q(<dl compact>)0 24 Q -(<dt><b>archi)0 36 Q -.15(ve)-.25 G -(_entry_clear</b>\(<code></code>\)<dd>).15 E -(Erases the object, resetting all internal \214elds to the)0 48 Q -(same state as a ne)0 60 Q(wly-created object.)-.25 E(This is pro)0 72 Q -(vided to allo)-.15 E 2.5(wy)-.25 G(ou to quickly rec)-2.5 E -(ycle objects)-.15 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(without thrashing the heap.)0 12 Q(<dt><b>archi) -0 24 Q -.15(ve)-.25 G(_entry_clone</b>\(<code></code>\)<dd>).15 E 2.5 -(Ad)0 36 S(eep cop)-2.5 E 2.5(yo)-.1 G(peration; all te)-2.5 E -(xt \214elds are duplicated.)-.15 E(<dt><b>archi)0 48 Q -.15(ve)-.25 G -(_entry_free</b>\(<code></code>\)<dd>).15 E(Releases the)0 60 Q(<font s\ -ize="-1"></font><font size="-1">struct</font><font size="-1"> archi)0 72 -Q -.15(ve)-.25 G(_entry</font>).15 E 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(object.)0 12 Q(<dt><b>archi)0 24 Q -.15(ve)-.25 -G(_entry_ne).15 E(w</b>\(<code></code>\)<dd>)-.25 E -(Allocate and return a blank)0 36 Q(<font size="-1"></font><font size="\ --1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G -(_entry</font>).15 E(object.)0 60 Q(</dl>)0 72 Q 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h4 id="Set and Get Functions">)36 12 Q -(Set and Get Functions)36 24 Q(</h4>)36 36 Q -(Most of the functions here set or read entries in an object.)0 48 Q -(Such functions ha)0 60 Q .3 -.15(ve o)-.2 H(ne of the follo).15 E -(wing forms:)-.25 E(<dl compact>)0 72 Q 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G -(_entry_set_XXXX</b>\(<code></code>\)<dd>).15 E(Stores the pro)0 24 Q -(vided data in the object.)-.15 E(In particular)0 36 Q 2.5(,f)-.4 G -(or strings, the pointer is stored,)-2.5 E(not the referenced string.)0 -48 Q(<dt><b>archi)0 60 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_XXXX</b>\(<code></code>\)<dd>)-.1 E(As abo)0 72 Q -.15(ve)-.15 G 2.5 -(,e).15 G(xcept that the referenced data is copied)-2.65 E 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(into the object.)0 12 Q(<dt><b>archi)0 24 Q -.15 -(ve)-.25 G(_entry_XXXX</b>\(<code></code>\)<dd>).15 E -(Returns the speci\214ed data.)0 36 Q -(In the case of strings, a const-quali\214ed pointer to)0 48 Q -(the string is returned.)0 60 Q(</dl>)0 72 Q 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(String data can be set or accessed as wide character strings)0 12 Q -(or normal)0 24 Q(<i></i><i>char</i>)0 36 Q(strings.)0 48 Q -(The functions that use wide character strings are suf)0 60 Q<8c78>-.25 -E(ed with)-.15 E(<b></b><b>_w</b>.)0 72 Q 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that these are dif)0 12 Q -(ferent representations of the same data:)-.25 E -.15(Fo)0 24 S 2.5(re) -.15 G(xample, if you store a narro)-2.65 E 2.5(ws)-.25 G -(tring and read the corresponding)-2.5 E -(wide string, the object will transparently con)0 36 Q -.15(ve)-.4 G -(rt formats).15 E(using the current locale.)0 48 Q(Similarly)0 60 Q 2.5 -(,i)-.65 G 2.5(fy)-2.5 G(ou store a wide string and then store a)-2.5 E -(narro)0 72 Q 2.5(ws)-.25 G(tring for the same data, the pre)-2.5 E -(viously-set wide string will)-.25 E 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(be discarded in f)0 12 Q -.2(avo)-.1 G 2.5(ro).2 -G 2.5(ft)-2.5 G(he ne)-2.5 E 2.5(wd)-.25 G(ata.)-2.5 E(<p>)36 24 Q -(There are a fe)0 36 Q 2.5(ws)-.25 G -(et/get functions that merit additional description:)-2.5 E -(<dl compact>)0 48 Q(<dt><b>archi)0 60 Q -.15(ve)-.25 G -(_entry_set_link</b>\(<code></code>\)<dd>).15 E -(This function sets the symlink \214eld if it is already set.)0 72 Q 0 -Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Otherwise, it sets the hardlink \214eld.)0 12 Q -(</dl>)0 24 Q(<h4 id="File Flags">)36 36 Q(File Flags)36 48 Q(</h4>)36 -60 Q(File \215ags are transparently con)0 72 Q -.15(ve)-.4 G -(rted between a bitmap).15 E 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(representation and a te)0 12 Q(xtual format.) --.15 E -.15(Fo)0 24 S 2.5(re).15 G -(xample, if you set the bitmap and ask for te)-2.65 E(xt, the library) --.15 E(will b)0 36 Q(uild a canonical te)-.2 E(xt format.)-.15 E(Ho)0 48 -Q(we)-.25 E -.15(ve)-.25 G .8 -.4(r, i).15 H 2.5(fy).4 G(ou set a te) --2.5 E(xt format and request a te)-.15 E(xt format,)-.15 E -(you will get back the same te)0 60 Q(xt, e)-.15 E -.15(ve)-.25 G 2.5 -(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(si)-2.5 G(ll-formed.)-2.5 E -(If you need to canonicalize a te)0 72 Q -(xtual \215ags string, you should \214rst set the)-.15 E 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(te)0 12 Q(xt form, then request the bitmap form\ -, then use that to set the bitmap form.)-.15 E -(Setting the bitmap format will clear the internal te)0 24 Q -(xt representation)-.15 E(and force it to be reconstructed when you ne)0 -36 Q(xt request the te)-.15 E(xt form.)-.15 E(<p>)36 48 Q -(The bitmap format consists of tw)0 60 Q 2.5(oi)-.1 G(nte)-2.5 E -(gers, one containing bits)-.15 E -(that should be set, the other specifying bits that should be)0 72 Q 0 -Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(cleared.)0 12 Q -(Bits not mentioned in either bitmap will be ignored.)0 24 Q(Usually)0 -36 Q 2.5(,t)-.65 G(he bitmap of bits to be cleared will be set to zero.) --2.5 E(In unusual circumstances, you can force a fully-speci\214ed set)0 -48 Q(of \214le \215ags by setting the bitmap of \215ags to clear to the\ - complement)0 60 Q(of the bitmap of \215ags to set.)0 72 Q 0 Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(This dif)0 12 Q(fers from)-.25 E -(<a href="../html3/f)0 24 Q(\215agstostr)-.25 E(.html">f)-.55 E -(\215agstostr\(3\)</a>,)-.25 E -(which only includes names for set bits.\))0 36 Q(Con)0 48 Q -.15(ve)-.4 -G(rting a bitmap to a te).15 E(xtual string is a platform-speci\214c) --.15 E(operation; bits that are not meaningful on the current platform)0 -60 Q(will be ignored.)0 72 Q 0 Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The canonical te)0 24 Q -(xt format is a comma-separated list of \215ag names.)-.15 E(The)0 36 Q -(<b>archi)0 48 Q -.15(ve)-.25 G(_entry_cop).15 E(y_f)-.1 E(\215ags_te) --.25 E(xt</b>\(<code></code>\))-.15 E(and)0 60 Q(<b>archi)0 72 Q -.15 -(ve)-.25 G(_entry_cop).15 E(y_f)-.1 E(\215ags_te)-.25 E -(xt_w</b>\(<code></code>\))-.15 E 0 Cg EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(functions parse the pro)0 12 Q(vided te)-.15 E -(xt and sets the internal bitmap v)-.15 E(alues.)-.25 E -(This is a platform-speci\214c operation; names that are not meaningful) -0 24 Q(on the current platform will be ignored.)0 36 Q -(The function returns a pointer to the start of the \214rst name that w) -0 48 Q(as not)-.1 E(recognized, or NULL if e)0 60 Q -.15(ve)-.25 G -(ry name w).15 E(as recognized.)-.1 E(Note that e)0 72 Q -.15(ve)-.25 G -(ry name--including names that follo).15 E 2.5(wa)-.25 G 2.5(nu)-2.5 G -(nrecognized name--will)-2.5 E 0 Cg EP -%%Page: 67 67 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(be e)0 12 Q -.25(va)-.25 G -(luated, and the bitmaps will be set to re\215ect e).25 E -.15(ve)-.25 G -(ry name that is).15 E(recognized.)0 24 Q(\(In particular)0 36 Q 2.5(,t) --.4 G(his dif)-2.5 E(fers from)-.25 E(<a href="../html3/strtof)0 48 Q -(\215ags.html">strtof)-.25 E(\215ags\(3\)</a>,)-.25 E -(which stops parsing at the \214rst unrecognized name.\))0 60 Q -(<h4 id="A)36 72 Q(CL Handling">)-.4 E 0 Cg EP -%%Page: 68 68 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.4(AC)36 12 S 2.5(LH).4 G(andling)-2.5 E(</h4>) -36 24 Q(XXX This needs serious help.)0 36 Q(XXX)0 48 Q(<p>)36 60 Q(An)0 -72 Q 0 Cg EP -%%Page: 69 69 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(Access Control List')-.06 E(') --.74 E(\(A)0 24 Q -(CL\) is a list of permissions that grant access to particular users or) --.4 E(groups be)0 36 Q(yond what w)-.15 E(ould normally be pro)-.1 E -(vided by standard POSIX mode bits.)-.15 E(The A)0 48 Q(CL handling her\ -e addresses some de\214ciencies in the POSIX.1e draft 17 A)-.4 E(CL)-.4 -E(speci\214cation.)0 60 Q(In particular)0 72 Q 2.5(,P)-.4 G -(OSIX.1e draft 17 speci\214es se)-2.5 E -.15(ve)-.25 G(ral dif).15 E -(ferent formats, b)-.25 E(ut)-.2 E 0 Cg EP -%%Page: 70 70 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(none of those formats include both te)0 12 Q -(xtual user/group names and numeric)-.15 E(UIDs/GIDs.)0 24 Q(<p>)36 36 Q -(XXX e)0 48 Q(xplain A)-.15 E(CL stuf)-.4 E 2.5(fX)-.25 G(XX)-2.5 E -(<h3 id="SEE ALSO">)36 60 Q(SEE ALSO)36 72 Q 0 Cg EP -%%Page: 71 71 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(<a href="../html3/archi)0 24 Q --.15(ve)-.25 G(.html">archi).15 E -.15(ve)-.25 G(\(3\)</a>).15 E -(<h3 id="HIST)36 36 Q(OR)-.18 E(Y">)-.65 E(HIST)36 48 Q(OR)-.18 E(Y)-.65 -E(</h3>)36 60 Q(The)0 72 Q 0 Cg EP -%%Page: 72 72 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>libarchi)0 12 Q -.15(ve)-.25 G(</b>).15 E -(library \214rst appeared in)0 24 Q(FreeBSD5.3.)0 36 Q(<h3 id="A)36 48 Q -(UTHORS">)-.55 E -.55(AU)36 60 S(THORS).55 E(</h3>)36 72 Q 0 Cg EP -%%Page: 73 73 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The)0 24 Q(<b>libarchi)0 36 Q -.15 -(ve)-.25 G(</b>).15 E(library w)0 48 Q(as written by)-.1 E -.35(Ti)0 60 -S 2.5(mK).35 G(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E(</body>) -0 72 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:13 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">archive_entry(3) FreeBSD Library Functions +Manual archive_entry(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + + +<p style="margin-left:8%;"><b>archive_entry_acl_add_entry</b>, +<b>archive_entry_acl_add_entry_w</b>, +<b>archive_entry_acl_clear</b>, +<b>archive_entry_acl_count</b>, +<b>archive_entry_acl_next</b>, +<b>archive_entry_acl_next_w</b>, +<b>archive_entry_acl_reset</b>, +<b>archive_entry_acl_text_w</b>, <b>archive_entry_atime</b>, +<b>archive_entry_atime_nsec</b>, <b>archive_entry_clear</b>, +<b>archive_entry_clone</b>, +<b>archive_entry_copy_fflags_text</b>, +<b>archive_entry_copy_fflags_text_w</b>, +<b>archive_entry_copy_gname</b>, +<b>archive_entry_copy_gname_w</b>, +<b>archive_entry_copy_hardlink</b>, +<b>archive_entry_copy_hardlink_w</b>, +<b>archive_entry_copy_link</b>, +<b>archive_entry_copy_link_w</b>, +<b>archive_entry_copy_pathname_w</b>, +<b>archive_entry_copy_sourcepath</b>, +<b>archive_entry_copy_stat</b>, +<b>archive_entry_copy_symlink</b>, +<b>archive_entry_copy_symlink_w</b>, +<b>archive_entry_copy_uname</b>, +<b>archive_entry_copy_uname_w</b>, <b>archive_entry_dev</b>, +<b>archive_entry_devmajor</b>, +<b>archive_entry_devminor</b>, +<b>archive_entry_filetype</b>, <b>archive_entry_fflags</b>, +<b>archive_entry_fflags_text</b>, <b>archive_entry_free</b>, +<b>archive_entry_gid</b>, <b>archive_entry_gname</b>, +<b>archive_entry_hardlink</b>, <b>archive_entry_ino</b>, +<b>archive_entry_mode</b>, <b>archive_entry_mtime</b>, +<b>archive_entry_mtime_nsec</b>, <b>archive_entry_nlink</b>, +<b>archive_entry_new</b>, <b>archive_entry_pathname</b>, +<b>archive_entry_pathname_w</b>, <b>archive_entry_rdev</b>, +<b>archive_entry_rdevmajor</b>, +<b>archive_entry_rdevminor</b>, +<b>archive_entry_set_atime</b>, +<b>archive_entry_set_ctime</b>, +<b>archive_entry_set_dev</b>, +<b>archive_entry_set_devmajor</b>, +<b>archive_entry_set_devminor</b>, +<b>archive_entry_set_filetype</b>, +<b>archive_entry_set_fflags</b>, +<b>archive_entry_set_gid</b>, +<b>archive_entry_set_gname</b>, +<b>archive_entry_set_hardlink</b>, +<b>archive_entry_set_link</b>, +<b>archive_entry_set_mode</b>, +<b>archive_entry_set_mtime</b>, +<b>archive_entry_set_pathname</b>, +<b>archive_entry_set_rdevmajor</b>, +<b>archive_entry_set_rdevminor</b>, +<b>archive_entry_set_size</b>, +<b>archive_entry_set_symlink</b>, +<b>archive_entry_set_uid</b>, +<b>archive_entry_set_uname</b>, <b>archive_entry_size</b>, +<b>archive_entry_sourcepath</b>, <b>archive_entry_stat</b>, +<b>archive_entry_symlink</b>, <b>archive_entry_uid</b>, +<b>archive_entry_uname</b> — functions for +manipulating archive entry descriptions</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:8%;"><b>#include +<archive_entry.h></b></p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p valign="top"><b>archive_entry_acl_add_entry</b>(<i>struct archive_entry *</i>, +<i>int type</i>, <i>int permset</i>, +<i>int tag</i>, <i>int qual</i>, +<i>const char *name</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p valign="top"><b>archive_entry_acl_add_entry_w</b>(<i>struct archive_entry *</i>, +<i>int type</i>, <i>int permset</i>, +<i>int tag</i>, <i>int qual</i>, +<i>const wchar_t *name</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_acl_clear</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_acl_count</b>(<i>struct archive_entry *</i>, +<i>int type</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_entry_acl_next</b>(<i>struct archive_entry *</i>, +<i>int want_type</i>, <i>int *type</i>, +<i>int *permset</i>, <i>int *tag</i>, +<i>int *qual</i>, +<i>const char **name</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_entry_acl_next_w</b>(<i>struct archive_entry *</i>, +<i>int want_type</i>, <i>int *type</i>, +<i>int *permset</i>, <i>int *tag</i>, +<i>int *qual</i>, +<i>const wchar_t **name</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_acl_reset</b>(<i>struct archive_entry *</i>, +<i>int want_type</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const wchar_t +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_acl_text_w</b>(<i>struct archive_entry *</i>, +<i>int flags</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>time_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_atime</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>long</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_atime_nsec</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>struct +archive_entry *</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_clear</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>struct +archive_entry *</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_clone</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char * +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_fflags_text_w</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const wchar_t +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_fflags_text_w</b>(<i>struct archive_entry *</i>, +<i>const wchar_t *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_gname</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_gname_w</b>(<i>struct archive_entry *</i>, +<i>const wchar_t *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_hardlink</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_hardlink_w</b>(<i>struct archive_entry *</i>, +<i>const wchar_t *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_sourcepath</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_pathname_w</b>(<i>struct archive_entry *</i>, +<i>const wchar_t *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_stat</b>(<i>struct archive_entry *</i>, +<i>const struct stat *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_symlink</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_symlink_w</b>(<i>struct archive_entry *</i>, +<i>const wchar_t *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_uname</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_copy_uname_w</b>(<i>struct archive_entry *</i>, +<i>const wchar_t *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_dev</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_devmajor</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_devminor</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>mode_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_filetype</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p valign="top"><b>archive_entry_fflags</b>(<i>struct archive_entry *</i>, +<i>unsigned long *set</i>, +<i>unsigned long *clear</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_fflags_text</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_free</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_gname</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_hardlink</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>ino_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_ino</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>mode_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_mode</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>time_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_mtime</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>long</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_mtime_nsec</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>unsigned +int</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_nlink</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>struct +archive_entry *</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_new</b>(<i>void</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_pathname</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const wchar_t +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_pathname_w</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_rdev</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_rdevmajor</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>dev_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_rdevminor</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_dev</b>(<i>struct archive_entry *</i>, +<i>dev_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_devmajor</b>(<i>struct archive_entry *</i>, +<i>dev_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_devminor</b>(<i>struct archive_entry *</i>, +<i>dev_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_filetype</b>(<i>struct archive_entry *</i>, +<i>unsigned int</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p valign="top"><b>archive_entry_set_fflags</b>(<i>struct archive_entry *</i>, +<i>unsigned long set</i>, +<i>unsigned long clear</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_gid</b>(<i>struct archive_entry *</i>, +<i>gid_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_gname</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_hardlink</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_ino</b>(<i>struct archive_entry *</i>, +<i>unsigned long</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_link</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_mode</b>(<i>struct archive_entry *</i>, +<i>mode_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_mtime</b>(<i>struct archive_entry *</i>, +<i>time_t</i>, <i>long nanos</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_nlink</b>(<i>struct archive_entry *</i>, +<i>unsigned int</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_pathname</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_rdev</b>(<i>struct archive_entry *</i>, +<i>dev_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_rdevmajor</b>(<i>struct archive_entry *</i>, +<i>dev_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_rdevminor</b>(<i>struct archive_entry *</i>, +<i>dev_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_size</b>(<i>struct archive_entry *</i>, +<i>int64_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_symlink</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_uid</b>(<i>struct archive_entry *</i>, +<i>uid_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_set_uname</b>(<i>struct archive_entry *</i>, +<i>const char *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>int64_t</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_size</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_sourcepath</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const struct +stat *</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_stat</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_symlink</b>(<i>struct archive_entry *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_entry_uname</b>(<i>struct archive_entry *</i>);</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">These functions create and +manipulate data objects that represent entries within an +archive. You can think of a struct archive_entry as a +heavy-duty version of struct stat: it includes everything +from struct stat plus associated pathname, textual group and +user names, etc. These objects are used by libarchive(3) to +represent the metadata associated with a particular entry in +an archive.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Create and +Destroy</b> <br> +There are functions to allocate, destroy, clear, and copy +<i>archive_entry</i> objects:</p> + +<p valign="top"><b>archive_entry_clear</b>()</p> + +<p style="margin-left:20%;">Erases the object, resetting +all internal fields to the same state as a newly-created +object. This is provided to allow you to quickly recycle +objects without thrashing the heap.</p> + +<p valign="top"><b>archive_entry_clone</b>()</p> + +<p style="margin-left:20%;">A deep copy operation; all text +fields are duplicated.</p> + +<p valign="top"><b>archive_entry_free</b>()</p> + +<p style="margin-left:20%;">Releases the struct +archive_entry object.</p> + +<p valign="top"><b>archive_entry_new</b>()</p> + +<p style="margin-left:20%;">Allocate and return a blank +struct archive_entry object.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Set and Get +Functions</b> <br> +Most of the functions here set or read entries in an object. +Such functions have one of the following forms:</p> + +<p valign="top"><b>archive_entry_set_XXXX</b>()</p> + +<p style="margin-left:20%;">Stores the provided data in the +object. In particular, for strings, the pointer is stored, +not the referenced string.</p> + +<p valign="top"><b>archive_entry_copy_XXXX</b>()</p> + +<p style="margin-left:20%;">As above, except that the +referenced data is copied into the object.</p> + +<p valign="top"><b>archive_entry_XXXX</b>()</p> + +<p style="margin-left:20%;">Returns the specified data. In +the case of strings, a const-qualified pointer to the string +is returned.</p> + +<p style="margin-left:8%;">String data can be set or +accessed as wide character strings or normal <i>char</i> +strings. The functions that use wide character strings are +suffixed with <b>_w</b>. Note that these are different +representations of the same data: For example, if you store +a narrow string and read the corresponding wide string, the +object will transparently convert formats using the current +locale. Similarly, if you store a wide string and then store +a narrow string for the same data, the previously-set wide +string will be discarded in favor of the new data.</p> + +<p style="margin-left:8%; margin-top: 1em">There are a few +set/get functions that merit additional description:</p> + +<p valign="top"><b>archive_entry_set_link</b>()</p> + +<p style="margin-left:20%;">This function sets the symlink +field if it is already set. Otherwise, it sets the hardlink +field.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>File +Flags</b> <br> +File flags are transparently converted between a bitmap +representation and a textual format. For example, if you set +the bitmap and ask for text, the library will build a +canonical text format. However, if you set a text format and +request a text format, you will get back the same text, even +if it is ill-formed. If you need to canonicalize a textual +flags string, you should first set the text form, then +request the bitmap form, then use that to set the bitmap +form. Setting the bitmap format will clear the internal text +representation and force it to be reconstructed when you +next request the text form.</p> + +<p style="margin-left:8%; margin-top: 1em">The bitmap +format consists of two integers, one containing bits that +should be set, the other specifying bits that should be +cleared. Bits not mentioned in either bitmap will be +ignored. Usually, the bitmap of bits to be cleared will be +set to zero. In unusual circumstances, you can force a +fully-specified set of file flags by setting the bitmap of +flags to clear to the complement of the bitmap of flags to +set. (This differs from fflagstostr(3), which only includes +names for set bits.) Converting a bitmap to a textual string +is a platform-specific operation; bits that are not +meaningful on the current platform will be ignored.</p> + +<p style="margin-left:8%; margin-top: 1em">The canonical +text format is a comma-separated list of flag names. The +<b>archive_entry_copy_fflags_text</b>() and +<b>archive_entry_copy_fflags_text_w</b>() functions parse +the provided text and sets the internal bitmap values. This +is a platform-specific operation; names that are not +meaningful on the current platform will be ignored. The +function returns a pointer to the start of the first name +that was not recognized, or NULL if every name was +recognized. Note that every name--including names that +follow an unrecognized name--will be evaluated, and the +bitmaps will be set to reflect every name that is +recognized. (In particular, this differs from +strtofflags(3), which stops parsing at the first +unrecognized name.)</p> + +<p style="margin-left:8%; margin-top: 1em"><b>ACL +Handling</b> <br> +XXX This needs serious help. XXX</p> + +<p style="margin-left:8%; margin-top: 1em">An +‘‘Access Control List’’ (ACL) is a +list of permissions that grant access to particular users or +groups beyond what would normally be provided by standard +POSIX mode bits. The ACL handling here addresses some +deficiencies in the POSIX.1e draft 17 ACL specification. In +particular, POSIX.1e draft 17 specifies several different +formats, but none of those formats include both textual +user/group names and numeric UIDs/GIDs.</p> + +<p style="margin-left:8%; margin-top: 1em">XXX explain ACL +stuff XXX</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">archive(3)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@acm.org⟩.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +May 12, 2008 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/archive_read.3.html b/archivers/libarchive/files/doc/html/archive_read.3.html index dffa16f035c..19e2e68cb25 100644 --- a/archivers/libarchive/files/doc/html/archive_read.3.html +++ b/archivers/libarchive/files/doc/html/archive_read.3.html @@ -1,1509 +1,820 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:15 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 118 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(April 13, 2009 archi)74.5 48 Q -.15(ve)-.25 G(_read 3).15 E(</title>)36 -72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_read_ne).15 E -(w</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_set_\214lter_options</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_read_set_format_options</b>,).15 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_set_options</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_support_compression_all</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_compression_bzip2</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 -G(_read_support_compression_compress</b>,).15 E(<b>archi)0 60 Q -.15(ve) --.25 G(_read_support_compression_gzip</b>,).15 E(<b>archi)0 72 Q -.15 -(ve)-.25 G(_read_support_compression_lzma</b>,).15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_compression_none</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 -G(_read_support_compression_xz</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_compression_program</b>,).15 E(<b>archi)0 48 Q -.15(ve) --.25 G(_read_support_compression_program_signature</b>,).15 E(<b>archi)0 -60 Q -.15(ve)-.25 G(_read_support_format_all</b>,).15 E(<b>archi)0 72 Q --.15(ve)-.25 G(_read_support_format_ar</b>,).15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_cpio</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_support_format_empty</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_format_iso9660</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_support_format_mtree,</b>).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_support_format_ra).15 E -.65(w,)-.15 G(</b>).65 E(<b>archi)0 72 Q --.15(ve)-.25 G(_read_support_format_tar</b>,).15 E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_zip</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_open</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G(_read_open2</b>,) -.15 E(<b>archi)0 48 Q -.15(ve)-.25 G(_read_open_fd</b>,).15 E(<b>archi)0 -60 Q -.15(ve)-.25 G(_read_open_FILE</b>,).15 E(<b>archi)0 72 Q -.15(ve) --.25 G(_read_open_\214lename</b>,).15 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_open_memory</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G(_read_ne) -.15 E(xt_header</b>,)-.15 E(<b>archi)0 36 Q -.15(ve)-.25 G(_read_ne).15 -E(xt_header2</b>,)-.15 E(<b>archi)0 48 Q -.15(ve)-.25 G(_read_data</b>,) -.15 E(<b>archi)0 60 Q -.15(ve)-.25 G(_read_data_block</b>,).15 E -(<b>archi)0 72 Q -.15(ve)-.25 G(_read_data_skip</b>,).15 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_data_into_b).15 E(uf)-.2 E(fer</b>,)-.25 E(<b>archi)0 24 Q -.15 -(ve)-.25 G(_read_data_into_fd</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_e).15 E(xtract</b>,)-.15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_e).15 E(xtract2</b>,)-.15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_e).15 E(xtract_set_progress_callback</b>,)-.15 E(<b>archi)0 72 Q --.15(ve)-.25 G(_read_close</b>,).15 E 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_\214nish</b>).15 E 2.5(-f)0 24 S -(unctions for reading streaming archi)-2.5 E -.15(ve)-.25 G(s).15 E -(<h3 id="SYNOPSIS">)36 36 Q(SYNOPSIS)36 48 Q(</h3>)36 60 Q -(<br><br><code></code><code>struct</code><code> archi)0 72 Q -.15(ve) --.25 G(</code><code> *</code>).15 E 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_ne).15 E -(w</b>\(<code></code><code>v)-.25 E(oid</code>\))-.2 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G -(_read_support_compression_all</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G -(_read_support_compression_bzip2</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_support_co\ -mpression_compress</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 24 -Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_compression_gzip</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G -(_read_support_compression_lzma</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_compression_none</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G -(_read_support_compression_xz</b>\(<code></code><code>struct archi).15 E -.3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_read_support_compression_program</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 72 Q .3 -.15(ve *)-.25 H(</code>).15 -E 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>const char *cmd</code>)0 12 Q -(\))0 24 Q(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q --.15(ve)-.25 G -(_read_support_compression_program_signature</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 60 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>const char *cmd</code>)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>const v)0 12 Q -(oid *signature</code>)-.2 E -(<code></code><code>size_t signature_length</code>)0 24 Q(\))0 36 Q -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_read_support_format_all</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_ar</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_format_cpio</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_support_format_empty</b>\(<code></code><code>struct archi).15 E -.3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_iso9660</b>\(<code></code><code>struct archi).15 E -.3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_read_support_format_mtree</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_read_support_format_ra).15 E -(w</b>\(<code></code><code>struct archi)-.15 E .3 -.15(ve *)-.25 H -(</code>\)).15 E(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_tar</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_format_zip</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_set_\214lter_options</b>\(<code></code><code>struct archi).15 E -.3 -.15(ve *)-.25 H(</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_set_format_options</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_read_set_options</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_read_open</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 72 Q .3 -.15(ve *)-.25 H(</code>).15 -E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>v)0 12 Q -(oid *client_data</code>)-.2 E(<code></code><code>archi)0 24 Q -.15(ve) --.25 G(_open_callback *</code>).15 E(<code></code><code>archi)0 36 Q --.15(ve)-.25 G(_read_callback *</code>).15 E(<code></code><code>archi)0 -48 Q -.15(ve)-.25 G(_close_callback *</code>).15 E(\))0 60 Q -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_open2</b>\(<code></code>).15 E(<code></code><code>struct archi)0 -24 Q .3 -.15(ve *)-.25 H(</code>).15 E(<code></code><code>v)0 36 Q -(oid *client_data</code>)-.2 E(<code></code><code>archi)0 48 Q -.15(ve) --.25 G(_open_callback *</code>).15 E(<code></code><code>archi)0 60 Q --.15(ve)-.25 G(_read_callback *</code>).15 E(<code></code><code>archi)0 -72 Q -.15(ve)-.25 G(_skip_callback *</code>).15 E 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>archi)0 12 Q -.15(ve)-.25 G -(_close_callback *</code>).15 E(\))0 24 Q -(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15(ve) --.25 G(_read_open_FILE</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, FILE *\214le</code>\)).15 E -(<br><br><code></code><code>int</code>)0 60 Q(<b>archi)0 72 Q -.15(ve) --.25 G(_read_open_fd</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H -(</code><code>, int fd</code><code>, size_t block_size</code>\)).15 E 0 -Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>int</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_open_\214lename</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 36 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>const char *\214lename</code>)0 48 Q -(<code></code><code>size_t block_size</code>)0 60 Q(\))0 72 Q 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>int</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_open_memory</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code><code>, v).15 E(oid *b)-.2 E(uf)-.2 E -(f</code><code>, size_t size</code>\))-.25 E -(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15(ve) --.25 G(_read_ne).15 E(xt_header</b>\(<code></code><code>struct archi) --.15 E .3 -.15(ve *)-.25 H(</code><code>, struct archi).15 E -.15(ve) --.25 G(_entry **</code>\)).15 E(<br><br><code></code><code>int</code>)0 -60 Q(<b>archi)0 72 Q -.15(ve)-.25 G(_read_ne).15 E -(xt_header2</b>\(<code></code><code>struct archi)-.15 E .3 -.15(ve *) --.25 H(</code><code>, struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>ssize_t</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_data</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *)-.25 -H(</code><code>, v).15 E(oid *b)-.2 E(uf)-.2 E -(f</code><code>, size_t len</code>\))-.25 E -(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15(ve) --.25 G(_read_data_block</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 60 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>const v)0 72 Q(oid **b)-.2 E(uf)-.2 E(f</code>)-.25 -E 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>size_t *len</code>)0 12 Q -(<code></code><code>of)0 24 Q(f_t *of)-.25 E(fset</code>)-.25 E(\))0 36 -Q(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_read_data_skip</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -72 Q 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_data_into_b).15 E(uf)-.2 E -(fer</b>\(<code></code><code>struct archi)-.25 E .3 -.15(ve *)-.25 H -(</code><code>, v).15 E(oid *</code><code>, ssize_t len</code>\))-.2 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_read_data_into_fd</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, int fd</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_read_e).15 E(xtract</b>\(<code></code>)-.15 E -(<code></code><code>struct archi)0 72 Q .3 -.15(ve *)-.25 H(</code>).15 -E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>struct archi)0 12 Q -.15(ve) --.25 G(_entry *</code>).15 E(<code></code><code>int \215ags</code>)0 24 -Q(\))0 36 Q(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q --.15(ve)-.25 G(_read_e).15 E(xtract2</b>\(<code></code>)-.15 E -(<code></code><code>struct archi)0 72 Q .3 -.15(ve *)-.25 H(src</code>) -.15 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>struct archi)0 12 Q -.15(ve) --.25 G(_entry *</code>).15 E(<code></code><code>struct archi)0 24 Q .3 --.15(ve *)-.25 H(dest</code>).15 E(\))0 36 Q -(<br><br><code></code><code>v)0 48 Q(oid</code>)-.2 E(<b>archi)0 60 Q --.15(ve)-.25 G(_read_e).15 E -(xtract_set_progress_callback</b>\(<code></code>)-.15 E -(<code></code><code>struct archi)0 72 Q .3 -.15(ve *)-.25 H(</code>).15 -E 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>v)0 12 Q(oid \(*func\)\(v)-.2 -E(oid *\)</code>)-.2 E(<code></code><code>v)0 24 Q -(oid *user_data</code>)-.2 E(\))0 36 Q -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_read_close</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 72 -Q 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_\214nish</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<h3 id="DESCRIPTION">)36 24 Q(DESCRIPTION)36 36 Q -(</h3>)36 48 Q(These functions pro)0 60 Q -(vide a complete API for reading streaming archi)-.15 E -.15(ve)-.25 G -(s.).15 E(The general process is to \214rst create the)0 72 Q 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(</font>).15 E -(object, set options, initialize the reader)0 24 Q 2.5(,i)-.4 G -(terate o)-2.5 E -.15(ve)-.15 G 2.5(rt).15 G(he archi)-2.5 E -.15(ve) --.25 G(headers and associated data, then close the archi)0 36 Q .3 -.15 -(ve a)-.25 H(nd release all).15 E(resources.)0 48 Q(The follo)0 60 Q -(wing summary describes the functions in approximately the)-.25 E -(order the)0 72 Q 2.5(yw)-.15 G(ould be used:)-2.6 E 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q(<dt><b>archi)0 24 Q -.15(ve) --.25 G(_read_ne).15 E(w</b>\(<code></code>\)<dd>)-.25 E -(Allocates and initializes a)0 36 Q(<font size="-1"></font><font size="\ --1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G(</font>) -.15 E(object suitable for reading from an archi)0 60 Q -.15(ve)-.25 G(.) -.15 E(<dt>Xo<dd>)0 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_compression_bzip2</b>\(<code></code>\),).15 E(<b>archi)0 -24 Q -.15(ve)-.25 G -(_read_support_compression_compress</b>\(<code></code>\),).15 E -(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_compression_gzip</b>\(<code></code>\),).15 E(<b>archi)0 -48 Q -.15(ve)-.25 G -(_read_support_compression_lzma</b>\(<code></code>\),).15 E(<b>archi)0 -60 Q -.15(ve)-.25 G -(_read_support_compression_none</b>\(<code></code>\),).15 E(<b>archi)0 -72 Q -.15(ve)-.25 G(_read_support_compression_xz</b>\(<code></code>\)) -.15 E 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Enables auto-detection code and decompression support for the)0 12 Q -(speci\214ed compression.)0 24 Q(Returns)0 36 Q -(<b></b><b>ARCHIVE_OK</b>)0 48 Q -(if the compression is fully supported, or)0 60 Q(<b></b><b>ARCHIVE_W)0 -72 Q(ARN</b>)-1.2 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(if the compression is supported only through an e)0 12 Q -(xternal program.)-.15 E(Note that decompression using an e)0 24 Q -(xternal program is usually slo)-.15 E(wer than)-.25 E -(decompression through b)0 36 Q(uilt-in libraries.)-.2 E(Note that)0 48 -Q -.74(``)0 60 S(none').74 E(')-.74 E(is al)0 72 Q -.1(wa)-.1 G -(ys enabled by def).1 E(ault.)-.1 E 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_compression_all</b>\(<code></code>\)<dd>).15 E -(Enables all a)0 24 Q -.25(va)-.2 G(ilable decompression \214lters.).25 -E(<dt><b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_compression_program</b>\(<code></code>\)<dd>).15 E -(Data is fed through the speci\214ed e)0 48 Q -(xternal program before being dearchi)-.15 E -.15(ve)-.25 G(d.).15 E -(Note that this disables automatic detection of the compression format,) -0 60 Q(so it mak)0 72 Q -(es no sense to specify this in conjunction with an)-.1 E 2.5(yo)-.15 G -(ther)-2.5 E 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(decompression option.)0 12 Q(<dt><b>archi)0 24 Q --.15(ve)-.25 G -(_read_support_compression_program_signature</b>\(<code></code>\)<dd>) -.15 E(This feeds data through the speci\214ed e)0 36 Q(xternal program) --.15 E -.2(bu)0 48 S 2.5(to).2 G -(nly if the initial bytes of the data match the speci\214ed)-2.5 E -(signature v)0 60 Q(alue.)-.25 E(<dt>Xo<dd>)0 72 Q 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_all</b>\(<code></code>\),).15 E(<b>archi)0 24 Q --.15(ve)-.25 G(_read_support_format_ar</b>\(<code></code>\),).15 E -(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_support_format_cpio</b>\(<code></code>\),).15 E(<b>archi)0 48 Q --.15(ve)-.25 G(_read_support_format_empty</b>\(<code></code>\),).15 E -(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_support_format_iso9660</b>\(<code></code>\),).15 E(<b>archi)0 72 -Q -.15(ve)-.25 G(_read_support_format_mtree</b>\(<code></code>\),).15 E -0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_tar</b>\(<code></code>\),).15 E(<b>archi)0 24 Q --.15(ve)-.25 G(_read_support_format_zip</b>\(<code></code>\)).15 E -(Enables support---including auto-detection code---for the)0 36 Q -(speci\214ed archi)0 48 Q .3 -.15(ve f)-.25 H(ormat.).15 E -.15(Fo)0 60 -S 2.5(re).15 G(xample,)-2.65 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_read_support_format_tar</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(enables support for a v)0 12 Q -(ariety of standard tar formats, old-style tar)-.25 E(,)-.4 E(ustar)0 24 -Q 2.5(,p)-.4 G(ax interchange format, and man)-2.5 E 2.5(yc)-.15 G -(ommon v)-2.5 E(ariants.)-.25 E -.15(Fo)0 36 S 2.5(rc).15 G(on)-2.5 E --.15(ve)-.4 G(nience,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_support_format_all</b>\(<code></code>\)).15 E -(enables support for all a)0 60 Q -.25(va)-.2 G(ilable formats.).25 E -(Only empty archi)0 72 Q -.15(ve)-.25 G 2.5(sa).15 G -(re supported by def)-2.5 E(ault.)-.1 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G -(_read_support_format_ra).15 E(w</b>\(<code></code>\)<dd>)-.15 E(The)0 -24 Q -.74(``)0 36 S(ra).74 E(w')-.15 E(')-.74 E(format handler allo)0 48 -Q(ws libarchi)-.25 E .3 -.15(ve t)-.25 H 2.5(ob).15 G 2.5(eu)-2.5 G -(sed to read arbitrary data.)-2.5 E(It treats an)0 60 Q 2.5(yd)-.15 G -(ata stream as an archi)-2.5 E .3 -.15(ve w)-.25 H(ith a single entry) -.15 E(.)-.65 E(The pathname of this entry is)0 72 Q 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(data').74 E(';)-.74 E -(all other entry \214elds are unset.)0 24 Q(This is not enabled by)0 36 -Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_support_format_all</b>\(<code></code>\)).15 E(in order to a)0 60 -Q -.2(vo)-.2 G(id erroneous handling of damaged archi).2 E -.15(ve)-.25 -G(s.).15 E(<dt>Xo<dd>)0 72 Q 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_set_\214lter_options</b>\(<code></code>\),).15 E(<b>archi)0 24 Q --.15(ve)-.25 G(_read_set_format_options</b>\(<code></code>\),).15 E -(<b>archi)0 36 Q -.15(ve)-.25 G(_read_set_options</b>\(<code></code>\)) -.15 E(Speci\214es options that will be passed to currently-re)0 48 Q -(gistered)-.15 E -(\214lters \(including decompression \214lters\) and/or format readers.) -0 60 Q(The ar)0 72 Q(gument is a comma-separated list of indi)-.18 E -(vidual options.)-.25 E 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Indi)0 12 Q(vidual options ha)-.25 E .3 -.15 -(ve o)-.2 H(ne of the follo).15 E(wing forms:)-.25 E(<dl compact>)0 24 Q -(<dt><i></i><i>option=v)0 36 Q(alue</i><dd>)-.25 E(The option/v)0 48 Q -(alue pair will be pro)-.25 E(vided to e)-.15 E -.15(ve)-.25 G -(ry module.).15 E -(Modules that do not accept an option with this name will ignore it.)0 -60 Q(<dt><i></i><i>option</i><dd>)0 72 Q 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The option will be pro)0 12 Q(vided to e)-.15 E --.15(ve)-.25 G(ry module with a v).15 E(alue of)-.25 E -.74(``)0 24 S -(1').74 E('.)-.74 E(<dt><i></i><i>!option</i><dd>)0 36 Q -(The option will be pro)0 48 Q(vided to e)-.15 E -.15(ve)-.25 G -(ry module with a NULL v).15 E(alue.)-.25 E -(<dt><i></i><i>module:option=v)0 60 Q(alue</i><i></i>,<i> module:option\ -</i><i></i>,<i> module:!option</i><dd>)-.25 E(As abo)0 72 Q -.15(ve)-.15 -G 2.5(,b).15 G(ut the corresponding option and v)-2.7 E -(alue will be pro)-.25 E(vided)-.15 E 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(only to modules whose name matches)0 12 Q -(<i></i><i>module</i>.)0 24 Q(</dl>)0 36 Q(The return v)0 48 Q -(alue will be)-.25 E(<b></b><b>ARCHIVE_OK</b>)0 60 Q(if an)0 72 Q 2.5 -(ym)-.15 G(odule accepts the option, or)-2.5 E 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>ARCHIVE_W)0 12 Q(ARN</b>)-1.2 E -(if no module accepted the option, or)0 24 Q(<b></b><b>ARCHIVE_F)0 36 Q --1.21 -1.11(AT A)-.74 H(L</b>)1.11 E(if there w)0 48 Q(as a f)-.1 E -(atal error while attempting to process the option.)-.1 E(<p>)36 60 Q -(The currently supported options are:)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q(<dt>F)0 24 Q -(ormat iso9660<dd>)-.15 E(<dl compact>)0 36 Q -(<dt><b></b><b>joliet</b><dd>)0 48 Q(Support Joliet e)0 60 Q(xtensions.) --.15 E(Def)0 72 Q(aults to enabled, use)-.1 E 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>!joliet</b>)0 12 Q(to disable.)0 24 Q -(</dl>)0 36 Q(</dl>)0 48 Q(<dt><b>archi)0 60 Q -.15(ve)-.25 G -(_read_open</b>\(<code></code>\)<dd>).15 E(The same as)0 72 Q 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_open2</b>\(<code></code>\),).15 E -.15(ex)0 24 S -(cept that the skip callback is assumed to be).15 E -(<code></code><code>NULL</code>.)0 36 Q(<dt><b>archi)0 48 Q -.15(ve)-.25 -G(_read_open2</b>\(<code></code>\)<dd>).15 E -(Freeze the settings, open the archi)0 60 Q -.15(ve)-.25 G 2.5(,a).15 G -(nd prepare for reading entries.)-2.5 E(This is the most generic v)0 72 -Q(ersion of this call, which accepts)-.15 E 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(four callback functions.)0 12 Q -(Most clients will w)0 24 Q(ant to use)-.1 E(<b>archi)0 36 Q -.15(ve) --.25 G(_read_open_\214lename</b>\(<code></code>\),).15 E(<b>archi)0 48 Q --.15(ve)-.25 G(_read_open_FILE</b>\(<code></code>\),).15 E(<b>archi)0 60 -Q -.15(ve)-.25 G(_read_open_fd</b>\(<code></code>\),).15 E(or)0 72 Q 0 -Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_open_memory</b>\(<code></code>\)).15 E(instead.)0 24 Q -(The library in)0 36 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(st).1 G -(he client-pro)-2.5 E(vided functions to obtain)-.15 E(ra)0 48 Q 2.5(wb) --.15 G(ytes from the archi)-2.5 E -.15(ve)-.25 G(.).15 E(<dt><b>archi)0 -60 Q -.15(ve)-.25 G(_read_open_FILE</b>\(<code></code>\)<dd>).15 E(Lik)0 -72 Q(e)-.1 E 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_open</b>\(<code></code>\),).15 E -.15(ex)0 24 S -(cept that it accepts a).15 E(<br><br><code></code><code>FILE *</code>)0 -36 Q(pointer)0 48 Q(.)-.55 E -(This function should not be used with tape dri)0 60 Q -.15(ve)-.25 G -2.5(so).15 G 2.5(ro)-2.5 G(ther de)-2.5 E(vices)-.25 E -(that require strict I/O blocking.)0 72 Q 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G -(_read_open_fd</b>\(<code></code>\)<dd>).15 E(Lik)0 24 Q(e)-.1 E -(<b>archi)0 36 Q -.15(ve)-.25 G(_read_open</b>\(<code></code>\),).15 E --.15(ex)0 48 S -(cept that it accepts a \214le descriptor and block size rather than).15 -E 2.5(as)0 60 S(et of function pointers.)-2.5 E -(Note that the \214le descriptor will not be automatically closed at)0 -72 Q 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(end-of-archi)0 12 Q -.15(ve)-.25 G(.).15 E -(This function is safe for use with tape dri)0 24 Q -.15(ve)-.25 G 2.5 -(so).15 G 2.5(ro)-2.5 G(ther block)-2.5 E(ed de)-.1 E(vices.)-.25 E -(<dt><b>archi)0 36 Q -.15(ve)-.25 G -(_read_open_\214le</b>\(<code></code>\)<dd>).15 E -(This is a deprecated synon)0 48 Q(ym for)-.15 E(<b>archi)0 60 Q -.15 -(ve)-.25 G(_read_open_\214lename</b>\(<code></code>\).).15 E -(<dt><b>archi)0 72 Q -.15(ve)-.25 G -(_read_open_\214lename</b>\(<code></code>\)<dd>).15 E 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Lik)0 12 Q(e)-.1 E(<b>archi)0 24 Q -.15(ve)-.25 -G(_read_open</b>\(<code></code>\),).15 E -.15(ex)0 36 S -(cept that it accepts a simple \214lename and a block size.).15 E 2.5 -(AN)0 48 S(ULL \214lename represents standard input.)-2.5 E -(This function is safe for use with tape dri)0 60 Q -.15(ve)-.25 G 2.5 -(so).15 G 2.5(ro)-2.5 G(ther block)-2.5 E(ed de)-.1 E(vices.)-.25 E -(<dt><b>archi)0 72 Q -.15(ve)-.25 G -(_read_open_memory</b>\(<code></code>\)<dd>).15 E 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Lik)0 12 Q(e)-.1 E(<b>archi)0 24 Q -.15(ve)-.25 -G(_read_open</b>\(<code></code>\),).15 E -.15(ex)0 36 S -(cept that it accepts a pointer and size of a block of).15 E -(memory containing the archi)0 48 Q .3 -.15(ve d)-.25 H(ata.).15 E -(<dt><b>archi)0 60 Q -.15(ve)-.25 G(_read_ne).15 E -(xt_header</b>\(<code></code>\)<dd>)-.15 E(Read the header for the ne)0 -72 Q(xt entry and return a pointer to)-.15 E 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(a)0 12 Q(<font size="-1"></font><font size="-1"\ ->struct</font><font size="-1"> archi)0 24 Q -.15(ve)-.25 G -(_entry</font>.).15 E(This is a con)0 36 Q -.15(ve)-.4 G -(nience wrapper around).15 E(<b>archi)0 48 Q -.15(ve)-.25 G(_read_ne).15 -E(xt_header2</b>\(<code></code>\))-.15 E(that reuses an internal)0 60 Q -(<font size="-1"></font><font size="-1">struct</font><font size="-1"> a\ -rchi)0 72 Q -.15(ve)-.25 G(_entry</font>).15 E 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(object for each request.)0 12 Q(<dt><b>archi)0 -24 Q -.15(ve)-.25 G(_read_ne).15 E(xt_header2</b>\(<code></code>\)<dd>) --.15 E(Read the header for the ne)0 36 Q(xt entry and populate the pro) --.15 E(vided)-.15 E(<font size="-1"></font><font size="-1">struct</font\ -><font size="-1"> archi)0 48 Q -.15(ve)-.25 G(_entry</font>.).15 E -(<dt><b>archi)0 60 Q -.15(ve)-.25 G(_read_data</b>\(<code></code>\)<dd>) -.15 E(Read data associated with the header just read.)0 72 Q 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Internally)0 12 Q 2.5(,t)-.65 G(his is a con) --2.5 E -.15(ve)-.4 G(nience function that calls).15 E(<b>archi)0 24 Q --.15(ve)-.25 G(_read_data_block</b>\(<code></code>\)).15 E -(and \214lls an)0 36 Q 2.5(yg)-.15 G -(aps with nulls so that callers see a single)-2.55 E -(continuous stream of data.)0 48 Q(<dt><b>archi)0 60 Q -.15(ve)-.25 G -(_read_data_block</b>\(<code></code>\)<dd>).15 E(Return the ne)0 72 Q -(xt a)-.15 E -.25(va)-.2 G(ilable block of data for this entry).25 E(.) --.65 E 0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Unlik)0 12 Q(e)-.1 E(<b>archi)0 24 Q -.15(ve) --.25 G(_read_data</b>\(<code></code>\),).15 E(the)0 36 Q(<b>archi)0 48 Q --.15(ve)-.25 G(_read_data_block</b>\(<code></code>\)).15 E(function a)0 -60 Q -.2(vo)-.2 G(ids cop).2 E(ying data and allo)-.1 E -(ws you to correctly handle)-.25 E -(sparse \214les, as supported by some archi)0 72 Q .3 -.15(ve f)-.25 H -(ormats.).15 E 0 Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The library guarantees that of)0 12 Q -(fsets will increase and that blocks)-.25 E(will not o)0 24 Q -.15(ve) --.15 G(rlap.).15 E -(Note that the blocks returned from this function can be much lar)0 36 Q -(ger)-.18 E(than the block size read from disk, due to compression)0 48 -Q(and internal b)0 60 Q(uf)-.2 E(fer optimizations.)-.25 E(<dt><b>archi) -0 72 Q -.15(ve)-.25 G(_read_data_skip</b>\(<code></code>\)<dd>).15 E 0 -Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(Ac)0 12 S(on)-2.5 E -.15(ve)-.4 G -(nience function that repeatedly calls).15 E(<b>archi)0 24 Q -.15(ve) --.25 G(_read_data_block</b>\(<code></code>\)).15 E -(to skip all of the data for this archi)0 36 Q .3 -.15(ve e)-.25 H(ntry) -.15 E(.)-.65 E(<dt><b>archi)0 48 Q -.15(ve)-.25 G(_read_data_into_b).15 -E(uf)-.2 E(fer</b>\(<code></code>\)<dd>)-.25 E -(This function is deprecated and will be remo)0 60 Q -.15(ve)-.15 G(d.) -.15 E(Use)0 72 Q 0 Cg EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_data</b>\(<code></code>\)).15 E(instead.)0 24 Q(<dt><b>archi)0 36 -Q -.15(ve)-.25 G(_read_data_into_fd</b>\(<code></code>\)<dd>).15 E 2.5 -(Ac)0 48 S(on)-2.5 E -.15(ve)-.4 G -(nience function that repeatedly calls).15 E(<b>archi)0 60 Q -.15(ve) --.25 G(_read_data_block</b>\(<code></code>\)).15 E(to cop)0 72 Q 2.5(yt) --.1 G(he entire entry to the pro)-2.5 E(vided \214le descriptor)-.15 E -(.)-.55 E 0 Cg EP -%%Page: 67 67 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G(_read_e).15 E -(xtract</b>\(<code></code><b>archi)-.15 E -.15(ve)-.25 G(_read_e).15 E -(xtract_set_skip_\214le</b>\(<code></code>\)\)<dd>,)-.15 E 2.5(Ac)0 24 S -(on)-2.5 E -.15(ve)-.4 G(nience function that wraps the corresponding) -.15 E(<a href="../html3/archi)0 36 Q -.15(ve)-.25 G -(_write_disk.html">archi).15 E -.15(ve)-.25 G(_write_disk\(3\)</a>).15 E -(interf)0 48 Q(aces.)-.1 E(The \214rst call to)0 60 Q(<b>archi)0 72 Q --.15(ve)-.25 G(_read_e).15 E(xtract</b>\(<code></code>\))-.15 E 0 Cg EP -%%Page: 68 68 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(creates a restore object using)0 12 Q -(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G(_write_disk_ne).15 E -.65 -(w.)-.25 G(html">archi).65 E -.15(ve)-.25 G(_write_disk_ne).15 E -(w\(3\)</a>)-.25 E(and)0 36 Q(<a href="../html3/archi)0 48 Q -.15(ve) --.25 G(_write_disk_set_standard_lookup.html">archi).15 E -.15(ve)-.25 G -(_write_disk_set_standard_lookup\(3\)</a>,).15 E(then transparently in)0 -60 Q -.2(vo)-.4 G -.1(ke).2 G(s).1 E(<a href="../html3/archi)0 72 Q -.15 -(ve)-.25 G(_write_disk_set_options.html">archi).15 E -.15(ve)-.25 G -(_write_disk_set_options\(3\)</a>,).15 E 0 Cg EP -%%Page: 69 69 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G -(_write_header).15 E(.html">archi)-.55 E -.15(ve)-.25 G -(_write_header\(3\)</a>,).15 E(<a href="../html3/archi)0 24 Q -.15(ve) --.25 G(_write_data.html">archi).15 E -.15(ve)-.25 G -(_write_data\(3\)</a>,).15 E(and)0 36 Q(<a href="../html3/archi)0 48 Q --.15(ve)-.25 G(_write_\214nish_entry).15 E(.html">archi)-.65 E -.15(ve) --.25 G(_write_\214nish_entry\(3\)</a>).15 E -(to create the entry on disk and cop)0 60 Q 2.5(yd)-.1 G(ata into it.) --2.5 E(The)0 72 Q 0 Cg EP -%%Page: 70 70 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>\215ags</i>)0 12 Q(ar)0 24 Q -(gument is passed unmodi\214ed to)-.18 E(<a href="../html3/archi)0 36 Q --.15(ve)-.25 G(_write_disk_set_options.html">archi).15 E -.15(ve)-.25 G -(_write_disk_set_options\(3\)</a>.).15 E(<dt><b>archi)0 48 Q -.15(ve) --.25 G(_read_e).15 E(xtract2</b>\(<code></code>\)<dd>)-.15 E -(This is another v)0 60 Q(ersion of)-.15 E(<b>archi)0 72 Q -.15(ve)-.25 -G(_read_e).15 E(xtract</b>\(<code></code>\))-.15 E 0 Cg EP -%%Page: 71 71 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(that allo)0 12 Q(ws you to pro)-.25 E -(vide your o)-.15 E(wn restore object.)-.25 E(In particular)0 24 Q 2.5 -(,t)-.4 G(his allo)-2.5 E(ws you to o)-.25 E -.15(ve)-.15 G -(rride the standard lookup functions).15 E(using)0 36 Q -(<a href="../html3/archi)0 48 Q -.15(ve)-.25 G -(_write_disk_set_group_lookup.html">archi).15 E -.15(ve)-.25 G -(_write_disk_set_group_lookup\(3\)</a>,).15 E(and)0 60 Q -(<a href="../html3/archi)0 72 Q -.15(ve)-.25 G -(_write_disk_set_user_lookup.html">archi).15 E -.15(ve)-.25 G -(_write_disk_set_user_lookup\(3\)</a>.).15 E 0 Cg EP -%%Page: 72 72 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_e).15 E(xtract2</b>\(<code></code>\))-.15 E(does not accept a)0 -36 Q(<i></i><i>\215ags</i>)0 48 Q(ar)0 60 Q(gument; you should use)-.18 -E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_disk_set_options</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 73 73 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(to set the restore options yourself.)0 12 Q -(<dt><b>archi)0 24 Q -.15(ve)-.25 G(_read_e).15 E -(xtract_set_progress_callback</b>\(<code></code>\)<dd>)-.15 E -(Sets a pointer to a user)0 36 Q(-de\214ned callback that can be used) --.2 E(for updating progress displays during e)0 48 Q(xtraction.)-.15 E -(The progress function will be in)0 60 Q -.2(vo)-.4 G -.1(ke).2 G 2.5 -(dd).1 G(uring the e)-2.5 E(xtraction of lar)-.15 E(ge)-.18 E(re)0 72 Q -(gular \214les.)-.15 E 0 Cg EP -%%Page: 74 74 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The progress function will be in)0 12 Q -.2(vo) --.4 G -.1(ke).2 G 2.5(dw).1 G(ith the pointer pro)-2.5 E -(vided to this call.)-.15 E(Generally)0 24 Q 2.5(,t)-.65 G -(he data pointed to should include a reference to the archi)-2.5 E -.15 -(ve)-.25 G(object and the archi)0 36 Q -.15(ve)-.25 G -(_entry object so that v).15 E(arious statistics)-.25 E(can be retrie)0 -48 Q -.15(ve)-.25 G 2.5(df).15 G(or the progress display)-2.5 E(.)-.65 E -(<dt><b>archi)0 60 Q -.15(ve)-.25 G -(_read_close</b>\(<code></code>\)<dd>).15 E(Complete the archi)0 72 Q .3 --.15(ve a)-.25 H(nd in).15 E -.2(vo)-.4 G .2 -.1(ke t).2 H -(he close callback.).1 E 0 Cg EP -%%Page: 75 75 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G -(_read_\214nish</b>\(<code></code>\)<dd>).15 E(In)0 24 Q -.2(vo)-.4 G --.1(ke).2 G(s).1 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_close</b>\(<code></code>\)).15 E(if it w)0 48 Q(as not in)-.1 E --.2(vo)-.4 G -.1(ke).2 G 2.5(dm).1 G(anually)-2.5 E 2.5(,t)-.65 G -(hen release all resources.)-2.5 E(Note: In libarchi)0 60 Q .3 -.15 -(ve 1)-.25 H(.x, this function w).15 E(as declared to return)-.1 E -(<br><br><code></code><code>v)0 72 Q(oid</code>,)-.2 E 0 Cg EP -%%Page: 76 76 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(which made it impossible to detect certain errors when)0 12 Q(<b>archi) -0 24 Q -.15(ve)-.25 G(_read_close</b>\(<code></code>\)).15 E -.1(wa)0 36 -S 2.5(si).1 G -1.9 -.4(nv o)-2.5 H -.1(ke).4 G 2.5(di).1 G -(mplicitly from this function.)-2.5 E(The declaration is corrected be)0 -48 Q(ginning with libarchi)-.15 E .3 -.15(ve 2)-.25 H(.0.).15 E(</dl>)0 -60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 77 77 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Note that the library determines most of the rele)0 12 Q -.25(va)-.25 G -(nt information about).25 E(the archi)0 24 Q .3 -.15(ve b)-.25 H 2.5(yi) -.15 G(nspection.)-2.5 E(In particular)0 36 Q 2.5(,i)-.4 G 2.5(ta)-2.5 G -(utomatically detects)-2.5 E(<a href="../html1/gzip.html">gzip\(1\)</a>) -0 48 Q(or)0 60 Q(<a href="../html1/bzip2.html">bzip2\(1\)</a>)0 72 Q 0 -Cg EP -%%Page: 78 78 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(compression and transparently performs the appropriate decompression.)0 -12 Q(It also automatically detects the archi)0 24 Q .3 -.15(ve f)-.25 H -(ormat.).15 E(<p>)36 36 Q 2.5(Ac)0 48 S(omplete description of the)-2.5 -E(<font size="-1"></font><font size="-1">struct</font><font size="-1"> \ -archi)0 60 Q -.15(ve)-.25 G(</font>).15 E(and)0 72 Q 0 Cg EP -%%Page: 79 79 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E -(objects can be found in the o)0 24 Q -.15(ve)-.15 G(rvie).15 E 2.5(wm) --.25 G(anual page for)-2.5 E(<a href="../html3/libarchi)0 36 Q -.15(ve) --.25 G(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>.).15 E -(<h3 id="CLIENT CALLB)36 48 Q -.4(AC)-.35 G(KS">).4 E(CLIENT CALLB)36 60 -Q -.4(AC)-.35 G(KS).4 E(</h3>)36 72 Q 0 Cg EP -%%Page: 80 80 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The callback functions must match the follo)0 12 -Q(wing prototypes:)-.25 E(<dl>)0 24 Q(<p><dd>)0 36 Q -(<br><br><code></code><code>typedef</code><code> ssize_t</code>)0 48 Q -(<b>archi)0 60 Q -.15(ve)-.25 G(_read_callback</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 72 Q .3 -.15(ve *)-.25 H(</code>).15 -E 0 Cg EP -%%Page: 81 81 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>v)0 12 Q -(oid *client_data</code>)-.2 E(<code></code><code>const v)0 24 Q -(oid **b)-.2 E(uf)-.2 E(fer</code>)-.25 E(\))0 36 Q(<p><dd>)0 48 Q -(<br><br><code></code><code>typedef</code><code> int</code>)0 60 Q -(<b>archi)0 72 Q -.15(ve)-.25 G(_skip_callback</b>\(<code></code>).15 E -0 Cg EP -%%Page: 82 82 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>struct archi)0 12 Q .3 -.15 -(ve *)-.25 H(</code>).15 E(<code></code><code>v)0 24 Q -(oid *client_data</code>)-.2 E(<code></code><code>size_t request</code>) -0 36 Q(\))0 48 Q(<p><dd>)0 60 Q -(<br><br><code></code><code>typedef</code><code> int</code>)0 72 Q 0 Cg -EP -%%Page: 83 83 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_open_callback</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code><code>, v).15 E(oid *client_data</code>\))-.2 E(<p><dd>)0 -24 Q(<br><br><code></code><code>typedef</code><code> int</code>)0 36 Q -(<b>archi)0 48 Q -.15(ve)-.25 G -(_close_callback</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code><code>, v).15 E(oid *client_data</code>\))-.2 E -(</dl>)0 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 84 84 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The open callback is in)0 12 Q -.2(vo)-.4 G -.1 -(ke).2 G 2.5(db).1 G(y)-2.5 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_open</b>\(<code></code>\).).15 E(It should return)0 36 Q -(<b></b><b>ARCHIVE_OK</b>)0 48 Q -(if the underlying \214le or data source is successfully)0 60 Q(opened.) -0 72 Q 0 Cg EP -%%Page: 85 85 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(If the open f)0 12 Q(ails, it should call)-.1 E -(<b>archi)0 24 Q -.15(ve)-.25 G(_set_error</b>\(<code></code>\)).15 E -(to re)0 36 Q(gister an error code and message and return)-.15 E -(<b></b><b>ARCHIVE_F)0 48 Q -1.21 -1.11(AT A)-.74 H(L</b>.)1.11 E(<p>)36 -60 Q(The read callback is in)0 72 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G -(hene)-2.5 E -.15(ve)-.25 G 2.5(rt).15 G(he library)-2.5 E 0 Cg EP -%%Page: 86 86 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(requires ra)0 12 Q 2.5(wb)-.15 G -(ytes from the archi)-2.5 E -.15(ve)-.25 G(.).15 E -(The read callback should read data into a b)0 24 Q(uf)-.2 E(fer)-.25 E -(,)-.4 E(set the)0 36 Q(<code></code><code>const</code><code> v)0 48 Q -(oid</code><code> **b)-.2 E(uf)-.2 E(fer</code>)-.25 E(ar)0 60 Q -(gument to point to the a)-.18 E -.25(va)-.2 G(ilable data, and).25 E -(return a count of the number of bytes a)0 72 Q -.25(va)-.2 G(ilable.) -.25 E 0 Cg EP -%%Page: 87 87 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The library will in)0 12 Q -.2(vo)-.4 G .2 -.1 -(ke t).2 H(he read callback ag).1 E(ain)-.05 E -(only after it has consumed this data.)0 24 Q -(The library imposes no constraints on the size)0 36 Q -(of the data blocks returned.)0 48 Q -(On end-of-\214le, the read callback should)0 60 Q(return zero.)0 72 Q 0 -Cg EP -%%Page: 88 88 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(On error)0 12 Q 2.5(,t)-.4 G -(he read callback should in)-2.5 E -.2(vo)-.4 G -.1(ke).2 G(<b>archi)0 -24 Q -.15(ve)-.25 G(_set_error</b>\(<code></code>\)).15 E(to re)0 36 Q -(gister an error code and message and)-.15 E(return -1.)0 48 Q(<p>)36 60 -Q(The skip callback is in)0 72 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G -(hen the)-2.5 E 0 Cg EP -%%Page: 89 89 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(library w)0 12 Q -(ants to ignore a block of data.)-.1 E(The return v)0 24 Q -(alue is the number of bytes actually)-.25 E(skipped, which may dif)0 36 -Q(fer from the request.)-.25 E -(If the callback cannot skip data, it should return)0 48 Q(zero.)0 60 Q -(If the skip callback is not pro)0 72 Q(vided \(the)-.15 E 0 Cg EP -%%Page: 90 90 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(function pointer is)0 12 Q -(<code></code><code>NULL</code><code> \),</code>)0 24 Q -(the library will in)0 36 Q -.2(vo)-.4 G .2 -.1(ke t).2 H -(he read function).1 E(instead and simply discard the result.)0 48 Q 2.5 -(As)0 60 S(kip callback can pro)-2.5 E(vide signi\214cant)-.15 E -(performance g)0 72 Q(ains when reading uncompressed)-.05 E 0 Cg EP -%%Page: 91 91 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G 2.5(sf).15 G -(rom slo)-2.5 E 2.5(wd)-.25 G(isk dri)-2.5 E -.15(ve)-.25 G 2.5(so).15 G -2.5(ro)-2.5 G(ther media)-2.5 E(that can skip quickly)0 24 Q(.)-.65 E -(<p>)36 36 Q(The close callback is in)0 48 Q -.2(vo)-.4 G -.1(ke).2 G -2.5(db).1 G 2.5(ya)-2.5 G(rchi)-2.5 E -.15(ve)-.25 G(_close when).15 E -(the archi)0 60 Q .3 -.15(ve p)-.25 H(rocessing is complete.).15 E -(The callback should return)0 72 Q 0 Cg EP -%%Page: 92 92 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>ARCHIVE_OK</b>)0 12 Q(on success.)0 24 -Q(On f)0 36 Q(ailure, the callback should in)-.1 E -.2(vo)-.4 G -.1(ke) -.2 G(<b>archi)0 48 Q -.15(ve)-.25 G(_set_error</b>\(<code></code>\)).15 -E(to re)0 60 Q(gister an error code and message and)-.15 E(return)0 72 Q -0 Cg EP -%%Page: 93 93 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>ARCHIVE_F)0 12 Q -1.21 -1.11(AT A)-.74 -H(L.</b>)1.11 E(<h3 id="EXAMPLE">)36 24 Q(EXAMPLE)36 36 Q(</h3>)36 48 Q -(The follo)0 60 Q(wing illustrates basic usage of the library)-.25 E(.) --.65 E(In this e)0 72 Q(xample,)-.15 E 0 Cg EP -%%Page: 94 94 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(the callback functions are simply wrappers around the standard)0 12 Q -(<a href="../html2/open.html">open\(2\)</a>,)0 24 Q -(<a href="../html2/read.html">read\(2\)</a>,)0 36 Q(and)0 48 Q -(<a href="../html2/close.html">close\(2\)</a>)0 60 Q(system calls.)0 72 -Q 0 Cg EP -%%Page: 95 95 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>) -0 36 Q -.2(vo)0 48 S(id).2 E(list_archi)0 60 Q -.15(ve)-.25 G -(\(const char *name\)).15 E({)0 72 Q 0 Cg EP -%%Page: 96 96 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct mydata *mydata;)5 12 Q(struct archi)5 24 -Q .3 -.15(ve *)-.25 H(a;).15 E(struct archi)5 36 Q -.15(ve)-.25 G -(_entry *entry;).15 E(<p>)36 48 Q -(mydata = malloc\(sizeof\(struct mydata\)\);)5 60 Q 2.5(a=a)5 72 S(rchi) --2.5 E -.15(ve)-.25 G(_read_ne).15 E(w\(\);)-.25 E 0 Cg EP -%%Page: 97 97 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(mydata->name = name;)5 12 Q(archi)5 24 Q -.15 -(ve)-.25 G(_read_support_compression_all\(a\);).15 E(archi)5 36 Q -.15 -(ve)-.25 G(_read_support_format_all\(a\);).15 E(archi)5 48 Q -.15(ve) --.25 G(_read_open\(a, mydata, myopen, myread, myclose\);).15 E -(while \(archi)5 60 Q -.15(ve)-.25 G(_read_ne).15 E -(xt_header\(a, &entry\) == ARCHIVE_OK\) {)-.15 E(printf\("%s\\n",archi) -10 72 Q -.15(ve)-.25 G(_entry_pathname\(entry\)\);).15 E 0 Cg EP -%%Page: 98 98 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)10 12 Q -.15(ve)-.25 G -(_read_data_skip\(a\);).15 E(})5 24 Q(archi)5 36 Q -.15(ve)-.25 G -(_read_\214nish\(a\);).15 E(free\(mydata\);)5 48 Q(})0 60 Q(<p>)36 72 Q -0 Cg EP -%%Page: 99 99 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ssize_t)0 12 Q(myread\(struct archi)0 24 Q .3 --.15(ve *)-.25 H(a, v).15 E(oid *client_data, const v)-.2 E(oid **b)-.2 -E(uf)-.2 E(f\))-.25 E({)0 36 Q(struct mydata *mydata = client_data;)5 48 -Q(<p>)36 60 Q(*b)5 72 Q(uf)-.2 E 2.5(f=m)-.25 G(ydata->b)-2.5 E(uf)-.2 E -(f;)-.25 E 0 Cg EP -%%Page: 100 100 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(return \(read\(mydata->fd, mydata->b)5 12 Q(uf) --.2 E(f, 10240\)\);)-.25 E(})0 24 Q(<p>)36 36 Q(int)0 48 Q -(myopen\(struct archi)0 60 Q .3 -.15(ve *)-.25 H(a, v).15 E -(oid *client_data\))-.2 E({)0 72 Q 0 Cg EP -%%Page: 101 101 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct mydata *mydata = client_data;)5 12 Q(<p>) -36 24 Q(mydata->fd = open\(mydata->name, O_RDONL)5 36 Q(Y\);)-1 E -(return \(mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_F)5 48 Q -1.21 -1.11 -(AT A)-.74 H(L\);)1.11 E(})0 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 102 102 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(int)0 12 Q(myclose\(struct archi)0 24 Q .3 -.15 -(ve *)-.25 H(a, v).15 E(oid *client_data\))-.2 E({)0 36 Q -(struct mydata *mydata = client_data;)5 48 Q(<p>)36 60 Q -(if \(mydata->fd > 0\))5 72 Q 0 Cg EP -%%Page: 103 103 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(close\(mydata->fd\);)10 12 Q -(return \(ARCHIVE_OK\);)5 24 Q(})0 36 Q(</pre>)0 48 Q(</code>)0 60 Q -(</dl>)0 72 Q 0 Cg EP -%%Page: 104 104 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="RETURN V)36 12 Q(ALUES">)-1.35 E -(RETURN V)36 24 Q(ALUES)-1.35 E(</h3>)36 36 Q -(Most functions return zero on success, non-zero on error)0 48 Q(.)-.55 -E(The possible return codes include:)0 60 Q(<b></b><b>ARCHIVE_OK</b>)0 -72 Q 0 Cg EP -%%Page: 105 105 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(the operation succeeded\),)0 12 Q -(<b></b><b>ARCHIVE_W)0 24 Q(ARN</b>)-1.2 E(\(the operation succeeded b)0 -36 Q(ut a non-critical error w)-.2 E(as encountered\),)-.1 E -(<b></b><b>ARCHIVE_EOF</b>)0 48 Q(\(end-of-archi)0 60 Q .3 -.15(ve w) --.25 H(as encountered\),).05 E(<b></b><b>ARCHIVE_RETR)0 72 Q(Y</b>)-.65 -E 0 Cg EP -%%Page: 106 106 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(the operation f)0 12 Q(ailed b)-.1 E -(ut can be retried\),)-.2 E(and)0 24 Q(<b></b><b>ARCHIVE_F)0 36 Q -1.21 --1.11(AT A)-.74 H(L</b>)1.11 E(\(there w)0 48 Q(as a f)-.1 E -(atal error; the archi)-.1 E .3 -.15(ve s)-.25 H -(hould be closed immediately\).).15 E(Detailed error codes and te)0 60 Q -(xtual descriptions are a)-.15 E -.25(va)-.2 G(ilable from the).25 E -(<b>archi)0 72 Q -.15(ve)-.25 G(_errno</b>\(<code></code>\)).15 E 0 Cg -EP -%%Page: 107 107 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_error_string</b>\(<code></code>\)).15 E(functions.)0 36 Q(<p>)36 48 Q -(<b>archi)0 60 Q -.15(ve)-.25 G(_read_ne).15 E(w</b>\(<code></code>\)) --.25 E(returns a pointer to a freshly allocated)0 72 Q 0 Cg EP -%%Page: 108 108 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(</font>).15 E(object.) -0 24 Q(It returns)0 36 Q(<code></code><code>NULL</code>)0 48 Q(on error) -0 60 Q(.)-.55 E(<p>)36 72 Q 0 Cg EP -%%Page: 109 109 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_data</b>\(<code></code>\)).15 E -(returns a count of bytes actually read or zero at the end of the entry) -0 24 Q(.)-.65 E(On error)0 36 Q 2.5(,av)-.4 G(alue of)-2.75 E -(<b></b><b>ARCHIVE_F)0 48 Q -1.21 -1.11(AT A)-.74 H(L</b>,)1.11 E -(<b></b><b>ARCHIVE_W)0 60 Q(ARN</b>,)-1.2 E(or)0 72 Q 0 Cg EP -%%Page: 110 110 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>ARCHIVE_RETR)0 12 Q(Y</b>)-.65 E -(is returned and an error code and te)0 24 Q -(xtual description can be retrie)-.15 E -.15(ve)-.25 G 2.5(df).15 G -(rom the)-2.5 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)).15 E(and)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_error_string</b>\(<code></code>\)).15 E(functions.)0 72 Q 0 Cg -EP -%%Page: 111 111 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The library e)0 24 Q -(xpects the client callbacks to beha)-.15 E .3 -.15(ve s)-.2 H(imilarly) -.15 E(.)-.65 E(If there is an error)0 36 Q 2.5(,y)-.4 G(ou can use)-2.5 -E(<b>archi)0 48 Q -.15(ve)-.25 G(_set_error</b>\(<code></code>\)).15 E -(to set an appropriate error code and description,)0 60 Q -(then return one of the non-zero v)0 72 Q(alues abo)-.25 E -.15(ve)-.15 -G(.).15 E 0 Cg EP -%%Page: 112 112 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(Note that the v)0 12 Q(alue e)-.25 E -.15(ve) --.25 G(ntually returned to the client may).15 E(not be the same; man)0 -24 Q 2.5(ye)-.15 G(rrors that are not critical at the le)-2.5 E -.15(ve) --.25 G(l).15 E(of basic I/O can pre)0 36 Q -.15(ve)-.25 G(nt the archi) -.15 E .3 -.15(ve f)-.25 H(rom being properly read,).15 E -(thus most I/O errors e)0 48 Q -.15(ve)-.25 G(ntually cause).15 E -(<b></b><b>ARCHIVE_F)0 60 Q -1.21 -1.11(AT A)-.74 H(L</b>)1.11 E -(to be returned.\))0 72 Q 0 Cg EP -%%Page: 113 113 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="SEE ALSO">)36 12 Q(SEE ALSO)36 24 Q -(</h3>)36 36 Q(<a href="../html1/tar)0 48 Q(.html">tar\(1\)</a>,)-.55 E -(<a href="../html3/archi)0 60 Q -.15(ve)-.25 G(.html">archi).15 E -.15 -(ve)-.25 G(\(3\)</a>,).15 E(<a href="../html3/archi)0 72 Q -.15(ve)-.25 -G(_util.html">archi).15 E -.15(ve)-.25 G(_util\(3\)</a>,).15 E 0 Cg EP -%%Page: 114 114 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html5/tar)0 12 Q -(.html">tar\(5\)</a>)-.55 E(<h3 id="HIST)36 24 Q(OR)-.18 E(Y">)-.65 E -(HIST)36 36 Q(OR)-.18 E(Y)-.65 E(</h3>)36 48 Q(The)0 60 Q(<b>libarchi)0 -72 Q -.15(ve)-.25 G(</b>).15 E 0 Cg EP -%%Page: 115 115 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(library \214rst appeared in)0 12 Q(FreeBSD5.3.)0 -24 Q(<h3 id="A)36 36 Q(UTHORS">)-.55 E -.55(AU)36 48 S(THORS).55 E -(</h3>)36 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 116 116 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>libarchi)0 24 Q -.15(ve)-.25 G -(</b>).15 E(library w)0 36 Q(as written by)-.1 E -.35(Ti)0 48 S 2.5(mK) -.35 G(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E(<h3 id="B)36 60 Q -(UGS">)-.1 E -.1(BU)36 72 S(GS).1 E 0 Cg EP -%%Page: 117 117 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(Man)0 24 Q 2.5(yt)-.15 G -(raditional archi)-2.5 E -.15(ve)-.25 G 2.5(rp).15 G(rograms treat)-2.5 -E(empty \214les as v)0 36 Q(alid empty archi)-.25 E -.15(ve)-.25 G(s.) -.15 E -.15(Fo)0 48 S 2.5(re).15 G(xample, man)-2.65 E 2.5(yi)-.15 G -(mplementations of)-2.5 E(<a href="../html1/tar)0 60 Q -(.html">tar\(1\)</a>)-.55 E(allo)0 72 Q 2.5(wy)-.25 G -(ou to append entries to an empty \214le.)-2.5 E 0 Cg EP -%%Page: 118 118 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Of course, it is impossible to determine the format of an empty \214le) -0 12 Q -(by inspecting the contents, so this library treats empty \214les as)0 -24 Q(ha)0 36 Q(ving a special)-.2 E -.74(``)0 48 S(empty').74 E(')-.74 E -(format.)0 60 Q(</body>)0 72 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:17 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">archive_read(3) FreeBSD Library Functions +Manual archive_read(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>archive_read_new</b>, +<b>archive_read_set_filter_options</b>, +<b>archive_read_set_format_options</b>, +<b>archive_read_set_options</b>, +<b>archive_read_support_compression_all</b>, +<b>archive_read_support_compression_bzip2</b>, +<b>archive_read_support_compression_compress</b>, +<b>archive_read_support_compression_gzip</b>, +<b>archive_read_support_compression_lzma</b>, +<b>archive_read_support_compression_none</b>, +<b>archive_read_support_compression_xz</b>, +<b>archive_read_support_compression_program</b>, +<b>archive_read_support_compression_program_signature</b>, +<b>archive_read_support_format_all</b>, +<b>archive_read_support_format_ar</b>, +<b>archive_read_support_format_cpio</b>, +<b>archive_read_support_format_empty</b>, +<b>archive_read_support_format_iso9660</b>, +<b>archive_read_support_format_mtree, +archive_read_support_format_raw, +archive_read_support_format_tar</b>, +<b>archive_read_support_format_zip</b>, +<b>archive_read_open</b>, <b>archive_read_open2</b>, +<b>archive_read_open_fd</b>, <b>archive_read_open_FILE</b>, +<b>archive_read_open_filename</b>, +<b>archive_read_open_memory</b>, +<b>archive_read_next_header</b>, +<b>archive_read_next_header2</b>, <b>archive_read_data</b>, +<b>archive_read_data_block</b>, +<b>archive_read_data_skip</b>, +<b>archive_read_data_into_buffer</b>, +<b>archive_read_data_into_fd</b>, +<b>archive_read_extract</b>, <b>archive_read_extract2</b>, +<b>archive_read_extract_set_progress_callback</b>, +<b>archive_read_close</b>, <b>archive_read_finish</b> +— functions for reading streaming archives</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:8%;"><b>#include +<archive.h></b></p> + +<p style="margin-left:8%; margin-top: 1em"><i>struct +archive *</i></p> + + +<p style="margin-left:14%;"><b>archive_read_new</b>(<i>void</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_compression_all</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_compression_bzip2</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_compression_compress</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_compression_gzip</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_compression_lzma</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_compression_none</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_compression_xz</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_support_compression_program</b>(<i>struct archive *</i>, +<i>const char *cmd</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_support_compression_program_signature</b>(<i>struct archive *</i>, +<i>const char *cmd</i>, +<i>const void *signature</i>, +<i>size_t signature_length</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_all</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_ar</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_cpio</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_empty</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_iso9660</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_mtree</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_raw</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_tar</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_support_format_zip</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_set_filter_options</b>(<i>struct archive *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_set_format_options</b>(<i>struct archive *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_set_options</b>(<i>struct archive *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_open</b>(<i>struct archive *</i>, +<i>void *client_data</i>, +<i>archive_open_callback *</i>, +<i>archive_read_callback *</i>, +<i>archive_close_callback *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_open2</b>(<i>struct archive *</i>, +<i>void *client_data</i>, +<i>archive_open_callback *</i>, +<i>archive_read_callback *</i>, +<i>archive_skip_callback *</i>, +<i>archive_close_callback *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_open_FILE</b>(<i>struct archive *</i>, +<i>FILE *file</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_open_fd</b>(<i>struct archive *</i>, +<i>int fd</i>, <i>size_t block_size</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_open_filename</b>(<i>struct archive *</i>, +<i>const char *filename</i>, +<i>size_t block_size</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_open_memory</b>(<i>struct archive *</i>, +<i>void *buff</i>, <i>size_t size</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_next_header</b>(<i>struct archive *</i>, +<i>struct archive_entry **</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_next_header2</b>(<i>struct archive *</i>, +<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>ssize_t</i></p> + + +<p style="margin-left:14%;"><b>archive_read_data</b>(<i>struct archive *</i>, +<i>void *buff</i>, <i>size_t len</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_data_block</b>(<i>struct archive *</i>, +<i>const void **buff</i>, <i>size_t *len</i>, +<i>off_t *offset</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_data_skip</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_data_into_buffer</b>(<i>struct archive *</i>, +<i>void *</i>, <i>ssize_t len</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_data_into_fd</b>(<i>struct archive *</i>, +<i>int fd</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_extract</b>(<i>struct archive *</i>, +<i>struct archive_entry *</i>, +<i>int flags</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_extract2</b>(<i>struct archive *src</i>, +<i>struct archive_entry *</i>, +<i>struct archive *dest</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p valign="top"><b>archive_read_extract_set_progress_callback</b>(<i>struct archive *</i>, +<i>void (*func)(void *)</i>, +<i>void *user_data</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_close</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_finish</b>(<i>struct archive *</i>);</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">These functions provide a +complete API for reading streaming archives. The general +process is to first create the struct archive object, set +options, initialize the reader, iterate over the archive +headers and associated data, then close the archive and +release all resources. The following summary describes the +functions in approximately the order they would be used:</p> + +<p valign="top"><b>archive_read_new</b>()</p> + +<p style="margin-left:20%;">Allocates and initializes a +struct archive object suitable for reading from an +archive.</p> + + +<p valign="top"><b>archive_read_support_compression_bzip2</b>(), +<b>archive_read_support_compression_compress</b>(), +<b>archive_read_support_compression_gzip</b>(), +<b>archive_read_support_compression_lzma</b>(), +<b>archive_read_support_compression_none</b>(), +<b>archive_read_support_compression_xz</b>()</p> + +<p style="margin-left:20%;">Enables auto-detection code and +decompression support for the specified compression. Returns +<b>ARCHIVE_OK</b> if the compression is fully supported, or +<b>ARCHIVE_WARN</b> if the compression is supported only +through an external program. Note that decompression using +an external program is usually slower than decompression +through built-in libraries. Note that +‘‘none’’ is always enabled by +default.</p> + + +<p valign="top"><b>archive_read_support_compression_all</b>()</p> + +<p style="margin-left:20%;">Enables all available +decompression filters.</p> + + +<p valign="top"><b>archive_read_support_compression_program</b>()</p> + +<p style="margin-left:20%;">Data is fed through the +specified external program before being dearchived. Note +that this disables automatic detection of the compression +format, so it makes no sense to specify this in conjunction +with any other decompression option.</p> + + +<p valign="top"><b>archive_read_support_compression_program_signature</b>()</p> + +<p style="margin-left:20%;">This feeds data through the +specified external program but only if the initial bytes of +the data match the specified signature value.</p> + +<p valign="top"><b>archive_read_support_format_all</b>(), +<b>archive_read_support_format_ar</b>(), +<b>archive_read_support_format_cpio</b>(), +<b>archive_read_support_format_empty</b>(), +<b>archive_read_support_format_iso9660</b>(), +<b>archive_read_support_format_mtree</b>(), +<b>archive_read_support_format_tar</b>(), +<b>archive_read_support_format_zip</b>()</p> + +<p style="margin-left:20%;">Enables support---including +auto-detection code---for the specified archive format. For +example, <b>archive_read_support_format_tar</b>() enables +support for a variety of standard tar formats, old-style +tar, ustar, pax interchange format, and many common +variants. For convenience, +<b>archive_read_support_format_all</b>() enables support for +all available formats. Only empty archives are supported by +default.</p> + + +<p valign="top"><b>archive_read_support_format_raw</b>()</p> + +<p style="margin-left:20%;">The +‘‘raw’’ format handler allows +libarchive to be used to read arbitrary data. It treats any +data stream as an archive with a single entry. The pathname +of this entry is ‘‘data’’; all other +entry fields are unset. This is not enabled by +<b>archive_read_support_format_all</b>() in order to avoid +erroneous handling of damaged archives.</p> + +<p valign="top"><b>archive_read_set_filter_options</b>(), +<b>archive_read_set_format_options</b>(), +<b>archive_read_set_options</b>()</p> + +<p style="margin-left:20%;">Specifies options that will be +passed to currently-registered filters (including +decompression filters) and/or format readers. The argument +is a comma-separated list of individual options. Individual +options have one of the following forms:</p> + +<p valign="top"><i>option=value</i></p> + +<p style="margin-left:32%;">The option/value pair will be +provided to every module. Modules that do not accept an +option with this name will ignore it.</p> + +<p valign="top"><i>option</i></p> + +<p style="margin-left:32%; margin-top: 1em">The option will +be provided to every module with a value of +‘‘1’’.</p> + +<p valign="top"><i>!option</i></p> + +<p style="margin-left:32%;">The option will be provided to +every module with a NULL value.</p> + +<p valign="top"><i>module:option=value</i>, +<i>module:option</i>, <i>module:!option</i></p> + +<p style="margin-left:32%;">As above, but the corresponding +option and value will be provided only to modules whose name +matches <i>module</i>.</p> + +<p style="margin-left:20%;">The return value will be +<b>ARCHIVE_OK</b> if any module accepts the option, or +<b>ARCHIVE_WARN</b> if no module accepted the option, or +<b>ARCHIVE_FATAL</b> if there was a fatal error while +attempting to process the option.</p> + +<p style="margin-left:20%; margin-top: 1em">The currently +supported options are:</p> + +<p valign="top">Format iso9660 <b><br> +joliet</b></p> + +<p style="margin-left:45%; margin-top: 1em">Support Joliet +extensions. Defaults to enabled, use <b>!joliet</b> to +disable.</p> + +<p valign="top"><b>archive_read_open</b>()</p> + +<p style="margin-left:20%;">The same as +<b>archive_read_open2</b>(), except that the skip callback +is assumed to be NULL.</p> + +<p valign="top"><b>archive_read_open2</b>()</p> + +<p style="margin-left:20%;">Freeze the settings, open the +archive, and prepare for reading entries. This is the most +generic version of this call, which accepts four callback +functions. Most clients will want to use +<b>archive_read_open_filename</b>(), +<b>archive_read_open_FILE</b>(), +<b>archive_read_open_fd</b>(), or +<b>archive_read_open_memory</b>() instead. The library +invokes the client-provided functions to obtain raw bytes +from the archive.</p> + +<p valign="top"><b>archive_read_open_FILE</b>()</p> + +<p style="margin-left:20%;">Like +<b>archive_read_open</b>(), except that it accepts a <i>FILE +*</i> pointer. This function should not be used with tape +drives or other devices that require strict I/O +blocking.</p> + +<p valign="top"><b>archive_read_open_fd</b>()</p> + +<p style="margin-left:20%;">Like +<b>archive_read_open</b>(), except that it accepts a file +descriptor and block size rather than a set of function +pointers. Note that the file descriptor will not be +automatically closed at end-of-archive. This function is +safe for use with tape drives or other blocked devices.</p> + +<p valign="top"><b>archive_read_open_file</b>()</p> + +<p style="margin-left:20%;">This is a deprecated synonym +for <b>archive_read_open_filename</b>().</p> + +<p valign="top"><b>archive_read_open_filename</b>()</p> + +<p style="margin-left:20%;">Like +<b>archive_read_open</b>(), except that it accepts a simple +filename and a block size. A NULL filename represents +standard input. This function is safe for use with tape +drives or other blocked devices.</p> + +<p valign="top"><b>archive_read_open_memory</b>()</p> + +<p style="margin-left:20%;">Like +<b>archive_read_open</b>(), except that it accepts a pointer +and size of a block of memory containing the archive +data.</p> + +<p valign="top"><b>archive_read_next_header</b>()</p> + +<p style="margin-left:20%;">Read the header for the next +entry and return a pointer to a struct archive_entry. This +is a convenience wrapper around +<b>archive_read_next_header2</b>() that reuses an internal +struct archive_entry object for each request.</p> + +<p valign="top"><b>archive_read_next_header2</b>()</p> + +<p style="margin-left:20%;">Read the header for the next +entry and populate the provided struct archive_entry.</p> + +<p valign="top"><b>archive_read_data</b>()</p> + +<p style="margin-left:20%;">Read data associated with the +header just read. Internally, this is a convenience function +that calls <b>archive_read_data_block</b>() and fills any +gaps with nulls so that callers see a single continuous +stream of data.</p> + +<p valign="top"><b>archive_read_data_block</b>()</p> + +<p style="margin-left:20%;">Return the next available block +of data for this entry. Unlike <b>archive_read_data</b>(), +the <b>archive_read_data_block</b>() function avoids copying +data and allows you to correctly handle sparse files, as +supported by some archive formats. The library guarantees +that offsets will increase and that blocks will not overlap. +Note that the blocks returned from this function can be much +larger than the block size read from disk, due to +compression and internal buffer optimizations.</p> + +<p valign="top"><b>archive_read_data_skip</b>()</p> + +<p style="margin-left:20%;">A convenience function that +repeatedly calls <b>archive_read_data_block</b>() to skip +all of the data for this archive entry.</p> + +<p valign="top"><b>archive_read_data_into_buffer</b>()</p> + +<p style="margin-left:20%;">This function is deprecated and +will be removed. Use <b>archive_read_data</b>() instead.</p> + +<p valign="top"><b>archive_read_data_into_fd</b>()</p> + +<p style="margin-left:20%;">A convenience function that +repeatedly calls <b>archive_read_data_block</b>() to copy +the entire entry to the provided file descriptor.</p> + +<p valign="top"><b>archive_read_extract</b>(), +<b>archive_read_extract_set_skip_file</b>()</p> + +<p style="margin-left:20%;">A convenience function that +wraps the corresponding archive_write_disk(3) interfaces. +The first call to <b>archive_read_extract</b>() creates a +restore object using archive_write_disk_new(3) and +archive_write_disk_set_standard_lookup(3), then +transparently invokes archive_write_disk_set_options(3), +archive_write_header(3), archive_write_data(3), and +archive_write_finish_entry(3) to create the entry on disk +and copy data into it. The <i>flags</i> argument is passed +unmodified to archive_write_disk_set_options(3).</p> + +<p valign="top"><b>archive_read_extract2</b>()</p> + +<p style="margin-left:20%;">This is another version of +<b>archive_read_extract</b>() that allows you to provide +your own restore object. In particular, this allows you to +override the standard lookup functions using +archive_write_disk_set_group_lookup(3), and +archive_write_disk_set_user_lookup(3). Note that +<b>archive_read_extract2</b>() does not accept a +<i>flags</i> argument; you should use +<b>archive_write_disk_set_options</b>() to set the restore +options yourself.</p> + + +<p valign="top"><b>archive_read_extract_set_progress_callback</b>()</p> + +<p style="margin-left:20%;">Sets a pointer to a +user-defined callback that can be used for updating progress +displays during extraction. The progress function will be +invoked during the extraction of large regular files. The +progress function will be invoked with the pointer provided +to this call. Generally, the data pointed to should include +a reference to the archive object and the archive_entry +object so that various statistics can be retrieved for the +progress display.</p> + +<p valign="top"><b>archive_read_close</b>()</p> + +<p style="margin-left:20%;">Complete the archive and invoke +the close callback.</p> + +<p valign="top"><b>archive_read_finish</b>()</p> + +<p style="margin-left:20%;">Invokes +<b>archive_read_close</b>() if it was not invoked manually, +then release all resources. Note: In libarchive 1.x, this +function was declared to return <i>void</i>, which made it +impossible to detect certain errors when +<b>archive_read_close</b>() was invoked implicitly from this +function. The declaration is corrected beginning with +libarchive 2.0.</p> + +<p style="margin-left:8%; margin-top: 1em">Note that the +library determines most of the relevant information about +the archive by inspection. In particular, it automatically +detects gzip(1) or bzip2(1) compression and transparently +performs the appropriate decompression. It also +automatically detects the archive format.</p> + +<p style="margin-left:8%; margin-top: 1em">A complete +description of the struct archive and struct archive_entry +objects can be found in the overview manual page for +libarchive(3).</p> + +<p style="margin-top: 1em" valign="top"><b>CLIENT +CALLBACKS</b></p> + +<p style="margin-left:8%;">The callback functions must +match the following prototypes:</p> + +<p style="margin-left:17%; margin-top: 1em"><i>typedef +ssize_t</i></p> + + +<p valign="top"><b>archive_read_callback</b>(<i>struct archive *</i>, +<i>void *client_data</i>, +<i>const void **buffer</i>)</p> + +<p style="margin-left:17%; margin-top: 1em"><i>typedef +int</i></p> + + +<p valign="top"><b>archive_skip_callback</b>(<i>struct archive *</i>, +<i>void *client_data</i>, +<i>size_t request</i>)</p> + +<p style="margin-left:17%; margin-top: 1em"><i>typedef +int</i> <b>archive_open_callback</b>(<i>struct archive +*</i>, <i>void *client_data</i>)</p> + +<p style="margin-left:17%; margin-top: 1em"><i>typedef +int</i> <b>archive_close_callback</b>(<i>struct archive +*</i>, <i>void *client_data</i>)</p> + +<p style="margin-left:8%; margin-top: 1em">The open +callback is invoked by <b>archive_open</b>(). It should +return <b>ARCHIVE_OK</b> if the underlying file or data +source is successfully opened. If the open fails, it should +call <b>archive_set_error</b>() to register an error code +and message and return <b>ARCHIVE_FATAL</b>.</p> + +<p style="margin-left:8%; margin-top: 1em">The read +callback is invoked whenever the library requires raw bytes +from the archive. The read callback should read data into a +buffer, set the const void **buffer argument to point to the +available data, and return a count of the number of bytes +available. The library will invoke the read callback again +only after it has consumed this data. The library imposes no +constraints on the size of the data blocks returned. On +end-of-file, the read callback should return zero. On error, +the read callback should invoke <b>archive_set_error</b>() +to register an error code and message and return -1.</p> + +<p style="margin-left:8%; margin-top: 1em">The skip +callback is invoked when the library wants to ignore a block +of data. The return value is the number of bytes actually +skipped, which may differ from the request. If the callback +cannot skip data, it should return zero. If the skip +callback is not provided (the function pointer is NULL ), +the library will invoke the read function instead and simply +discard the result. A skip callback can provide significant +performance gains when reading uncompressed archives from +slow disk drives or other media that can skip quickly.</p> + +<p style="margin-left:8%; margin-top: 1em">The close +callback is invoked by archive_close when the archive +processing is complete. The callback should return +<b>ARCHIVE_OK</b> on success. On failure, the callback +should invoke <b>archive_set_error</b>() to register an +error code and message and return <b>ARCHIVE_FATAL.</b></p> + +<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p> + +<p style="margin-left:8%;">The following illustrates basic +usage of the library. In this example, the callback +functions are simply wrappers around the standard open(2), +read(2), and close(2) system calls.</p> + +<p style="margin-left:17%; margin-top: 1em">void <br> +list_archive(const char *name) <br> +{ <br> +struct mydata *mydata; <br> +struct archive *a; <br> +struct archive_entry *entry;</p> + +<p style="margin-left:17%; margin-top: 1em">mydata = +malloc(sizeof(struct mydata)); <br> +a = archive_read_new(); <br> +mydata->name = name; <br> +archive_read_support_compression_all(a); <br> +archive_read_support_format_all(a); <br> +archive_read_open(a, mydata, myopen, myread, myclose); <br> +while (archive_read_next_header(a, &entry) == +ARCHIVE_OK) { <br> +printf("%s\n",archive_entry_pathname(entry)); <br> +archive_read_data_skip(a); <br> +} <br> +archive_read_finish(a); <br> +free(mydata); <br> +}</p> + +<p style="margin-left:17%; margin-top: 1em">ssize_t <br> +myread(struct archive *a, void *client_data, const void +**buff) <br> +{ <br> +struct mydata *mydata = client_data;</p> + +<p style="margin-left:17%; margin-top: 1em">*buff = +mydata->buff; <br> +return (read(mydata->fd, mydata->buff, 10240)); <br> +}</p> + +<p style="margin-left:17%; margin-top: 1em">int <br> +myopen(struct archive *a, void *client_data) <br> +{ <br> +struct mydata *mydata = client_data;</p> + +<p style="margin-left:17%; margin-top: 1em">mydata->fd = +open(mydata->name, O_RDONLY); <br> +return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL); +<br> +}</p> + +<p style="margin-left:17%; margin-top: 1em">int <br> +myclose(struct archive *a, void *client_data) <br> +{ <br> +struct mydata *mydata = client_data;</p> + +<p style="margin-left:17%; margin-top: 1em">if +(mydata->fd > 0) <br> +close(mydata->fd); <br> +return (ARCHIVE_OK); <br> +}</p> + +<p style="margin-top: 1em" valign="top"><b>RETURN +VALUES</b></p> + +<p style="margin-left:8%;">Most functions return zero on +success, non-zero on error. The possible return codes +include: <b>ARCHIVE_OK</b> (the operation succeeded), +<b>ARCHIVE_WARN</b> (the operation succeeded but a +non-critical error was encountered), <b>ARCHIVE_EOF</b> +(end-of-archive was encountered), <b>ARCHIVE_RETRY</b> (the +operation failed but can be retried), and +<b>ARCHIVE_FATAL</b> (there was a fatal error; the archive +should be closed immediately). Detailed error codes and +textual descriptions are available from the +<b>archive_errno</b>() and <b>archive_error_string</b>() +functions.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_read_new</b>() +returns a pointer to a freshly allocated struct archive +object. It returns NULL on error.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_read_data</b>() +returns a count of bytes actually read or zero at the end of +the entry. On error, a value of <b>ARCHIVE_FATAL</b>, +<b>ARCHIVE_WARN</b>, or <b>ARCHIVE_RETRY</b> is returned and +an error code and textual description can be retrieved from +the <b>archive_errno</b>() and <b>archive_error_string</b>() +functions.</p> + +<p style="margin-left:8%; margin-top: 1em">The library +expects the client callbacks to behave similarly. If there +is an error, you can use <b>archive_set_error</b>() to set +an appropriate error code and description, then return one +of the non-zero values above. (Note that the value +eventually returned to the client may not be the same; many +errors that are not critical at the level of basic I/O can +prevent the archive from being properly read, thus most I/O +errors eventually cause <b>ARCHIVE_FATAL</b> to be +returned.)</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">tar(1), archive(3), +archive_util(3), tar(5)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@acm.org⟩.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">Many traditional archiver +programs treat empty files as valid empty archives. For +example, many implementations of tar(1) allow you to append +entries to an empty file. Of course, it is impossible to +determine the format of an empty file by inspecting the +contents, so this library treats empty files as having a +special ‘‘empty’’ format.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +April 13, 2009 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/archive_read_disk.3.html b/archivers/libarchive/files/doc/html/archive_read_disk.3.html index 958f9674f9e..cbba421d666 100644 --- a/archivers/libarchive/files/doc/html/archive_read_disk.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_disk.3.html @@ -1,765 +1,341 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:16 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 53 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(March 10, 2009 archi)74.5 48 Q -.15(ve)-.25 G(_read_disk 3).15 E -(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_read_disk_ne).15 -E(w</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_disk_set_symlink_logical</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 -G(_read_disk_set_symlink_ph).15 E(ysical</b>,)-.05 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_disk_set_symlink_h).15 E(ybrid</b>,)-.05 E(<b>archi)0 24 Q -.15 -(ve)-.25 G(_read_disk_entry_from_\214le</b>,).15 E(<b>archi)0 36 Q -.15 -(ve)-.25 G(_read_disk_gname</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_disk_uname</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_disk_set_uname_lookup</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_read_disk_set_gname_lookup</b>,).15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_disk_set_standard_lookup</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 -G(_read_close</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_\214nish</b>).15 E 2.5(-f)0 48 S -(unctions for reading objects from disk)-2.5 E(<h3 id="SYNOPSIS">)36 60 -Q(SYNOPSIS)36 72 Q 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q -(<br><br><code></code><code>struct</code><code> archi)0 24 Q -.15(ve) --.25 G(</code><code> *</code>).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_disk_ne).15 E(w</b>\(<code></code><code>v)-.25 E(oid</code>\))-.2 -E(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G -(_read_disk_set_symlink_logical</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_disk_set_symlink_ph).15 E -(ysical</b>\(<code></code><code>struct archi)-.05 E .3 -.15(ve *)-.25 H -(</code>\)).15 E(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 -36 Q -.15(ve)-.25 G(_read_disk_set_symlink_h).15 E -(ybrid</b>\(<code></code><code>struct archi)-.05 E .3 -.15(ve *)-.25 H -(</code>\)).15 E(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 -60 Q -.15(ve)-.25 G -(_read_disk_gname</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code><code>, gid_t</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_disk_uname</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code><code>, uid_t</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_read_disk_set_gname_lookup</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 48 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>v)0 60 Q(oid *</code>)-.2 E -(<code></code><code>const char *\(*lookup\)\(v)0 72 Q -(oid *, gid_t\)</code>)-.2 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>v)0 12 Q(oid \(*cleanup\)\(v) --.2 E(oid *\)</code>)-.2 E(\))0 24 Q -(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15(ve) --.25 G(_read_disk_set_uname_lookup</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 60 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>v)0 72 Q(oid *</code>)-.2 E 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>const char *\(*lookup\)\(v)0 -12 Q(oid *, uid_t\)</code>)-.2 E(<code></code><code>v)0 24 Q -(oid \(*cleanup\)\(v)-.2 E(oid *\)</code>)-.2 E(\))0 36 Q -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G -(_read_disk_set_standard_lookup</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_disk_entry_from_\214le</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 24 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>struct archi)0 36 Q -.15(ve)-.25 G(_entry *</code>) -.15 E(<code></code><code>int fd</code>)0 48 Q -(<code></code><code>const struct stat *</code>)0 60 Q(\))0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>int</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_close</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 36 Q -(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_\214nish</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<h3 id="DESCRIPTION">)36 60 Q(DESCRIPTION)36 72 Q -0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(These functions pro)0 24 Q -(vide an API for reading information about)-.15 E(objects on disk.)0 36 -Q(In particular)0 48 Q 2.5(,t)-.4 G(he)-2.5 E 2.5(yp)-.15 G(ro)-2.5 E -(vide an interf)-.15 E(ace for populating)-.1 E(<font size="-1"></font>\ -<font size="-1">struct</font><font size="-1"> archi)0 60 Q -.15(ve)-.25 -G(_entry</font>).15 E(objects.)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q(<p><dt><b>archi)0 24 Q -.15 -(ve)-.25 G(_read_disk_ne).15 E(w</b>\(<code></code>\)<dd>)-.25 E -(Allocates and initializes a)0 36 Q(<font size="-1"></font><font size="\ --1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G(</font>) -.15 E(object suitable for reading object information from disk.)0 60 Q -(<p><dt>Xo<dd>)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_disk_set_symlink_logical</b>\(<code></code>\),).15 E(<b>archi)0 -24 Q -.15(ve)-.25 G(_read_disk_set_symlink_ph).15 E -(ysical</b>\(<code></code>\),)-.05 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_disk_set_symlink_h).15 E(ybrid</b>\(<code></code>\))-.05 E -(This sets the mode used for handling symbolic links.)0 48 Q(The)0 60 Q --.74(``)0 72 S(logical').74 E(')-.74 E 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(mode follo)0 12 Q(ws all symbolic links.)-.25 E -(The)0 24 Q -.74(``)0 36 S(ph).74 E(ysical')-.05 E(')-.74 E -(mode does not follo)0 48 Q 2.5(wa)-.25 G .3 -.15(ny s)-2.5 H -(ymbolic links.).15 E(The)0 60 Q -.74(``)0 72 S -.05(hy).74 G(brid').05 -E(')-.74 E 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(mode currently beha)0 12 Q -.15(ve)-.2 G 2.5(si) -.15 G(dentically to the)-2.5 E -.74(``)0 24 S(logical').74 E(')-.74 E -(mode.)0 36 Q(<p><dt>Xo<dd>)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_disk_gname</b>\(<code></code>\),).15 E(<b>archi)0 72 Q -.15(ve) --.25 G(_read_disk_uname</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Returns a user or group name gi)0 12 Q -.15(ve) --.25 G 2.5(nag).15 G(id or uid v)-2.5 E(alue.)-.25 E(By def)0 24 Q -(ault, these al)-.1 E -.1(wa)-.1 G(ys return a NULL string.).1 E -(<p><dt>Xo<dd>)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_disk_set_gname_lookup</b>\(<code></code>\),).15 E(<b>archi)0 60 Q --.15(ve)-.25 G(_read_disk_set_uname_lookup</b>\(<code></code>\)).15 E -(These allo)0 72 Q 2.5(wy)-.25 G(ou to o)-2.5 E -.15(ve)-.15 G -(rride the functions used for).15 E 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(user and group name lookups.)0 12 Q -1.1(Yo)0 24 -S 2.5(um)1.1 G(ay also pro)-2.5 E(vide a)-.15 E -(<font size="-1"></font><font size="-1">v)0 36 Q -(oid</font><font size="-1"> *</font>)-.2 E(pointer to a pri)0 48 Q -.25 -(va)-.25 G(te data structure and a cleanup function for).25 E -(that data.)0 60 Q(The cleanup function will be in)0 72 Q -.2(vo)-.4 G --.1(ke).2 G 2.5(dw).1 G(hen the)-2.5 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(</font>).15 E -(object is destro)0 24 Q(yed or when ne)-.1 E 2.5(wl)-.25 G -(ookup functions are re)-2.5 E(gistered.)-.15 E(<p><dt><b>archi)0 36 Q --.15(ve)-.25 G(_read_disk_set_standard_lookup</b>\(<code></code>\)<dd>) -.15 E(This con)0 48 Q -.15(ve)-.4 G -(nience function installs a standard set of user).15 E -(and group name lookup functions.)0 60 Q(These functions use)0 72 Q 0 Cg -EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 12 Q(and)0 24 Q -(<a href="../html3/getgrid.html">getgrid\(3\)</a>)0 36 Q(to con)0 48 Q --.15(ve)-.4 G(rt ids to names, def).15 E -(aulting to NULL if the names cannot)-.1 E(be look)0 60 Q(ed up.)-.1 E -(These functions also implement a simple memory cache to reduce)0 72 Q 0 -Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(the number of calls to)0 12 Q -(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 24 Q(and)0 36 Q -(<a href="../html3/getgrid.html">getgrid\(3\)</a>.)0 48 Q -(<p><dt><b>archi)0 60 Q -.15(ve)-.25 G -(_read_disk_entry_from_\214le</b>\(<code></code>\)<dd>).15 E -(Populates a)0 72 Q 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E -(object with information about a particular \214le.)0 24 Q(The)0 36 Q -(<font size="-1"></font><font size="-1">archi)0 48 Q -.15(ve)-.25 G -(_entry</font>).15 E(object must ha)0 60 Q .3 -.15(ve a)-.2 H -(lready been created with).15 E(<a href="../html3/archi)0 72 Q -.15(ve) --.25 G(_entry_ne).15 E -.65(w.)-.25 G(html">archi).65 E -.15(ve)-.25 G -(_entry_ne).15 E(w\(3\)</a>)-.25 E 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and at least one of the source path or path \ -\214elds must already be set.)0 12 Q -(\(If both are set, the source path will be used.\))0 24 Q(<p>)36 36 Q -(Information is read from disk using the path name from the)0 48 Q(<fon\ -t size="-1"></font><font size="-1">struct</font><font size="-1"> archi)0 -60 Q -.15(ve)-.25 G(_entry</font>).15 E(object.)0 72 Q 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(If a \214le descriptor is pro)0 12 Q -(vided, some information will be obtained using)-.15 E -(that \214le descriptor)0 24 Q 2.5(,o)-.4 G 2.5(np)-2.5 G -(latforms that support the appropriate)-2.5 E(system calls.)0 36 Q(<p>) -36 48 Q(If a pointer to a)0 60 Q(<font size="-1"></font><font size="-1"\ ->struct</font><font size="-1"> stat</font>)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(is pro)0 12 Q -(vided, information from that structure will be used instead)-.15 E -(of reading from the disk where appropriate.)0 24 Q(This can pro)0 36 Q -(vide performance bene\214ts in scenarios where)-.15 E(<font size="-1">\ -</font><font size="-1">struct</font><font size="-1"> stat</font>)0 48 Q -(information has already been read from the disk as a side ef)0 60 Q -(fect)-.25 E(of some other operation.)0 72 Q 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(F)0 12 Q(or e)-.15 E(xample, directory tra) --.15 E -.15(ve)-.2 G(rsal libraries often pro).15 E -(vide this information.\))-.15 E(<p>)36 24 Q(Where necessary)0 36 Q 2.5 -(,u)-.65 G(ser and group ids are con)-2.5 E -.15(ve)-.4 G -(rted to user and group names).15 E(using the currently re)0 48 Q -(gistered lookup functions abo)-.15 E -.15(ve)-.15 G(.).15 E(This af)0 -60 Q(fects the \214le o)-.25 E(wnership \214elds and A)-.25 E(CL v)-.4 E -(alues in the)-.25 E(<font size="-1"></font><font size="-1">struct</fon\ -t><font size="-1"> archi)0 72 Q -.15(ve)-.25 G(_entry</font>).15 E 0 Cg -EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(object.)0 12 Q(<p><dt><b>archi)0 24 Q -.15(ve) --.25 G(_read_close</b>\(<code></code>\)<dd>).15 E -(This currently does nothing.)0 36 Q(<p><dt><b>archi)0 48 Q -.15(ve)-.25 -G(_write_\214nish</b>\(<code></code>\)<dd>).15 E(In)0 60 Q -.2(vo)-.4 G --.1(ke).2 G(s).1 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(if it w)0 12 Q(as not in)-.1 E -.2(vo)-.4 G -.1 -(ke).2 G 2.5(dm).1 G(anually)-2.5 E 2.5(,t)-.65 G -(hen releases all resources.)-2.5 E(</dl>)0 24 Q -(More information about the)0 36 Q(<i></i><i>struct</i><i> archi)0 48 Q --.15(ve)-.25 G(</i>).15 E(object and the o)0 60 Q -.15(ve)-.15 G -(rall design of the library can be found in the).15 E -(<a href="../html3/libarchi)0 72 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(ove)0 12 S(rvie).15 E -.65(w.)-.25 G -(<h3 id="EXAMPLE">)36 24 Q(EXAMPLE)36 36 Q(</h3>)36 48 Q(The follo)0 60 -Q(wing illustrates basic usage of the library by)-.25 E(sho)0 72 Q -(wing ho)-.25 E 2.5(wt)-.25 G 2.5(ou)-2.5 G(se it to cop)-2.5 E 2.5(ya) --.1 G 2.5(ni)-2.5 G(tem on disk into an archi)-2.5 E -.15(ve)-.25 G(.) -.15 E 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>) -0 36 Q -.2(vo)0 48 S(id).2 E(\214le_to_archi)0 60 Q -.15(ve)-.25 G -(\(struct archi).15 E .3 -.15(ve *)-.25 H(a, const char *name\)).15 E({) -0 72 Q 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char b)5 12 Q(uf)-.2 E(f[8192];)-.25 E -(size_t bytes_read;)5 24 Q(struct archi)5 36 Q .3 -.15(ve *)-.25 H(ard;) -.15 E(struct archi)5 48 Q -.15(ve)-.25 G(_entry *entry;).15 E(int fd;)5 -60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ard = archi)5 12 Q -.15(ve)-.25 G(_read_disk_ne) -.15 E(w\(\);)-.25 E(archi)5 24 Q -.15(ve)-.25 G -(_read_disk_set_standard_lookup\(ard\);).15 E(entry = archi)5 36 Q -.15 -(ve)-.25 G(_entry_ne).15 E(w\(\);)-.25 E(fd = open\(name, O_RDONL)5 48 Q -(Y\);)-1 E(if \(fd < 0\))5 60 Q(return;)12.5 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)5 12 Q -.15(ve)-.25 G(_entry_cop).15 E -(y_sourcepath\(entry)-.1 E 2.5(,n)-.65 G(ame\);)-2.5 E(archi)5 24 Q -.15 -(ve)-.25 G(_read_disk_entry_from_\214le\(ard, entry).15 E 2.5(,f)-.65 G -(d, NULL\);)-2.5 E(archi)5 36 Q -.15(ve)-.25 G -(_write_header\(a, entry\);).15 E(while \(\(bytes_read = read\(fd, b)5 -48 Q(uf)-.2 E(f, sizeof\(b)-.25 E(uf)-.2 E(f\)\)\) > 0\))-.25 E(archi)10 -60 Q -.15(ve)-.25 G(_write_data\(a, b).15 E(uf)-.2 E(f, bytes_read\);) --.25 E(archi)5 72 Q -.15(ve)-.25 G(_write_\214nish_entry\(a\);).15 E 0 -Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)5 12 Q -.15(ve)-.25 G -(_read_\214nish\(ard\);).15 E(archi)5 24 Q -.15(ve)-.25 G -(_entry_free\(entry\);).15 E(})0 36 Q(</pre>)0 48 Q(</code>)0 60 Q -(</dl>)0 72 Q 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="RETURN V)36 12 Q(ALUES">)-1.35 E -(RETURN V)36 24 Q(ALUES)-1.35 E(</h3>)36 36 Q(Most functions return)0 48 -Q(<b></b><b>ARCHIVE_OK</b>)0 60 Q(\(zero\) on success, or one of se)0 72 -Q -.15(ve)-.25 G(ral ne).15 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G 0 -Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(error codes for errors.)0 12 Q -(Speci\214c error codes include:)0 24 Q(<b></b><b>ARCHIVE_RETR)0 36 Q -(Y</b>)-.65 E(for operations that might succeed if retried,)0 48 Q -(<b></b><b>ARCHIVE_W)0 60 Q(ARN</b>)-1.2 E -(for unusual conditions that do not pre)0 72 Q -.15(ve)-.25 G -(nt further operations, and).15 E 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>ARCHIVE_F)0 12 Q -1.21 -1.11(AT A)-.74 -H(L</b>)1.11 E(for serious errors that mak)0 24 Q 2.5(er)-.1 G -(emaining operations impossible.)-2.5 E(The)0 36 Q -(<a href="../html3/archi)0 48 Q -.15(ve)-.25 G(_errno.html">archi).15 E --.15(ve)-.25 G(_errno\(3\)</a>).15 E(and)0 60 Q(<a href="../html3/archi) -0 72 Q -.15(ve)-.25 G(_error_string.html">archi).15 E -.15(ve)-.25 G -(_error_string\(3\)</a>).15 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(functions can be used to retrie)0 12 Q .3 -.15 -(ve a)-.25 H 2.5(na).15 G(ppropriate error code and a)-2.5 E(te)0 24 Q -(xtual error message.)-.15 E(\(See)0 36 Q(<a href="../html3/archi)0 48 Q --.15(ve)-.25 G(_util.html">archi).15 E -.15(ve)-.25 G(_util\(3\)</a>).15 -E(for details.\))0 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_disk_ne).15 -E(w</b>\(<code></code>\))-.25 E(returns a pointer to a ne)0 24 Q -(wly-allocated)-.25 E(<font size="-1"></font><font size="-1">struct</fo\ -nt><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(</font>).15 E -(object or NULL if the allocation f)0 48 Q(ailed for an)-.1 E 2.5(yr) --.15 G(eason.)-2.5 E(<p>)36 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G -(_read_disk_gname</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_disk_uname</b>\(<code></code>\)).15 E(return)0 36 Q(<font size="\ --1"></font><font size="-1">const</font><font size="-1"> char</font><fon\ -t size="-1"> *</font>)0 48 Q(pointers to the te)0 60 Q -(xtual name or NULL if the lookup f)-.15 E(ailed for an)-.1 E 2.5(yr) --.15 G(eason.)-2.5 E -(The returned pointer points to internal storage that)0 72 Q 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(may be reused on the ne)0 12 Q -(xt call to either of these functions;)-.15 E(callers should cop)0 24 Q -2.5(yt)-.1 G(he string if the)-2.5 E 2.5(yn)-.15 G -(eed to continue accessing it.)-2.5 E(<p>)36 36 Q(<h3 id="SEE ALSO">)36 -48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G -(_read.html">archi).15 E -.15(ve)-.25 G(_read\(3\)</a>,).15 E -(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G(_write.html">archi).15 E --.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html3/archi)0 36 Q --.15(ve)-.25 G(_write_disk.html">archi).15 E -.15(ve)-.25 G -(_write_disk\(3\)</a>,).15 E(<a href="../html1/tar)0 48 Q -(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/libarchi)0 60 Q -.15(ve) --.25 G(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>).15 E -(<h3 id="HIST)36 72 Q(OR)-.18 E(Y">)-.65 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(HIST)36 12 Q(OR)-.18 E(Y)-.65 E(</h3>)36 24 Q -(The)0 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E -(library \214rst appeared in)0 60 Q(FreeBSD5.3.)0 72 Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_read_disk</b>).15 E(interf)0 36 Q(ace w)-.1 E(as added to)-.1 E -(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b><b>2.6</b>).15 E -(and \214rst appeared in)0 60 Q(FreeBSD8.0.)0 72 Q 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="A)36 12 Q(UTHORS">)-.55 E -.55(AU)36 24 -S(THORS).55 E(</h3>)36 36 Q(<p>)36 48 Q(The)0 60 Q(<b>libarchi)0 72 Q --.15(ve)-.25 G(</b>).15 E 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(library w)0 12 Q(as written by)-.1 E -.35(Ti)0 -24 S 2.5(mK).35 G(ientzle <kientzle@freebsd.or)-2.5 E(g>.)-.18 E -(<h3 id="B)36 36 Q(UGS">)-.1 E -.1(BU)36 48 S(GS).1 E(</h3>)36 60 Q(The) -0 72 Q 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(standard').74 E(')-.74 E -(user name and group name lookup functions are not the def)0 24 Q -(aults because)-.1 E(<a href="../html3/getgrid.html">getgrid\(3\)</a>)0 -36 Q(and)0 48 Q(<a href="../html3/getpwid.html">getpwid\(3\)</a>)0 60 Q -(are sometimes too lar)0 72 Q(ge for particular applications.)-.18 E 0 -Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The current design allo)0 12 Q -(ws the application author to use a more)-.25 E -(compact implementation when appropriate.)0 24 Q(<p>)36 36 Q -(The full list of metadata read from disk by)0 48 Q(<b>archi)0 60 Q -.15 -(ve)-.25 G(_read_disk_entry_from_\214le</b>\(<code></code>\)).15 E -(is necessarily system-dependent.)0 72 Q 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_read_disk_entry_from_\214le</b>\(<code></code>\)).15 E -(function reads as much information as it can from disk.)0 48 Q -(Some method should be pro)0 60 Q -(vided to limit this so that clients who)-.15 E(do not need A)0 72 Q -(CLs, for instance, can a)-.4 E -.2(vo)-.2 G(id the e).2 E(xtra w)-.15 E -(ork needed)-.1 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(to look up such information.)0 12 Q(<p>)36 24 Q -(This API should pro)0 36 Q(vide a set of methods for w)-.15 E -(alking a directory tree.)-.1 E(That w)0 48 Q(ould mak)-.1 E 2.5(ei)-.1 -G 2.5(tad)-2.5 G(irect parallel of the)-2.5 E(<a href="../html3/archi)0 -60 Q -.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G -(_read\(3\)</a>).15 E(API.)0 72 Q 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(When such methods are implemented, the)0 12 Q --.74(``)0 24 S -.05(hy).74 G(brid').05 E(')-.74 E -(symbolic link mode will mak)0 36 Q 2.5(es)-.1 G(ense.)-2.5 E(</body>)0 -48 Q(</html>)0 60 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:19 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">archive_read_disk(3) FreeBSD Library +Functions Manual archive_read_disk(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>archive_read_disk_new</b>, +<b>archive_read_disk_set_symlink_logical</b>, +<b>archive_read_disk_set_symlink_physical</b>, +<b>archive_read_disk_set_symlink_hybrid</b>, +<b>archive_read_disk_entry_from_file</b>, +<b>archive_read_disk_gname</b>, +<b>archive_read_disk_uname</b>, +<b>archive_read_disk_set_uname_lookup</b>, +<b>archive_read_disk_set_gname_lookup</b>, +<b>archive_read_disk_set_standard_lookup</b>, +<b>archive_read_close</b>, <b>archive_read_finish</b> +— functions for reading objects from disk</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:8%;"><b>#include +<archive.h></b></p> + +<p style="margin-left:8%; margin-top: 1em"><i>struct +archive *</i></p> + + +<p style="margin-left:14%;"><b>archive_read_disk_new</b>(<i>void</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_disk_gname</b>(<i>struct archive *</i>, +<i>gid_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_disk_uname</b>(<i>struct archive *</i>, +<i>uid_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_disk_set_gname_lookup</b>(<i>struct archive *</i>, +<i>void *</i>, +<i>const char *(*lookup)(void *, gid_t)</i>, +<i>void (*cleanup)(void *)</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_disk_set_uname_lookup</b>(<i>struct archive *</i>, +<i>void *</i>, +<i>const char *(*lookup)(void *, uid_t)</i>, +<i>void (*cleanup)(void *)</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_read_disk_entry_from_file</b>(<i>struct archive *</i>, +<i>struct archive_entry *</i>, <i>int fd</i>, +<i>const struct stat *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_close</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_read_finish</b>(<i>struct archive *</i>);</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">These functions provide an API +for reading information about objects on disk. In +particular, they provide an interface for populating struct +archive_entry objects.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_read_disk_new</b>()</p> + +<p style="margin-left:20%;">Allocates and initializes a +struct archive object suitable for reading object +information from disk.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_symlink_logical</b>(), +<b>archive_read_disk_set_symlink_physical</b>(), +<b>archive_read_disk_set_symlink_hybrid</b>()</p> + +<p style="margin-left:20%;">This sets the mode used for +handling symbolic links. The +‘‘logical’’ mode follows all +symbolic links. The ‘‘physical’’ +mode does not follow any symbolic links. The +‘‘hybrid’’ mode currently behaves +identically to the ‘‘logical’’ +mode.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_read_disk_gname</b>(), +<b>archive_read_disk_uname</b>()</p> + +<p style="margin-left:20%;">Returns a user or group name +given a gid or uid value. By default, these always return a +NULL string.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_gname_lookup</b>(), +<b>archive_read_disk_set_uname_lookup</b>()</p> + +<p style="margin-left:20%;">These allow you to override the +functions used for user and group name lookups. You may also +provide a void * pointer to a private data structure and a +cleanup function for that data. The cleanup function will be +invoked when the struct archive object is destroyed or when +new lookup functions are registered.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_read_disk_set_standard_lookup</b>()</p> + +<p style="margin-left:20%;">This convenience function +installs a standard set of user and group name lookup +functions. These functions use getpwid(3) and getgrid(3) to +convert ids to names, defaulting to NULL if the names cannot +be looked up. These functions also implement a simple memory +cache to reduce the number of calls to getpwid(3) and +getgrid(3).</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_read_disk_entry_from_file</b>()</p> + +<p style="margin-left:20%;">Populates a struct +archive_entry object with information about a particular +file. The archive_entry object must have already been +created with archive_entry_new(3) and at least one of the +source path or path fields must already be set. (If both are +set, the source path will be used.)</p> + +<p style="margin-left:20%; margin-top: 1em">Information is +read from disk using the path name from the struct +archive_entry object. If a file descriptor is provided, some +information will be obtained using that file descriptor, on +platforms that support the appropriate system calls.</p> + +<p style="margin-left:20%; margin-top: 1em">If a pointer to +a struct stat is provided, information from that structure +will be used instead of reading from the disk where +appropriate. This can provide performance benefits in +scenarios where struct stat information has already been +read from the disk as a side effect of some other operation. +(For example, directory traversal libraries often provide +this information.)</p> + +<p style="margin-left:20%; margin-top: 1em">Where +necessary, user and group ids are converted to user and +group names using the currently registered lookup functions +above. This affects the file ownership fields and ACL values +in the struct archive_entry object.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_read_close</b>()</p> + +<p style="margin-left:20%;">This currently does +nothing.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p> + +<p style="margin-left:20%;">Invokes +<b>archive_write_close</b>() if it was not invoked manually, +then releases all resources.</p> + +<p style="margin-left:8%;">More information about the +<i>struct archive</i> object and the overall design of the +library can be found in the libarchive(3) overview.</p> + +<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p> + +<p style="margin-left:8%;">The following illustrates basic +usage of the library by showing how to use it to copy an +item on disk into an archive.</p> + +<p style="margin-left:17%; margin-top: 1em">void <br> +file_to_archive(struct archive *a, const char *name) <br> +{ <br> +char buff[8192]; <br> +size_t bytes_read; <br> +struct archive *ard; <br> +struct archive_entry *entry; <br> +int fd;</p> + +<p style="margin-left:17%; margin-top: 1em">ard = +archive_read_disk_new(); <br> +archive_read_disk_set_standard_lookup(ard); <br> +entry = archive_entry_new(); <br> +fd = open(name, O_RDONLY); <br> +if (fd < 0) <br> +return; <br> +archive_entry_copy_sourcepath(entry, name); <br> +archive_read_disk_entry_from_file(ard, entry, fd, NULL); +<br> +archive_write_header(a, entry); <br> +while ((bytes_read = read(fd, buff, sizeof(buff))) > 0) +<br> +archive_write_data(a, buff, bytes_read); <br> +archive_write_finish_entry(a); <br> +archive_read_finish(ard); <br> +archive_entry_free(entry); <br> +}</p> + +<p style="margin-top: 1em" valign="top"><b>RETURN +VALUES</b></p> + +<p style="margin-left:8%;">Most functions return +<b>ARCHIVE_OK</b> (zero) on success, or one of several +negative error codes for errors. Specific error codes +include: <b>ARCHIVE_RETRY</b> for operations that might +succeed if retried, <b>ARCHIVE_WARN</b> for unusual +conditions that do not prevent further operations, and +<b>ARCHIVE_FATAL</b> for serious errors that make remaining +operations impossible. The archive_errno(3) and +archive_error_string(3) functions can be used to retrieve an +appropriate error code and a textual error message. (See +archive_util(3) for details.)</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_new</b>() +returns a pointer to a newly-allocated struct archive object +or NULL if the allocation failed for any reason.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_read_disk_gname</b>() +and <b>archive_read_disk_uname</b>() return const char * +pointers to the textual name or NULL if the lookup failed +for any reason. The returned pointer points to internal +storage that may be reused on the next call to either of +these functions; callers should copy the string if they need +to continue accessing it.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">archive_read(3), +archive_write(3), archive_write_disk(3), tar(1), +libarchive(3)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3. The +<b>archive_read_disk</b> interface was added to +<b>libarchive 2.6</b> and first appeared in +FreeBSD 8.0.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@freebsd.org⟩.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">The +‘‘standard’’ user name and group +name lookup functions are not the defaults because +getgrid(3) and getpwid(3) are sometimes too large for +particular applications. The current design allows the +application author to use a more compact implementation when +appropriate.</p> + +<p style="margin-left:8%; margin-top: 1em">The full list of +metadata read from disk by +<b>archive_read_disk_entry_from_file</b>() is necessarily +system-dependent.</p> + +<p style="margin-left:8%; margin-top: 1em">The +<b>archive_read_disk_entry_from_file</b>() function reads as +much information as it can from disk. Some method should be +provided to limit this so that clients who do not need ACLs, +for instance, can avoid the extra work needed to look up +such information.</p> + +<p style="margin-left:8%; margin-top: 1em">This API should +provide a set of methods for walking a directory tree. That +would make it a direct parallel of the archive_read(3) API. +When such methods are implemented, the +‘‘hybrid’’ symbolic link mode will +make sense.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +March 10, 2009 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/archive_util.3.html b/archivers/libarchive/files/doc/html/archive_util.3.html index f544ca25ab8..e7c2f1f917e 100644 --- a/archivers/libarchive/files/doc/html/archive_util.3.html +++ b/archivers/libarchive/files/doc/html/archive_util.3.html @@ -1,495 +1,210 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:16 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 27 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(January 8, 2005 archi)74.5 48 Q -.15(ve)-.25 G(_util 3).15 E(</title>) -36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_clear_error</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_compression</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_compression_name</b>,).15 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_cop).15 E -(y_error</b>,)-.1 E(<b>archi)0 24 Q -.15(ve)-.25 G(_errno</b>,).15 E -(<b>archi)0 36 Q -.15(ve)-.25 G(_error_string</b>,).15 E(<b>archi)0 48 Q --.15(ve)-.25 G(_\214le_count</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_format</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G(_format_name</b>,).15 -E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_set_error</b>) -.15 E 2.5(-l)0 24 S(ibarchi)-2.5 E .3 -.15(ve u)-.25 H(tility functions) -.15 E(<h3 id="SYNOPSIS">)36 36 Q(SYNOPSIS)36 48 Q(</h3>)36 60 Q -(<br><br><code></code><code>v)0 72 Q(oid</code>)-.2 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_clear_error</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 24 Q -(<b>archi)0 36 Q -.15(ve)-.25 G -(_compression</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>const</code><code> ch\ -ar</code><code> *</code>)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_compression_name</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>v)0 72 Q -(oid</code>)-.2 E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_cop).15 E -(y_error</b>\(<code></code><code>struct archi)-.1 E .3 -.15(ve *)-.25 H -(</code><code>, struct archi).15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_errno</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>const</code><code> ch\ -ar</code><code> *</code>)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_error_string</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 72 Q 0 Cg -EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_\214le_count</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 24 Q -(<b>archi)0 36 Q -.15(ve)-.25 G -(_format</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *)-.25 H -(</code>\)).15 E(<br><br><code></code><code>const</code><code> char</co\ -de><code> *</code>)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_format_name</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>v)0 72 Q(oid</code>) --.2 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_set_error</b>\(<code></code>).15 E(<code></code><code>struct archi)0 -24 Q .3 -.15(ve *)-.25 H(</code>).15 E -(<code></code><code>int error_code</code>)0 36 Q -(<code></code><code>const char *fmt</code>)0 48 Q -(<code></code><code>...</code>)0 60 Q(\))0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="DESCRIPTION">)36 12 Q(DESCRIPTION)36 24 -Q(</h3>)36 36 Q(These functions pro)0 48 Q(vide access to v)-.15 E -(arious information about the)-.25 E(<font size="-1"></font><font size=\ -"-1">struct</font><font size="-1"> archi)0 60 Q -.15(ve)-.25 G(</font>) -.15 E(object used in the)0 72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/libarchi)0 12 Q -.15(ve)-.25 G -(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>).15 E(library)0 24 Q(.) --.65 E(<dl compact>)0 36 Q(<dt><b>archi)0 48 Q -.15(ve)-.25 G -(_clear_error</b>\(<code></code>\)<dd>).15 E(Clears an)0 60 Q 2.5(ye) --.15 G(rror information left o)-2.5 E -.15(ve)-.15 G 2.5(rf).15 G -(rom a pre)-2.5 E(vious call.)-.25 E(Not generally used in client code.) -0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G -(_compression</b>\(<code></code>\)<dd>).15 E -(Returns a numeric code indicating the current compression.)0 24 Q -(This v)0 36 Q(alue is set by)-.25 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_read_open</b>\(<code></code>\).).15 E(<dt><b>archi)0 60 Q -.15(ve)-.25 -G(_compression_name</b>\(<code></code>\)<dd>).15 E(Returns a te)0 72 Q -(xt description of the current compression suitable for display)-.15 E -(.)-.65 E 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G(_cop).15 E -(y_error</b>\(<code></code>\)<dd>)-.1 E -(Copies error information from one archi)0 24 Q .3 -.15(ve t)-.25 H 2.5 -(oa).15 G(nother)-2.5 E(.)-.55 E(<dt><b>archi)0 36 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)<dd>).15 E -(Returns a numeric error code \(see)0 48 Q -(<a href="../html2/errno.html">errno\(2\)</a>\))0 60 Q -(indicating the reason for the most recent error return.)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>archi)0 12 Q -.15(ve)-.25 G -(_error_string</b>\(<code></code>\)<dd>).15 E(Returns a te)0 24 Q -(xtual error message suitable for display)-.15 E(.)-.65 E -(The error message here is usually more speci\214c than that)0 36 Q -(obtained from passing the result of)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 -G(_errno</b>\(<code></code>\)).15 E(to)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/strerror)0 12 Q -(.html">strerror\(3\)</a>.)-.55 E(<dt><b>archi)0 24 Q -.15(ve)-.25 G -(_\214le_count</b>\(<code></code>\)<dd>).15 E -(Returns a count of the number of \214les processed by this archi)0 36 Q -.3 -.15(ve o)-.25 H(bject.).15 E(The count is incremented by calls to)0 -48 Q(<code>archi)0 60 Q -.15(ve)-.25 G(_write_header</code>).15 E(or)0 -72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code>archi)0 12 Q -.15(ve)-.25 G(_read_ne).15 E -(xt_header</code>)-.15 E(<dt><b>archi)0 24 Q -.15(ve)-.25 G -(_format</b>\(<code></code>\)<dd>).15 E -(Returns a numeric code indicating the format of the current)0 36 Q -(archi)0 48 Q .3 -.15(ve e)-.25 H(ntry).15 E(.)-.65 E(This v)0 60 Q -(alue is set by a successful call to)-.25 E(<b>archi)0 72 Q -.15(ve)-.25 -G(_read_ne).15 E(xt_header</b>\(<code></code>\).)-.15 E 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that it is common for this v)0 12 Q -(alue to change from)-.25 E(entry to entry)0 24 Q(.)-.65 E -.15(Fo)0 36 -S 2.5(re).15 G(xample, a tar archi)-2.65 E .3 -.15(ve m)-.25 H(ight ha) -.15 E .3 -.15(ve s)-.2 H -2.15 -.25(ev e).15 H(ral entries that).25 E -(utilize GNU tar e)0 48 Q(xtensions and se)-.15 E -.15(ve)-.25 G -(ral entries that do not.).15 E(These entries will ha)0 60 Q .3 -.15 -(ve d)-.2 H(if).15 E(ferent format codes.)-.25 E(<dt><b>archi)0 72 Q --.15(ve)-.25 G(_format_name</b>\(<code></code>\)<dd>).15 E 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(At)0 12 S -.15(ex)-2.5 G -(tual description of the format of the current entry).15 E(.)-.65 E -(<dt><b>archi)0 24 Q -.15(ve)-.25 G(_set_error</b>\(<code></code>\)<dd>) -.15 E(Sets the numeric error code and error description that will be re\ -turned)0 36 Q(by)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)).15 E(and)0 72 Q 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_error_string</b>\(<code></code>\).).15 E(This function should be used\ - within I/O callbacks to set system-speci\214c)0 24 Q -(error codes and error descriptions.)0 36 Q -(This function accepts a printf-lik)0 48 Q 2.5(ef)-.1 G -(ormat string and ar)-2.5 E(guments.)-.18 E(Ho)0 60 Q(we)-.25 E -.15(ve) --.25 G .8 -.4(r, y).15 H(ou should be careful to use only the follo).4 E -(wing printf)-.25 E(format speci\214ers:)0 72 Q 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(%c').74 E(',)-.74 E -.74(``)0 24 -S(%d').74 E(',)-.74 E -.74(``)0 36 S(%jd').74 E(',)-.74 E -.74(``)0 48 S -(%jo').74 E(',)-.74 E -.74(``)0 60 S(%ju').74 E(',)-.74 E -.74(``)0 72 S -(%jx').74 E(',)-.74 E 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(%ld').74 E(',)-.74 E -.74(``)0 24 -S(%lo').74 E(',)-.74 E -.74(``)0 36 S(%lu').74 E(',)-.74 E -.74(``)0 48 -S(%lx').74 E(',)-.74 E -.74(``)0 60 S(%o').74 E(',)-.74 E -.74(``)0 72 S -(%u').74 E(',)-.74 E 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(%s').74 E(',)-.74 E -.74(``)0 24 -S(%x').74 E(',)-.74 E -.74(``)0 36 S(%%').74 E('.)-.74 E -(Field-width speci\214ers and other printf features are)0 48 Q -(not uniformly supported and should not be used.)0 60 Q(</dl>)0 72 Q 0 -Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="SEE ALSO">)36 12 Q(SEE ALSO)36 24 Q -(</h3>)36 36 Q(<a href="../html3/archi)0 48 Q -.15(ve)-.25 G -(_read.html">archi).15 E -.15(ve)-.25 G(_read\(3\)</a>,).15 E -(<a href="../html3/archi)0 60 Q -.15(ve)-.25 G(_write.html">archi).15 E --.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html3/libarchi)0 72 Q --.15(ve)-.25 G(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>,).15 E 0 -Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/printf.html">printf\(3\)</a>)0 -12 Q(<h3 id="HIST)36 24 Q(OR)-.18 E(Y">)-.65 E(HIST)36 36 Q(OR)-.18 E(Y) --.65 E(</h3>)36 48 Q(The)0 60 Q(<b>libarchi)0 72 Q -.15(ve)-.25 G(</b>) -.15 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(library \214rst appeared in)0 12 Q(FreeBSD5.3.)0 -24 Q(<h3 id="A)36 36 Q(UTHORS">)-.55 E -.55(AU)36 48 S(THORS).55 E -(</h3>)36 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>libarchi)0 24 Q -.15(ve)-.25 G -(</b>).15 E(library w)0 36 Q(as written by)-.1 E -.35(Ti)0 48 S 2.5(mK) -.35 G(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E(</body>)0 60 Q -(</html>)0 72 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:20 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">archive_util(3) FreeBSD Library Functions +Manual archive_util(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>archive_clear_error</b>, +<b>archive_compression</b>, <b>archive_compression_name</b>, +<b>archive_copy_error</b>, <b>archive_errno</b>, +<b>archive_error_string</b>, <b>archive_file_count</b>, +<b>archive_format</b>, <b>archive_format_name</b>, +<b>archive_set_error</b> — libarchive utility +functions</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:8%;"><b>#include +<archive.h></b></p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_clear_error</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_compression</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_compression_name</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p style="margin-left:14%;"><b>archive_copy_error</b>(<i>struct archive *</i>, +<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_errno</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_error_string</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_file_count</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_format</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>const char +*</i></p> + + +<p style="margin-left:14%;"><b>archive_format_name</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>void</i></p> + + +<p valign="top"><b>archive_set_error</b>(<i>struct archive *</i>, +<i>int error_code</i>, +<i>const char *fmt</i>, <i>...</i>);</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">These functions provide access +to various information about the struct archive object used +in the libarchive(3) library.</p> + +<p valign="top"><b>archive_clear_error</b>()</p> + +<p style="margin-left:20%;">Clears any error information +left over from a previous call. Not generally used in client +code.</p> + +<p valign="top"><b>archive_compression</b>()</p> + +<p style="margin-left:20%;">Returns a numeric code +indicating the current compression. This value is set by +<b>archive_read_open</b>().</p> + +<p valign="top"><b>archive_compression_name</b>()</p> + +<p style="margin-left:20%;">Returns a text description of +the current compression suitable for display.</p> + +<p valign="top"><b>archive_copy_error</b>()</p> + +<p style="margin-left:20%;">Copies error information from +one archive to another.</p> + +<p valign="top"><b>archive_errno</b>()</p> + +<p style="margin-left:20%;">Returns a numeric error code +(see errno(2)) indicating the reason for the most recent +error return.</p> + +<p valign="top"><b>archive_error_string</b>()</p> + +<p style="margin-left:20%;">Returns a textual error message +suitable for display. The error message here is usually more +specific than that obtained from passing the result of +<b>archive_errno</b>() to strerror(3).</p> + +<p valign="top"><b>archive_file_count</b>()</p> + +<p style="margin-left:20%;">Returns a count of the number +of files processed by this archive object. The count is +incremented by calls to archive_write_header or +archive_read_next_header.</p> + +<p valign="top"><b>archive_format</b>()</p> + +<p style="margin-left:20%;">Returns a numeric code +indicating the format of the current archive entry. This +value is set by a successful call to +<b>archive_read_next_header</b>(). Note that it is common +for this value to change from entry to entry. For example, a +tar archive might have several entries that utilize GNU tar +extensions and several entries that do not. These entries +will have different format codes.</p> + +<p valign="top"><b>archive_format_name</b>()</p> + +<p style="margin-left:20%;">A textual description of the +format of the current entry.</p> + +<p valign="top"><b>archive_set_error</b>()</p> + +<p style="margin-left:20%;">Sets the numeric error code and +error description that will be returned by +<b>archive_errno</b>() and <b>archive_error_string</b>(). +This function should be used within I/O callbacks to set +system-specific error codes and error descriptions. This +function accepts a printf-like format string and arguments. +However, you should be careful to use only the following +printf format specifiers: ‘‘%c’’, +‘‘%d’’, +‘‘%jd’’, +‘‘%jo’’, +‘‘%ju’’, +‘‘%jx’’, +‘‘%ld’’, +‘‘%lo’’, +‘‘%lu’’, +‘‘%lx’’, +‘‘%o’’, +‘‘%u’’, +‘‘%s’’, +‘‘%x’’, +‘‘%%’’. Field-width specifiers and +other printf features are not uniformly supported and should +not be used.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">archive_read(3), +archive_write(3), libarchive(3), printf(3)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@acm.org⟩.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +January 8, 2005 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/archive_write.3.html b/archivers/libarchive/files/doc/html/archive_write.3.html index b0c9e218067..7c07568618f 100644 --- a/archivers/libarchive/files/doc/html/archive_write.3.html +++ b/archivers/libarchive/files/doc/html/archive_write.3.html @@ -1,1348 +1,845 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:16 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 107 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(May 11, 2008 archi)74.5 48 Q -.15(ve)-.25 G(_write 3).15 E(</title>)36 -72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_ne).15 E -(w</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_set_format_cpio</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_set_format_pax</b>,).15 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_format_pax_restricted</b>,).15 E(<b>archi)0 24 Q -.15(ve) --.25 G(_write_set_format_shar</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_format_shar_binary</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_set_format_ustar</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_get_bytes_per_block</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_set_bytes_per_block</b>,).15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_bytes_in_last_block</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 -G(_write_set_compression_bzip2</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_compression_compress</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 -G(_write_set_compression_gzip</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_set_compression_none</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_set_compression_program</b>,).15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_compressor_options</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_set_format_options</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_options</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_open</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_open_fd</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_open_FILE</b>,).15 E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_open_\214lename</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_open_memory</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_header</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_data</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_\214nish_entry</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_close</b>,).15 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_\214nish</b>).15 E 2.5(-f)0 24 S(unctions for creating archi) --2.5 E -.15(ve)-.25 G(s).15 E(<h3 id="SYNOPSIS">)36 36 Q(SYNOPSIS)36 48 -Q(</h3>)36 60 Q(<br><br><code></code><code>struct</code><code> archi)0 -72 Q -.15(ve)-.25 G(</code><code> *</code>).15 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_write_ne).15 E -(w</b>\(<code></code><code>v)-.25 E(oid</code>\))-.2 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_write_get_bytes_per_block</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_write_set_bytes_per_block</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code><code>, int bytes_per_block</code>\)) -.15 E(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_bytes_in_last_block</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code><code>, int</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G -(_write_set_compression_bzip2</b>\(<code></code><code>struct archi).15 E -.3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G -(_write_set_compression_compress</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_compression_gzip</b>\(<code></code><code>struct archi).15 E -.3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_write_set_compression_none</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G -(_write_set_compression_program</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code><code>, const char * cmd</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_format_cpio</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_format_pax</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_set_format_pax_restricted</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_format_shar</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_format_shar_binary</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_write_set_format_ustar</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_format_options</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G -(_write_set_compressor_options</b>\(<code></code><code>struct archi).15 -E .3 -.15(ve *)-.25 H(</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_write_set_options</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, const char *</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_open</b>\(<code></code>).15 E(<code></code><code>struct archi)0 -24 Q .3 -.15(ve *)-.25 H(</code>).15 E(<code></code><code>v)0 36 Q -(oid *client_data</code>)-.2 E(<code></code><code>archi)0 48 Q -.15(ve) --.25 G(_open_callback *</code>).15 E(<code></code><code>archi)0 60 Q --.15(ve)-.25 G(_write_callback *</code>).15 E(<code></code><code>archi)0 -72 Q -.15(ve)-.25 G(_close_callback *</code>).15 E 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\))0 12 Q(<br><br><code></code><code>int</code>) -0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_open_fd</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code><code>, int fd</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_write_open_FILE</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, FILE *\214le</code>\)).15 E -(<br><br><code></code><code>int</code>)0 72 Q 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_open_\214lename</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code><code>, const char *\214lename</code>\)).15 E -(<br><br><code></code><code>int</code>)0 24 Q(<b>archi)0 36 Q -.15(ve) --.25 G(_write_open_memory</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 48 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>v)0 60 Q(oid *b)-.2 E(uf)-.2 E(fer</code>)-.25 E -(<code></code><code>size_t b)0 72 Q(uf)-.2 E(ferSize</code>)-.25 E 0 Cg -EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>size_t *outUsed</code>)0 12 Q -(\))0 24 Q(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q --.15(ve)-.25 G(_write_header</b>\(<code></code><code>struct archi).15 E -.3 -.15(ve *)-.25 H(</code><code>, struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E(<br><br><code></code><code>ssize_t</code>)0 60 -Q(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_data</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code><code>, const v).15 E(oid *</code><code>, size_t</code>\)) --.2 E 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>int</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_\214nish_entry</b>\(<code></code><code>struct archi).15 E .3 --.15(ve *)-.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 -36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code>\)).15 E(<br><br><code></code><code>int</code>)0 60 Q -(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_\214nish</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code>\)).15 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="DESCRIPTION">)36 12 Q(DESCRIPTION)36 24 -Q(</h3>)36 36 Q(These functions pro)0 48 Q -(vide a complete API for creating streaming)-.15 E(archi)0 60 Q .3 -.15 -(ve \214)-.25 H(les.).15 E(The general process is to \214rst create the) -0 72 Q 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(</font>).15 E -(object, set an)0 24 Q 2.5(yd)-.15 G -(esired options, initialize the archi)-2.5 E -.15(ve)-.25 G 2.5(,a).15 G -(ppend entries, then)-2.5 E(close the archi)0 36 Q .3 -.15(ve a)-.25 H -(nd release all resources.).15 E(The follo)0 48 Q -(wing summary describes the functions in approximately)-.25 E -(the order the)0 60 Q 2.5(ya)-.15 G(re ordinarily used:)-2.5 E -(<dl compact>)0 72 Q 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G(_write_ne) -.15 E(w</b>\(<code></code>\)<dd>)-.25 E(Allocates and initializes a)0 24 -Q(<font size="-1"></font><font size="-1">struct</font><font size="-1"> \ -archi)0 36 Q -.15(ve)-.25 G(</font>).15 E -(object suitable for writing a tar archi)0 48 Q -.15(ve)-.25 G(.).15 E -(<p><dt><b>archi)0 60 Q -.15(ve)-.25 G -(_write_set_bytes_per_block</b>\(<code></code>\)<dd>).15 E -(Sets the block size used for writing the archi)0 72 Q .3 -.15(ve d)-.25 -H(ata.).15 E 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Ev)0 12 Q -(ery call to the write callback function, e)-.15 E -(xcept possibly the last one, will)-.15 E(use this v)0 24 Q -(alue for the length.)-.25 E(The third parameter is a boolean that spec\ -i\214es whether or not the \214nal block)0 36 Q -(written will be padded to the full block size.)0 48 Q -(If it is zero, the last block will not be padded.)0 60 Q(If it is non-\ -zero, padding will be added both before and after compression.)0 72 Q 0 -Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The def)0 12 Q -(ault is to use a block size of 10240 bytes and to pad the last block.) --.1 E(Note that a block size of zero will suppress internal blocking)0 -24 Q(and cause writes to be sent directly to the write callback as the)0 -36 Q 2.5(yo)-.15 G(ccur)-2.5 E(.)-.55 E(<p><dt><b>archi)0 48 Q -.15(ve) --.25 G(_write_get_bytes_per_block</b>\(<code></code>\)<dd>).15 E(Retrie) -0 60 Q .3 -.15(ve t)-.25 H(he block size to be used for writing.).15 E -2.5(Av)0 72 S(alue of -1 here indicates that the library should use def) --2.75 E(ault v)-.1 E(alues.)-.25 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(Av)0 12 S -(alue of zero indicates that internal blocking is suppressed.)-2.75 E -(<p><dt><b>archi)0 24 Q -.15(ve)-.25 G -(_write_set_bytes_in_last_block</b>\(<code></code>\)<dd>).15 E -(Sets the block size used for writing the last block.)0 36 Q(If this v)0 -48 Q(alue is zero, the last block will be padded to the same size)-.25 E -(as the other blocks.)0 60 Q(Otherwise, the \214nal block will be padde\ -d to a multiple of this size.)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,s)-.4 G -(etting it to 1 will cause the \214nal block to not be padded.)-2.5 E --.15(Fo)0 24 S 2.5(rc).15 G(ompressed output, an)-2.5 E 2.5(yp)-.15 G -(adding generated by this option)-2.5 E -(is applied only after the compression.)0 36 Q -(The uncompressed data is al)0 48 Q -.1(wa)-.1 G(ys unpadded.).1 E -(The def)0 60 Q -(ault is to pad the last block to the full block size \(note that)-.1 E -(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_open_\214lename</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(will set this based on the \214le type\).)0 12 Q -(Unlik)0 24 Q 2.5(et)-.1 G(he other)-2.5 E -.74(``)0 36 S(set').74 E(') --.74 E(functions, this function can be called after the archi)0 48 Q .3 --.15(ve i)-.25 H 2.5(so).15 G(pened.)-2.5 E(<p><dt><b>archi)0 60 Q -.15 -(ve)-.25 G(_write_get_bytes_in_last_block</b>\(<code></code>\)<dd>).15 E -(Retrie)0 72 Q .3 -.15(ve t)-.25 H(he currently-set v).15 E -(alue for last block size.)-.25 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(Av)0 12 S -(alue of -1 here indicates that the library should use def)-2.75 E -(ault v)-.1 E(alues.)-.25 E(<p><dt>Xo<dd>)0 24 Q(<b>archi)0 36 Q -.15 -(ve)-.25 G(_write_set_format_cpio</b>\(<code></code>\),).15 E(<b>archi)0 -48 Q -.15(ve)-.25 G(_write_set_format_pax</b>\(<code></code>\),).15 E -(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_set_format_pax_restricted</b>\(<code></code>\),).15 E(<b>archi)0 -72 Q -.15(ve)-.25 G(_write_set_format_shar</b>\(<code></code>\),).15 E 0 -Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_format_shar_binary</b>\(<code></code>\),).15 E(<b>archi)0 24 -Q -.15(ve)-.25 G(_write_set_format_ustar</b>\(<code></code>\)).15 E -(Sets the format that will be used for the archi)0 36 Q -.15(ve)-.25 G -(.).15 E(The library can write)0 48 Q -(POSIX octet-oriented cpio format archi)0 60 Q -.15(ve)-.25 G(s,).15 E -(POSIX-standard)0 72 Q 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(pax interchange').74 E(')-.74 E -(format archi)0 24 Q -.15(ve)-.25 G(s,).15 E(traditional)0 36 Q -.74(``) -0 48 S(shar').74 E(')-.74 E(archi)0 60 Q -.15(ve)-.25 G(s,).15 E -(enhanced)0 72 Q 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(binary').74 E(')-.74 E -(shar archi)0 24 Q -.15(ve)-.25 G 2.5(st).15 G(hat store a v)-2.5 E -(ariety of \214le attrib)-.25 E(utes and handle binary \214les,)-.2 E -(and)0 36 Q(POSIX-standard)0 48 Q -.74(``)0 60 S(ustar').74 E(')-.74 E -(archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The pax interchange format is a backw)0 12 Q -(ards-compatible tar format that)-.1 E(adds k)0 24 Q -.15(ey)-.1 G(/v) -.15 E(alue attrib)-.25 E(utes to each entry and supports arbitrary)-.2 E -(\214lenames, linknames, uids, sizes, etc.)0 36 Q -.74(``)0 48 S -(Restricted pax interchange format').74 E(')-.74 E(is the library def)0 -60 Q(ault; this is the same as pax format, b)-.1 E(ut suppresses)-.2 E -(the pax e)0 72 Q(xtended header for most normal \214les.)-.15 E 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(In most cases, this will result in ordinary ustar archi)0 12 Q -.15(ve) --.25 G(s.).15 E(<p><dt>Xo<dd>)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_compression_bzip2</b>\(<code></code>\),).15 E(<b>archi)0 48 -Q -.15(ve)-.25 G(_write_set_compression_compress</b>\(<code></code>\),) -.15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_set_compression_gzip</b>\(<code></code>\),).15 E(<b>archi)0 72 Q --.15(ve)-.25 G(_write_set_compression_none</b>\(<code></code>\)).15 E 0 -Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The resulting archi)0 12 Q .3 -.15(ve w)-.25 H -(ill be compressed as speci\214ed.).15 E -(Note that the compressed output is al)0 24 Q -.1(wa)-.1 G -(ys properly block).1 E(ed.)-.1 E(<p><dt><b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_compression_program</b>\(<code></code>\)<dd>).15 E -(The archi)0 48 Q .3 -.15(ve w)-.25 H -(ill be fed into the speci\214ed compression program.).15 E -(The output of that program is block)0 60 Q -(ed and written to the client)-.1 E(write callbacks.)0 72 Q 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt>Xo<dd>)0 12 Q(<b>archi)0 24 Q -.15(ve) --.25 G(_write_set_compressor_options</b>\(<code></code>\),).15 E -(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_set_format_options</b>\(<code></code>\),).15 E(<b>archi)0 48 Q --.15(ve)-.25 G(_write_set_options</b>\(<code></code>\)).15 E -(Speci\214es options that will be passed to the currently-enabled)0 60 Q -(compressor and/or format writer)0 72 Q(.)-.55 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The ar)0 12 Q -(gument is a comma-separated list of indi)-.18 E(vidual options.)-.25 E -(Indi)0 24 Q(vidual options ha)-.25 E .3 -.15(ve o)-.2 H -(ne of the follo).15 E(wing forms:)-.25 E(<dl compact>)0 36 Q -(<dt><i></i><i>option=v)0 48 Q(alue</i><dd>)-.25 E(The option/v)0 60 Q -(alue pair will be pro)-.25 E(vided to e)-.15 E -.15(ve)-.25 G -(ry module.).15 E -(Modules that do not accept an option with this name will ignore it.)0 -72 Q 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><i></i><i>option</i><dd>)0 12 Q -(The option will be pro)0 24 Q(vided to e)-.15 E -.15(ve)-.25 G -(ry module with a v).15 E(alue of)-.25 E -.74(``)0 36 S(1').74 E('.)-.74 -E(<dt><i></i><i>!option</i><dd>)0 48 Q(The option will be pro)0 60 Q -(vided to e)-.15 E -.15(ve)-.25 G(ry module with a NULL v).15 E(alue.) --.25 E(<dt><i></i><i>module:option=v)0 72 Q(alue</i><i></i>,<i> module:\ -option</i><i></i>,<i> module:!option</i><dd>)-.25 E 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(As abo)0 12 Q -.15(ve)-.15 G 2.5(,b).15 G -(ut the corresponding option and v)-2.7 E(alue will be pro)-.25 E(vided) --.15 E(only to modules whose name matches)0 24 Q(<i></i><i>module</i>.)0 -36 Q(</dl>)0 48 Q(The return v)0 60 Q(alue will be)-.25 E -(<b></b><b>ARCHIVE_OK</b>)0 72 Q 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(if an)0 12 Q 2.5(ym)-.15 G -(odule accepts the option, or)-2.5 E(<b></b><b>ARCHIVE_W)0 24 Q(ARN</b>) --1.2 E(if no module accepted the option, or)0 36 Q(<b></b><b>ARCHIVE_F)0 -48 Q -1.21 -1.11(AT A)-.74 H(L</b>)1.11 E(if there w)0 60 Q(as a f)-.1 E -(atal error while attempting to process the option.)-.1 E(<p>)36 72 Q 0 -Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The currently supported options are:)0 12 Q -(<dl compact>)0 24 Q(<dt>Compressor gzip<dd>)0 36 Q(<dl compact>)0 48 Q -(<dt><b></b><b>compression-le)0 60 Q -.15(ve)-.25 G(l</b><dd>).15 E -(The v)0 72 Q(alue is interpreted as a decimal inte)-.25 E -(ger specifying the)-.15 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(gzip compression le)0 12 Q -.15(ve)-.25 G(l.).15 -E(</dl>)0 24 Q(<dt>Compressor xz<dd>)0 36 Q(<dl compact>)0 48 Q -(<dt><b></b><b>compression-le)0 60 Q -.15(ve)-.25 G(l</b><dd>).15 E -(The v)0 72 Q(alue is interpreted as a decimal inte)-.25 E -(ger specifying the)-.15 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(compression le)0 12 Q -.15(ve)-.25 G(l.).15 E -(</dl>)0 24 Q(<dt>F)0 36 Q(ormat mtree<dd>)-.15 E(<dl compact>)0 48 Q -(<dt><b></b><b>cksum</b><b></b>,<b> de)0 60 Q(vice</b><b></b>,<b> \215a\ -gs</b><b></b>,<b> gid</b><b></b>,<b> gname</b><b></b>,<b> indent</b><b>\ -</b>,<b> link</b><b></b>,<b> md5</b><b></b>,<b> mode</b><b></b>,<b> nli\ -nk</b><b></b>,<b> rmd160</b><b></b>,<b> sha1</b><b></b>,<b> sha256</b><\ -b></b>,<b> sha384</b>)-.25 E(<b></b>,<b> sha512</b><b></b>,<b> size</b>\ -<b></b>,<b> time</b><b></b>,<b> uid</b><b></b>,<b> uname</b><dd>)A -(Enable a particular k)0 72 Q -.15(ey)-.1 G -.1(wo).15 G -(rd in the mtree output.).1 E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Pre\214x with an e)0 12 Q -(xclamation mark to disable the corresponding k)-.15 E -.15(ey)-.1 G -.1 -(wo).15 G(rd.).1 E(The def)0 24 Q(ault is equi)-.1 E -.25(va)-.25 G -(lent to).25 E -.74(``)0 36 S(de).74 E(vice, \215ags, gid, gname, link,\ - mode, nlink, size, time, type, uid, uname')-.25 E('.)-.74 E -(<dt><b></b><b>all</b><dd>)0 48 Q(Enables all of the abo)0 60 Q .3 -.15 -(ve k)-.15 H -.15(ey).05 G -.1(wo).15 G(rds.).1 E -(<dt><b></b><b>use-set</b><dd>)0 72 Q 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Enables generation of)0 12 Q(<b></b><b>/set</b>) -0 24 Q(lines that specify def)0 36 Q(ault v)-.1 E(alues for the follo) --.25 E(wing \214les and/or directories.)-.25 E -(<dt><b></b><b>indent</b><dd>)0 48 Q(XXX needs e)0 60 Q(xplanation XXX) --.15 E(</dl>)0 72 Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p><dt><b>archi)0 24 Q -.15(ve)-.25 -G(_write_open</b>\(<code></code>\)<dd>).15 E -(Freeze the settings, open the archi)0 36 Q -.15(ve)-.25 G 2.5(,a).15 G -(nd prepare for writing entries.)-2.5 E -(This is the most generic form of this function, which accepts)0 48 Q -(pointers to three callback functions which will be in)0 60 Q -.2(vo)-.4 -G -.1(ke).2 G 2.5(db).1 G(y)-2.5 E -(the compression layer to write the constructed archi)0 72 Q -.15(ve) --.25 G(.).15 E 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_open_fd</b>\(<code></code>\)<dd>).15 E 2.5(Ac)0 24 S(on)-2.5 E --.15(ve)-.4 G(nience form of).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_open</b>\(<code></code>\)).15 E -(that accepts a \214le descriptor)0 48 Q(.)-.55 E(The)0 60 Q(<b>archi)0 -72 Q -.15(ve)-.25 G(_write_open_fd</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(function is safe for use with tape dri)0 12 Q --.15(ve)-.25 G 2.5(so).15 G 2.5(ro)-2.5 G(ther)-2.5 E(block-oriented de) -0 24 Q(vices.)-.25 E(<p><dt><b>archi)0 36 Q -.15(ve)-.25 G -(_write_open_FILE</b>\(<code></code>\)<dd>).15 E 2.5(Ac)0 48 S(on)-2.5 E --.15(ve)-.4 G(nience form of).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_open</b>\(<code></code>\)).15 E(that accepts a)0 72 Q 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>FILE *</code>)0 12 Q -(pointer)0 24 Q(.)-.55 E(Note that)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_open_FILE</b>\(<code></code>\)).15 E -(is not safe for writing to tape dri)0 60 Q -.15(ve)-.25 G 2.5(so).15 G -2.5(ro)-2.5 G(ther de)-2.5 E(vices)-.25 E -(that require correct blocking.)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_open_\214le</b>\(<code></code>\)<dd>).15 E 2.5(Ad)0 24 S -(eprecated synon)-2.5 E(ym for)-.15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_open_\214lename</b>\(<code></code>\).).15 E(<p><dt><b>archi)0 48 -Q -.15(ve)-.25 G(_write_open_\214lename</b>\(<code></code>\)<dd>).15 E -2.5(Ac)0 60 S(on)-2.5 E -.15(ve)-.4 G(nience form of).15 E(<b>archi)0 72 -Q -.15(ve)-.25 G(_write_open</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(that accepts a \214lename.)0 12 Q 2.5(AN)0 24 S -(ULL ar)-2.5 E -(gument indicates that the output should be written to standard output;) --.18 E(an ar)0 36 Q(gument of)-.18 E -.74(``)0 48 S(-').74 E(')-.74 E -(will open a \214le with that name.)0 60 Q(If you ha)0 72 Q .3 -.15 -(ve n)-.2 H(ot in).15 E -.2(vo)-.4 G -.1(ke).2 G(d).1 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_bytes_in_last_block</b>\(<code></code>\),).15 E(then)0 24 Q -(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_open_\214lename</b>\(<code></code>\)).15 E -(will adjust the last-block padding depending on the \214le:)0 48 Q -(it will enable padding when writing to standard output or)0 60 Q -(to a character or block de)0 72 Q -(vice node, it will disable padding otherwise.)-.25 E 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.1(Yo)0 12 S 2.5(uc)1.1 G(an o)-2.5 E -.15(ve) --.15 G(rride this by manually in).15 E -.2(vo)-.4 G(king).2 E(<b>archi)0 -24 Q -.15(ve)-.25 G(_write_set_bytes_in_last_block</b>\(<code></code>\)) -.15 E(before calling)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_open</b>\(<code></code>\).).15 E(The)0 60 Q(<b>archi)0 72 Q -.15 -(ve)-.25 G(_write_open_\214lename</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(function is safe for use with tape dri)0 12 Q --.15(ve)-.25 G 2.5(so).15 G 2.5(ro)-2.5 G(ther)-2.5 E(block-oriented de) -0 24 Q(vices.)-.25 E(<p><dt><b>archi)0 36 Q -.15(ve)-.25 G -(_write_open_memory</b>\(<code></code>\)<dd>).15 E 2.5(Ac)0 48 S(on)-2.5 -E -.15(ve)-.4 G(nience form of).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_open</b>\(<code></code>\)).15 E -(that accepts a pointer to a block of memory that will recei)0 72 Q -.15 -(ve)-.25 G 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(the archi)0 12 Q -.15(ve)-.25 G(.).15 E -(The \214nal)0 24 Q(<br><br><code></code><code>size_t *</code>)0 36 Q -(ar)0 48 Q(gument points to a v)-.18 E(ariable that will be updated)-.25 -E(after each write to re\215ect ho)0 60 Q 2.5(wm)-.25 G(uch of the b) --2.5 E(uf)-.2 E(fer)-.25 E(is currently in use.)0 72 Q 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.1(Yo)0 12 S 2.5(us)1.1 G -(hould be careful to ensure that this v)-2.5 E(ariable)-.25 E -(remains allocated until after the archi)0 24 Q .3 -.15(ve i)-.25 H(s) -.15 E(closed.)0 36 Q(<p><dt><b>archi)0 48 Q -.15(ve)-.25 G -(_write_header</b>\(<code></code>\)<dd>).15 E -(Build and write a header using the data in the pro)0 60 Q(vided)-.15 E -(<font size="-1"></font><font size="-1">struct</font><font size="-1"> a\ -rchi)0 72 Q -.15(ve)-.25 G(_entry</font>).15 E 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(structure.)0 12 Q(See)0 24 Q -(<a href="../html3/archi)0 36 Q -.15(ve)-.25 G(_entry).15 E -(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>).15 E -(for information on creating and populating)0 48 Q(<font size="-1"></fo\ -nt><font size="-1">struct</font><font size="-1"> archi)0 60 Q -.15(ve) --.25 G(_entry</font>).15 E(objects.)0 72 Q 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_data</b>\(<code></code>\)<dd>).15 E -(Write data corresponding to the header just written.)0 24 Q -(Returns number of bytes written or -1 on error)0 36 Q(.)-.55 E -(<p><dt><b>archi)0 48 Q -.15(ve)-.25 G -(_write_\214nish_entry</b>\(<code></code>\)<dd>).15 E -(Close out the entry just written.)0 60 Q(In particular)0 72 Q 2.5(,t) --.4 G(his writes out the \214nal padding required by some formats.)-2.5 -E 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Ordinarily)0 12 Q 2.5(,c)-.65 G(lients ne)-2.5 E --.15(ve)-.25 G 2.5(rn).15 G(eed to call this, as it)-2.5 E -(is called automatically by)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_ne).15 E(xt_header</b>\(<code></code>\))-.15 E(and)0 48 Q -(<b>archi)0 60 Q -.15(ve)-.25 G(_write_close</b>\(<code></code>\)).15 E -(as needed.)0 72 Q 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\)<dd>).15 E(Complete the archi)0 24 Q -.3 -.15(ve a)-.25 H(nd in).15 E -.2(vo)-.4 G .2 -.1(ke t).2 H -(he close callback.).1 E(<p><dt><b>archi)0 36 Q -.15(ve)-.25 G -(_write_\214nish</b>\(<code></code>\)<dd>).15 E(In)0 48 Q -.2(vo)-.4 G --.1(ke).2 G(s).1 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\)).15 E(if it w)0 72 Q(as not in)-.1 E --.2(vo)-.4 G -.1(ke).2 G 2.5(dm).1 G(anually)-2.5 E 2.5(,t)-.65 G -(hen releases all resources.)-2.5 E 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that this function w)0 12 Q -(as declared to return)-.1 E(<br><br><code></code><code>v)0 24 Q -(oid</code>)-.2 E(in libarchi)0 36 Q .3 -.15(ve 1)-.25 H -(.x, which made it impossible to detect errors when).15 E(<b>archi)0 48 -Q -.15(ve)-.25 G(_write_close</b>\(<code></code>\)).15 E -.1(wa)0 60 S -2.5(si).1 G -1.9 -.4(nv o)-2.5 H -.1(ke).4 G 2.5(di).1 G -(mplicitly from this function.)-2.5 E(This is corrected be)0 72 Q -(ginning with libarchi)-.15 E .3 -.15(ve 2)-.25 H(.0.).15 E 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(More information about the)0 24 Q -(<i></i><i>struct</i><i> archi)0 36 Q -.15(ve)-.25 G(</i>).15 E -(object and the o)0 48 Q -.15(ve)-.15 G -(rall design of the library can be found in the).15 E -(<a href="../html3/libarchi)0 60 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E -.15(ove)0 72 S(rvie).15 E -.65(w.)-.25 G -0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="IMPLEMENT)36 12 Q -1.11(AT)-.93 G(ION">) -1.11 E(IMPLEMENT)36 24 Q -1.11(AT)-.93 G(ION)1.11 E(</h3>)36 36 Q -(Compression support is b)0 48 Q(uilt-in to libarchi)-.2 E -.15(ve)-.25 -G 2.5(,w).15 G(hich uses zlib and bzlib)-2.5 E -(to handle gzip and bzip2 compression, respecti)0 60 Q -.15(ve)-.25 G -(ly).15 E(.)-.65 E(<h3 id="CLIENT CALLB)36 72 Q -.4(AC)-.35 G(KS">).4 E -0 Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(CLIENT CALLB)36 12 Q -.4(AC)-.35 G(KS).4 E -(</h3>)36 24 Q 1.6 -.8(To u)0 36 T(se this library).8 E 2.5(,y)-.65 G -(ou will need to de\214ne and re)-2.5 E(gister)-.15 E -(callback functions that will be in)0 48 Q -.2(vo)-.4 G -.1(ke).2 G 2.5 -(dt).1 G 2.5(ow)-2.5 G(rite data to the)-2.5 E(resulting archi)0 60 Q --.15(ve)-.25 G(.).15 E(These functions are re)0 72 Q -(gistered by calling)-.15 E 0 Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_open</b>\(<code></code>\):).15 E(<dl>)0 24 Q(<p><dd>)0 36 Q -(<br><br><code></code><code>typedef</code><code> int</code>)0 48 Q -(<b>archi)0 60 Q -.15(ve)-.25 G -(_open_callback</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code><code>, v).15 E(oid *client_data</code>\))-.2 E(</dl>)0 72 -Q 0 Cg EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The open callback is in)0 24 Q -.2 -(vo)-.4 G -.1(ke).2 G 2.5(db).1 G(y)-2.5 E(<b>archi)0 36 Q -.15(ve)-.25 -G(_write_open</b>\(<code></code>\).).15 E(It should return)0 48 Q -(<b></b><b>ARCHIVE_OK</b>)0 60 Q -(if the underlying \214le or data source is successfully)0 72 Q 0 Cg EP -%%Page: 67 67 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(opened.)0 12 Q(If the open f)0 24 Q -(ails, it should call)-.1 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_set_error</b>\(<code></code>\)).15 E(to re)0 48 Q -(gister an error code and message and return)-.15 E(<b></b><b>ARCHIVE_F) -0 60 Q -1.21 -1.11(AT A)-.74 H(L</b>.)1.11 E(<dl>)0 72 Q 0 Cg EP -%%Page: 68 68 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dd>)0 12 Q -(<br><br><code></code><code>typedef</code><code> ssize_t</code>)0 24 Q -(<b>archi)0 36 Q -.15(ve)-.25 G(_write_callback</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 48 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>v)0 60 Q(oid *client_data</code>)-.2 E -(<code></code><code>const v)0 72 Q(oid *b)-.2 E(uf)-.2 E(fer</code>)-.25 -E 0 Cg EP -%%Page: 69 69 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>size_t length</code>)0 12 Q -(\))0 24 Q(</dl>)0 36 Q(<p>)36 48 Q(The write callback is in)0 60 Q -.2 -(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(hene)-2.5 E -.15(ve)-.25 G 2.5(rt).15 -G(he library)-2.5 E(needs to write ra)0 72 Q 2.5(wb)-.15 G -(ytes to the archi)-2.5 E -.15(ve)-.25 G(.).15 E 0 Cg EP -%%Page: 70 70 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(Fo)0 12 S 2.5(rc).15 G -(orrect blocking, each call to the write callback function)-2.5 E -(should translate into a single)0 24 Q -(<a href="../html2/write.html">write\(2\)</a>)0 36 Q(system call.)0 48 Q -(This is especially critical when writing archi)0 60 Q -.15(ve)-.25 G -2.5(st).15 G 2.5(ot)-2.5 G(ape dri)-2.5 E -.15(ve)-.25 G(s.).15 E -(On success, the write callback should return the)0 72 Q 0 Cg EP -%%Page: 71 71 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(number of bytes actually written.)0 12 Q -(On error)0 24 Q 2.5(,t)-.4 G(he callback should in)-2.5 E -.2(vo)-.4 G --.1(ke).2 G(<b>archi)0 36 Q -.15(ve)-.25 G -(_set_error</b>\(<code></code>\)).15 E(to re)0 48 Q -(gister an error code and message and return -1.)-.15 E(<dl>)0 60 Q -(<p><dd>)0 72 Q 0 Cg EP -%%Page: 72 72 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(<br><br><code></code><code>typedef</code><code> int</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_close_callback</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code><code>, v).15 E(oid *client_data</code>\))-.2 E -(</dl>)0 36 Q(<p>)36 48 Q(The close callback is in)0 60 Q -.2(vo)-.4 G --.1(ke).2 G 2.5(db).1 G 2.5(ya)-2.5 G(rchi)-2.5 E -.15(ve)-.25 G -(_close when).15 E(the archi)0 72 Q .3 -.15(ve p)-.25 H -(rocessing is complete.).15 E 0 Cg EP -%%Page: 73 73 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The callback should return)0 12 Q -(<b></b><b>ARCHIVE_OK</b>)0 24 Q(on success.)0 36 Q(On f)0 48 Q -(ailure, the callback should in)-.1 E -.2(vo)-.4 G -.1(ke).2 G(<b>archi) -0 60 Q -.15(ve)-.25 G(_set_error</b>\(<code></code>\)).15 E(to re)0 72 Q -(gister an error code and message and)-.15 E 0 Cg EP -%%Page: 74 74 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(return)0 12 Q(<b></b><b>ARCHIVE_F)0 24 Q -1.21 --1.11(AT A)-.74 H(L.</b>)1.11 E(<h3 id="EXAMPLE">)36 36 Q(EXAMPLE)36 48 -Q(</h3>)36 60 Q(The follo)0 72 Q(wing sk)-.25 E -(etch illustrates basic usage of the library)-.1 E(.)-.65 E 0 Cg EP -%%Page: 75 75 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In this e)0 12 Q(xample,)-.15 E -(the callback functions are simply wrappers around the standard)0 24 Q -(<a href="../html2/open.html">open\(2\)</a>,)0 36 Q -(<a href="../html2/write.html">write\(2\)</a>,)0 48 Q(and)0 60 Q -(<a href="../html2/close.html">close\(2\)</a>)0 72 Q 0 Cg EP -%%Page: 76 76 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(system calls.)0 12 Q(<dl compact><dt><dd>)0 24 Q -(<code>)0 36 Q(<pre>)0 48 Q(#ifdef __linux__)0 60 Q 4.06 -(#de\214ne _FILE_OFFSET_BITS)0 72 R(64)2.5 E 0 Cg EP -%%Page: 77 77 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(#endif)0 12 Q(#include <sys/stat.h>)0 24 Q -(#include <archi)0 36 Q -.15(ve)-.25 G(.h>).15 E(#include <archi)0 48 Q --.15(ve)-.25 G(_entry).15 E(.h>)-.65 E(#include <fcntl.h>)0 60 Q -(#include <stdlib)0 72 Q(.h>)-.4 E 0 Cg EP -%%Page: 78 78 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(#include <unistd.h>)0 12 Q(<p>)36 24 Q -(struct mydata {)0 36 Q(const char *name;)36 48 Q(int fd;)36 60 Q(};)0 -72 Q 0 Cg EP -%%Page: 79 79 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(int)0 24 Q(myopen\(struct archi)0 36 -Q .3 -.15(ve *)-.25 H(a, v).15 E(oid *client_data\))-.2 E({)0 48 Q -(struct mydata *mydata = client_data;)5 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 80 80 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(mydata->fd = open\(mydata->name, O_WR)5 12 Q -(ONL)-.4 E 2.5(Y|O)-1 G(_CREA)-2.5 E 1.48 -.74(T, 0)-1.11 H(644\);).74 E -(if \(mydata->fd >= 0\))5 24 Q(return \(ARCHIVE_OK\);)10 36 Q(else)5 48 -Q(return \(ARCHIVE_F)10 60 Q -1.21 -1.11(AT A)-.74 H(L\);)1.11 E(})0 72 -Q 0 Cg EP -%%Page: 81 81 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(ssize_t)0 24 Q -(mywrite\(struct archi)0 36 Q .3 -.15(ve *)-.25 H(a, v).15 E -(oid *client_data, const v)-.2 E(oid *b)-.2 E(uf)-.2 E(f, size_t n\)) --.25 E({)0 48 Q(struct mydata *mydata = client_data;)5 60 Q(<p>)36 72 Q -0 Cg EP -%%Page: 82 82 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(return \(write\(mydata->fd, b)5 12 Q(uf)-.2 E -(f, n\)\);)-.25 E(})0 24 Q(<p>)36 36 Q(int)0 48 Q(myclose\(struct archi) -0 60 Q .3 -.15(ve *)-.25 H(a, v).15 E(oid *client_data\))-.2 E({)0 72 Q -0 Cg EP -%%Page: 83 83 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct mydata *mydata = client_data;)5 12 Q(<p>) -36 24 Q(if \(mydata->fd > 0\))5 36 Q(close\(mydata->fd\);)10 48 Q -(return \(0\);)5 60 Q(})0 72 Q 0 Cg EP -%%Page: 84 84 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -.2(vo)0 24 S(id).2 E(write_archi)0 -36 Q -.15(ve)-.25 G(\(const char *outname, const char **\214lename\)).15 -E({)0 48 Q(struct mydata *mydata = malloc\(sizeof\(struct mydata\)\);)5 -60 Q(struct archi)5 72 Q .3 -.15(ve *)-.25 H(a;).15 E 0 Cg EP -%%Page: 85 85 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct archi)5 12 Q -.15(ve)-.25 G -(_entry *entry;).15 E(struct stat st;)5 24 Q(char b)5 36 Q(uf)-.2 E -(f[8192];)-.25 E(int len;)5 48 Q(int fd;)5 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 86 86 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(a=a)5 12 S(rchi)-2.5 E -.15(ve)-.25 G -(_write_ne).15 E(w\(\);)-.25 E(mydata->name = outname;)5 24 Q(archi)5 36 -Q -.15(ve)-.25 G(_write_set_compression_gzip\(a\);).15 E(archi)5 48 Q --.15(ve)-.25 G(_write_set_format_ustar\(a\);).15 E(archi)5 60 Q -.15(ve) --.25 G(_write_open\(a, mydata, myopen, mywrite, myclose\);).15 E -(while \(*\214lename\) {)5 72 Q 0 Cg EP -%%Page: 87 87 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(stat\(*\214lename, &st\);)10 12 Q(entry = archi) -10 24 Q -.15(ve)-.25 G(_entry_ne).15 E(w\(\);)-.25 E(archi)10 36 Q -.15 -(ve)-.25 G(_entry_cop).15 E(y_stat\(entry)-.1 E 2.5(,&)-.65 G(st\);)-2.5 -E(archi)10 48 Q -.15(ve)-.25 G(_entry_set_pathname\(entry).15 E 2.5(,*) --.65 G(\214lename\);)-2.5 E(archi)10 60 Q -.15(ve)-.25 G -(_write_header\(a, entry\);).15 E(fd = open\(*\214lename, O_RDONL)10 72 -Q(Y\);)-1 E 0 Cg EP -%%Page: 88 88 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(len = read\(fd, b)10 12 Q(uf)-.2 E(f, sizeof\(b) --.25 E(uf)-.2 E(f\)\);)-.25 E(while \( len > 0 \) {)10 24 Q(archi)36 36 -Q -.15(ve)-.25 G(_write_data\(a, b).15 E(uf)-.2 E(f, len\);)-.25 E -(len = read\(fd, b)36 48 Q(uf)-.2 E(f, sizeof\(b)-.25 E(uf)-.2 E(f\)\);) --.25 E(})10 60 Q(archi)10 72 Q -.15(ve)-.25 G(_entry_free\(entry\);).15 -E 0 Cg EP -%%Page: 89 89 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214lename++;)10 12 Q(})5 24 Q(archi)5 36 Q -.15 -(ve)-.25 G(_write_\214nish\(a\);).15 E(})0 48 Q(<p>)36 60 Q -(int main\(int ar)0 72 Q(gc, const char **ar)-.18 E(gv\))-.18 E 0 Cg EP -%%Page: 90 90 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF({)0 12 Q(const char *outname;)36 24 Q(ar)36 36 Q -(gv++;)-.18 E(outname = ar)36 48 Q(gv++;)-.18 E(write_archi)36 60 Q -.15 -(ve)-.25 G(\(outname, ar).15 E(gv\);)-.18 E(return 0;)36 72 Q 0 Cg EP -%%Page: 91 91 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(})0 12 Q(</pre>)0 24 Q(</code>)0 36 Q(</dl>)0 48 -Q(<h3 id="RETURN V)36 60 Q(ALUES">)-1.35 E(RETURN V)36 72 Q(ALUES)-1.35 -E 0 Cg EP -%%Page: 92 92 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(Most functions return)0 24 Q -(<b></b><b>ARCHIVE_OK</b>)0 36 Q(\(zero\) on success, or one of se)0 48 -Q -.15(ve)-.25 G(ral non-zero).15 E(error codes for errors.)0 60 Q -(Speci\214c error codes include:)0 72 Q 0 Cg EP -%%Page: 93 93 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>ARCHIVE_RETR)0 12 Q(Y</b>)-.65 E -(for operations that might succeed if retried,)0 24 Q -(<b></b><b>ARCHIVE_W)0 36 Q(ARN</b>)-1.2 E -(for unusual conditions that do not pre)0 48 Q -.15(ve)-.25 G -(nt further operations, and).15 E(<b></b><b>ARCHIVE_F)0 60 Q -1.21 -1.11 -(AT A)-.74 H(L</b>)1.11 E(for serious errors that mak)0 72 Q 2.5(er)-.1 -G(emaining operations impossible.)-2.5 E 0 Cg EP -%%Page: 94 94 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)).15 E(and)0 36 Q(<b>archi)0 48 Q -.15(ve) --.25 G(_error_string</b>\(<code></code>\)).15 E -(functions can be used to retrie)0 60 Q .3 -.15(ve a)-.25 H 2.5(na).15 G -(ppropriate error code and a)-2.5 E(te)0 72 Q(xtual error message.)-.15 -E 0 Cg EP -%%Page: 95 95 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_ne).15 E(w</b>\(<code></code>\))-.25 E -(returns a pointer to a ne)0 36 Q(wly-allocated)-.25 E(<font size="-1">\ -</font><font size="-1">struct</font><font size="-1"> archi)0 48 Q -.15 -(ve)-.25 G(</font>).15 E(object.)0 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 96 96 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_data</b>\(<code></code>\)).15 E -(returns a count of the number of bytes actually written.)0 24 Q -(On error)0 36 Q 2.5(,-)-.4 G 2.5(1i)-2.5 G 2.5(sr)-2.5 G -(eturned and the)-2.5 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)).15 E(and)0 60 Q(<b>archi)0 72 Q -.15(ve) --.25 G(_error_string</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 97 97 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(functions will return appropriate v)0 12 Q -(alues.)-.25 E(Note that if the client-pro)0 24 Q -(vided write callback function)-.15 E(returns a non-zero v)0 36 Q -(alue, that error will be propag)-.25 E(ated back to the caller)-.05 E -(through whate)0 48 Q -.15(ve)-.25 G 2.5(rA).15 G -(PI function resulted in that call, which)-2.5 E(may include)0 60 Q -(<b>archi)0 72 Q -.15(ve)-.25 G(_write_header</b>\(<code></code>\),).15 -E 0 Cg EP -%%Page: 98 98 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_data</b>\(<code></code>\),).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\),).15 E(or)0 36 Q(<b>archi)0 48 Q -.15 -(ve)-.25 G(_write_\214nish</b>\(<code></code>\).).15 E -(The client callback can call)0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G -(_set_error</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 99 99 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(to pro)0 12 Q(vide v)-.15 E -(alues that can then be retrie)-.25 E -.15(ve)-.25 G 2.5(db).15 G(y)-2.5 -E(<b>archi)0 24 Q -.15(ve)-.25 G(_errno</b>\(<code></code>\)).15 E(and)0 -36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_error_string</b>\(<code></code>\).) -.15 E(<h3 id="SEE ALSO">)36 60 Q(SEE ALSO)36 72 Q 0 Cg EP -%%Page: 100 100 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(<a href="../html1/tar)0 24 Q -(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/libarchi)0 36 Q -.15(ve) --.25 G(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>,).15 E -(<a href="../html5/tar)0 48 Q(.html">tar\(5\)</a>)-.55 E(<h3 id="HIST)36 -60 Q(OR)-.18 E(Y">)-.65 E(HIST)36 72 Q(OR)-.18 E(Y)-.65 E 0 Cg EP -%%Page: 101 101 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(The)0 24 Q(<b>libarchi)0 36 Q -.15 -(ve)-.25 G(</b>).15 E(library \214rst appeared in)0 48 Q(FreeBSD5.3.)0 -60 Q(<h3 id="A)36 72 Q(UTHORS">)-.55 E 0 Cg EP -%%Page: 102 102 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.55(AU)36 12 S(THORS).55 E(</h3>)36 24 Q(<p>)36 -36 Q(The)0 48 Q(<b>libarchi)0 60 Q -.15(ve)-.25 G(</b>).15 E(library w)0 -72 Q(as written by)-.1 E 0 Cg EP -%%Page: 103 103 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.35(Ti)0 12 S 2.5(mK).35 G -(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E(<h3 id="B)36 24 Q -(UGS">)-.1 E -.1(BU)36 36 S(GS).1 E(</h3>)36 48 Q(There are man)0 60 Q -2.5(yp)-.15 G(eculiar b)-2.5 E -(ugs in historic tar implementations that may cause)-.2 E -(certain programs to reject archi)0 72 Q -.15(ve)-.25 G 2.5(sw).15 G -(ritten by this library)-2.5 E(.)-.65 E 0 Cg EP -%%Page: 104 104 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(Fo)0 12 S 2.5(re).15 G(xample, se)-2.65 E --.15(ve)-.25 G(ral historic implementations calculated header checksums) -.15 E(incorrectly and will thus reject v)0 24 Q(alid archi)-.25 E -.15 -(ve)-.25 G(s; GNU tar does not fully support).15 E(pax interchange form\ -at; some old tar implementations required speci\214c)0 36 Q -(\214eld terminations.)0 48 Q(<p>)36 60 Q(The def)0 72 Q -(ault pax interchange format eliminates most of the historic)-.1 E 0 Cg -EP -%%Page: 105 105 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(tar limitations and pro)0 12 Q -(vides a generic k)-.15 E -.15(ey)-.1 G(/v).15 E(alue attrib)-.25 E -(ute f)-.2 E(acility)-.1 E(for v)0 24 Q(endor)-.15 E(-de\214ned e)-.2 E -(xtensions.)-.15 E(One o)0 36 Q -.15(ve)-.15 G(rsight in POSIX is the f) -.15 E(ailure to pro)-.1 E(vide a standard attrib)-.15 E(ute)-.2 E -(for lar)0 48 Q(ge de)-.18 E(vice numbers.)-.25 E(This library uses)0 60 -Q -.74(``)0 72 S(SCHIL).74 E -1.29(Y.)-1 G(de)1.29 E(vminor')-.25 E(') --.74 E 0 Cg EP -%%Page: 106 106 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q -.74(``)0 24 S(SCHIL).74 E -1.29(Y.) --1 G(de)1.29 E(vmajor')-.25 E(')-.74 E(for de)0 36 Q -(vice numbers that e)-.25 E(xceed the range supported by the backw)-.15 -E(ards-compatible)-.1 E(ustar header)0 48 Q(.)-.55 E(These k)0 60 Q -.15 -(ey)-.1 G 2.5(sa).15 G(re compatible with Joer)-2.5 E 2.5(gS)-.18 G -(chilling')-2.5 E(s)-.55 E(<b>star</b>)0 72 Q 0 Cg EP -%%Page: 107 107 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G -.55(r.).15 G -(Other implementations may not recognize these k)0 24 Q -.15(ey)-.1 G -2.5(sa).15 G(nd will thus be unable)-2.5 E(to correctly restore de)0 36 -Q(vice nodes with lar)-.25 E(ge de)-.18 E(vice numbers from archi)-.25 E --.15(ve)-.25 G(s).15 E(created by this library)0 48 Q(.)-.65 E(</body>)0 -60 Q(</html>)0 72 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:23 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">archive_write(3) FreeBSD Library Functions +Manual archive_write(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>archive_write_new</b>, +<b>archive_write_set_format_cpio</b>, +<b>archive_write_set_format_pax</b>, +<b>archive_write_set_format_pax_restricted</b>, +<b>archive_write_set_format_shar</b>, +<b>archive_write_set_format_shar_binary</b>, +<b>archive_write_set_format_ustar</b>, +<b>archive_write_get_bytes_per_block</b>, +<b>archive_write_set_bytes_per_block</b>, +<b>archive_write_set_bytes_in_last_block</b>, +<b>archive_write_set_compression_bzip2</b>, +<b>archive_write_set_compression_compress</b>, +<b>archive_write_set_compression_gzip</b>, +<b>archive_write_set_compression_none</b>, +<b>archive_write_set_compression_program</b>, +<b>archive_write_set_compressor_options</b>, +<b>archive_write_set_format_options</b>, +<b>archive_write_set_options</b>, <b>archive_write_open</b>, +<b>archive_write_open_fd</b>, +<b>archive_write_open_FILE</b>, +<b>archive_write_open_filename</b>, +<b>archive_write_open_memory</b>, +<b>archive_write_header</b>, <b>archive_write_data</b>, +<b>archive_write_finish_entry</b>, +<b>archive_write_close</b>, <b>archive_write_finish</b> +— functions for creating archives</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:8%;"><b>#include +<archive.h></b></p> + +<p style="margin-left:8%; margin-top: 1em"><i>struct +archive *</i></p> + + +<p style="margin-left:14%;"><b>archive_write_new</b>(<i>void</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_get_bytes_per_block</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_bytes_per_block</b>(<i>struct archive *</i>, +<i>int bytes_per_block</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_bytes_in_last_block</b>(<i>struct archive *</i>, +<i>int</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_compression_bzip2</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_compression_compress</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_compression_gzip</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_compression_none</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_compression_program</b>(<i>struct archive *</i>, +<i>const char * cmd</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_format_cpio</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_format_pax</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_format_pax_restricted</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_format_shar</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_format_shar_binary</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_format_ustar</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_format_options</b>(<i>struct archive *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_compressor_options</b>(<i>struct archive *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_set_options</b>(<i>struct archive *</i>, +<i>const char *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_write_open</b>(<i>struct archive *</i>, +<i>void *client_data</i>, +<i>archive_open_callback *</i>, +<i>archive_write_callback *</i>, +<i>archive_close_callback *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_open_fd</b>(<i>struct archive *</i>, +<i>int fd</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_open_FILE</b>(<i>struct archive *</i>, +<i>FILE *file</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_open_filename</b>(<i>struct archive *</i>, +<i>const char *filename</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_write_open_memory</b>(<i>struct archive *</i>, +<i>void *buffer</i>, <i>size_t bufferSize</i>, +<i>size_t *outUsed</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_header</b>(<i>struct archive *</i>, +<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>ssize_t</i></p> + + +<p style="margin-left:14%;"><b>archive_write_data</b>(<i>struct archive *</i>, +<i>const void *</i>, <i>size_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_finish_entry</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_close</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_finish</b>(<i>struct archive *</i>);</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">These functions provide a +complete API for creating streaming archive files. The +general process is to first create the struct archive +object, set any desired options, initialize the archive, +append entries, then close the archive and release all +resources. The following summary describes the functions in +approximately the order they are ordinarily used:</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_new</b>()</p> + +<p style="margin-left:20%;">Allocates and initializes a +struct archive object suitable for writing a tar +archive.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_set_bytes_per_block</b>()</p> + +<p style="margin-left:20%;">Sets the block size used for +writing the archive data. Every call to the write callback +function, except possibly the last one, will use this value +for the length. The third parameter is a boolean that +specifies whether or not the final block written will be +padded to the full block size. If it is zero, the last block +will not be padded. If it is non-zero, padding will be added +both before and after compression. The default is to use a +block size of 10240 bytes and to pad the last block. Note +that a block size of zero will suppress internal blocking +and cause writes to be sent directly to the write callback +as they occur.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_get_bytes_per_block</b>()</p> + +<p style="margin-left:20%;">Retrieve the block size to be +used for writing. A value of -1 here indicates that the +library should use default values. A value of zero indicates +that internal blocking is suppressed.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_set_bytes_in_last_block</b>()</p> + +<p style="margin-left:20%;">Sets the block size used for +writing the last block. If this value is zero, the last +block will be padded to the same size as the other blocks. +Otherwise, the final block will be padded to a multiple of +this size. In particular, setting it to 1 will cause the +final block to not be padded. For compressed output, any +padding generated by this option is applied only after the +compression. The uncompressed data is always unpadded. The +default is to pad the last block to the full block size +(note that <b>archive_write_open_filename</b>() will set +this based on the file type). Unlike the other +‘‘set’’ functions, this function can +be called after the archive is opened.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_get_bytes_in_last_block</b>()</p> + +<p style="margin-left:20%;">Retrieve the currently-set +value for last block size. A value of -1 here indicates that +the library should use default values.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_set_format_cpio</b>(), +<b>archive_write_set_format_pax</b>(), +<b>archive_write_set_format_pax_restricted</b>(), +<b>archive_write_set_format_shar</b>(), +<b>archive_write_set_format_shar_binary</b>(), +<b>archive_write_set_format_ustar</b>()</p> + +<p style="margin-left:20%;">Sets the format that will be +used for the archive. The library can write POSIX +octet-oriented cpio format archives, POSIX-standard +‘‘pax interchange’’ format archives, +traditional ‘‘shar’’ archives, +enhanced ‘‘binary’’ shar archives +that store a variety of file attributes and handle binary +files, and POSIX-standard ‘‘ustar’’ +archives. The pax interchange format is a +backwards-compatible tar format that adds key/value +attributes to each entry and supports arbitrary filenames, +linknames, uids, sizes, etc. ‘‘Restricted pax +interchange format’’ is the library default; +this is the same as pax format, but suppresses the pax +extended header for most normal files. In most cases, this +will result in ordinary ustar archives.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_set_compression_bzip2</b>(), +<b>archive_write_set_compression_compress</b>(), +<b>archive_write_set_compression_gzip</b>(), +<b>archive_write_set_compression_none</b>()</p> + +<p style="margin-left:20%;">The resulting archive will be +compressed as specified. Note that the compressed output is +always properly blocked.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_set_compression_program</b>()</p> + +<p style="margin-left:20%;">The archive will be fed into +the specified compression program. The output of that +program is blocked and written to the client write +callbacks.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_set_compressor_options</b>(), +<b>archive_write_set_format_options</b>(), +<b>archive_write_set_options</b>()</p> + +<p style="margin-left:20%;">Specifies options that will be +passed to the currently-enabled compressor and/or format +writer. The argument is a comma-separated list of individual +options. Individual options have one of the following +forms:</p> + +<p valign="top"><i>option=value</i></p> + +<p style="margin-left:32%;">The option/value pair will be +provided to every module. Modules that do not accept an +option with this name will ignore it.</p> + +<p valign="top"><i>option</i></p> + +<p style="margin-left:32%; margin-top: 1em">The option will +be provided to every module with a value of +‘‘1’’.</p> + +<p valign="top"><i>!option</i></p> + +<p style="margin-left:32%;">The option will be provided to +every module with a NULL value.</p> + +<p valign="top"><i>module:option=value</i>, +<i>module:option</i>, <i>module:!option</i></p> + +<p style="margin-left:32%;">As above, but the corresponding +option and value will be provided only to modules whose name +matches <i>module</i>.</p> + +<p style="margin-left:20%;">The return value will be +<b>ARCHIVE_OK</b> if any module accepts the option, or +<b>ARCHIVE_WARN</b> if no module accepted the option, or +<b>ARCHIVE_FATAL</b> if there was a fatal error while +attempting to process the option.</p> + +<p style="margin-left:20%; margin-top: 1em">The currently +supported options are:</p> + +<p valign="top">Compressor gzip <b><br> +compression-level</b></p> + +<p style="margin-left:45%;">The value is interpreted as a +decimal integer specifying the gzip compression level.</p> + +<p valign="top">Compressor xz <b><br> +compression-level</b></p> + +<p style="margin-left:45%;">The value is interpreted as a +decimal integer specifying the compression level.</p> + +<p valign="top">Format mtree <b><br> +cksum</b>, <b>device</b>, <b>flags</b>, <b>gid</b>, +<b>gname</b>, <b>indent</b>, <b>link</b>, <b>md5</b>, +<b>mode</b>, <b>nlink</b>, <b>rmd160</b>, <b>sha1</b>, +<b>sha256</b>, <b>sha384</b>, <b>sha512</b>, <b>size</b>, +<b>time</b>, <b>uid</b>, <b>uname</b></p> + +<p style="margin-left:45%;">Enable a particular keyword in +the mtree output. Prefix with an exclamation mark to disable +the corresponding keyword. The default is equivalent to +‘‘device, flags, gid, gname, link, mode, nlink, +size, time, type, uid, uname’’.</p> + +<p valign="top"><b>all</b></p> + +<p style="margin-left:45%; margin-top: 1em">Enables all of +the above keywords.</p> + +<p valign="top"><b>use-set</b></p> + +<p style="margin-left:45%;">Enables generation of +<b>/set</b> lines that specify default values for the +following files and/or directories.</p> + +<p valign="top"><b>indent</b></p> + +<p style="margin-left:45%; margin-top: 1em">XXX needs +explanation XXX</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_open</b>()</p> + +<p style="margin-left:20%;">Freeze the settings, open the +archive, and prepare for writing entries. This is the most +generic form of this function, which accepts pointers to +three callback functions which will be invoked by the +compression layer to write the constructed archive.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_open_fd</b>()</p> + +<p style="margin-left:20%;">A convenience form of +<b>archive_write_open</b>() that accepts a file descriptor. +The <b>archive_write_open_fd</b>() function is safe for use +with tape drives or other block-oriented devices.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_open_FILE</b>()</p> + +<p style="margin-left:20%;">A convenience form of +<b>archive_write_open</b>() that accepts a <i>FILE *</i> +pointer. Note that <b>archive_write_open_FILE</b>() is not +safe for writing to tape drives or other devices that +require correct blocking.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_open_file</b>()</p> + +<p style="margin-left:20%;">A deprecated synonym for +<b>archive_write_open_filename</b>().</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_open_filename</b>()</p> + +<p style="margin-left:20%;">A convenience form of +<b>archive_write_open</b>() that accepts a filename. A NULL +argument indicates that the output should be written to +standard output; an argument of +‘‘-’’ will open a file with that +name. If you have not invoked +<b>archive_write_set_bytes_in_last_block</b>(), then +<b>archive_write_open_filename</b>() will adjust the +last-block padding depending on the file: it will enable +padding when writing to standard output or to a character or +block device node, it will disable padding otherwise. You +can override this by manually invoking +<b>archive_write_set_bytes_in_last_block</b>() before +calling <b>archive_write_open</b>(). The +<b>archive_write_open_filename</b>() function is safe for +use with tape drives or other block-oriented devices.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_open_memory</b>()</p> + +<p style="margin-left:20%;">A convenience form of +<b>archive_write_open</b>() that accepts a pointer to a +block of memory that will receive the archive. The final +<i>size_t *</i> argument points to a variable that will be +updated after each write to reflect how much of the buffer +is currently in use. You should be careful to ensure that +this variable remains allocated until after the archive is +closed.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_header</b>()</p> + +<p style="margin-left:20%;">Build and write a header using +the data in the provided struct archive_entry structure. See +archive_entry(3) for information on creating and populating +struct archive_entry objects.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_data</b>()</p> + +<p style="margin-left:20%;">Write data corresponding to the +header just written. Returns number of bytes written or -1 +on error.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_finish_entry</b>()</p> + +<p style="margin-left:20%;">Close out the entry just +written. In particular, this writes out the final padding +required by some formats. Ordinarily, clients never need to +call this, as it is called automatically by +<b>archive_write_next_header</b>() and +<b>archive_write_close</b>() as needed.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_close</b>()</p> + +<p style="margin-left:20%;">Complete the archive and invoke +the close callback.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p> + +<p style="margin-left:20%;">Invokes +<b>archive_write_close</b>() if it was not invoked manually, +then releases all resources. Note that this function was +declared to return <i>void</i> in libarchive 1.x, which made +it impossible to detect errors when +<b>archive_write_close</b>() was invoked implicitly from +this function. This is corrected beginning with libarchive +2.0.</p> + +<p style="margin-left:8%;">More information about the +<i>struct archive</i> object and the overall design of the +library can be found in the libarchive(3) overview.</p> + + +<p style="margin-top: 1em" valign="top"><b>IMPLEMENTATION</b></p> + +<p style="margin-left:8%;">Compression support is built-in +to libarchive, which uses zlib and bzlib to handle gzip and +bzip2 compression, respectively.</p> + +<p style="margin-top: 1em" valign="top"><b>CLIENT +CALLBACKS</b></p> + +<p style="margin-left:8%;">To use this library, you will +need to define and register callback functions that will be +invoked to write data to the resulting archive. These +functions are registered by calling +<b>archive_write_open</b>():</p> + +<p style="margin-left:17%; margin-top: 1em"><i>typedef +int</i> <b>archive_open_callback</b>(<i>struct archive +*</i>, <i>void *client_data</i>)</p> + +<p style="margin-left:8%; margin-top: 1em">The open +callback is invoked by <b>archive_write_open</b>(). It +should return <b>ARCHIVE_OK</b> if the underlying file or +data source is successfully opened. If the open fails, it +should call <b>archive_set_error</b>() to register an error +code and message and return <b>ARCHIVE_FATAL</b>.</p> + +<p style="margin-left:17%; margin-top: 1em"><i>typedef +ssize_t</i></p> + + +<p valign="top"><b>archive_write_callback</b>(<i>struct archive *</i>, +<i>void *client_data</i>, +<i>const void *buffer</i>, +<i>size_t length</i>)</p> + +<p style="margin-left:8%; margin-top: 1em">The write +callback is invoked whenever the library needs to write raw +bytes to the archive. For correct blocking, each call to the +write callback function should translate into a single +write(2) system call. This is especially critical when +writing archives to tape drives. On success, the write +callback should return the number of bytes actually written. +On error, the callback should invoke +<b>archive_set_error</b>() to register an error code and +message and return -1.</p> + +<p style="margin-left:17%; margin-top: 1em"><i>typedef +int</i> <b>archive_close_callback</b>(<i>struct archive +*</i>, <i>void *client_data</i>)</p> + +<p style="margin-left:8%; margin-top: 1em">The close +callback is invoked by archive_close when the archive +processing is complete. The callback should return +<b>ARCHIVE_OK</b> on success. On failure, the callback +should invoke <b>archive_set_error</b>() to register an +error code and message and return <b>ARCHIVE_FATAL.</b></p> + +<p style="margin-top: 1em" valign="top"><b>EXAMPLE</b></p> + +<p style="margin-left:8%;">The following sketch illustrates +basic usage of the library. In this example, the callback +functions are simply wrappers around the standard open(2), +write(2), and close(2) system calls.</p> + +<p style="margin-left:17%; margin-top: 1em">#ifdef +__linux__</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="17%"></td> +<td width="12%"> + + +<p valign="top">#define</p></td> +<td width="13%"> + + +<p valign="top">_FILE_OFFSET_BITS 64</p></td> +<td width="58%"> +</td> +</table> + +<p style="margin-left:17%;">#endif <br> +#include <sys/stat.h> <br> +#include <archive.h> <br> +#include <archive_entry.h> <br> +#include <fcntl.h> <br> +#include <stdlib.h> <br> +#include <unistd.h></p> + +<p style="margin-left:17%; margin-top: 1em">struct mydata +{</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">const char *name;</p></td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">int fd;</p></td> +</table> + +<p style="margin-left:17%;">};</p> + +<p style="margin-left:17%; margin-top: 1em">int <br> +myopen(struct archive *a, void *client_data) <br> +{ <br> +struct mydata *mydata = client_data;</p> + +<p style="margin-left:17%; margin-top: 1em">mydata->fd = +open(mydata->name, O_WRONLY | O_CREAT, 0644); <br> +if (mydata->fd >= 0) <br> +return (ARCHIVE_OK); <br> +else <br> +return (ARCHIVE_FATAL); <br> +}</p> + +<p style="margin-left:17%; margin-top: 1em">ssize_t <br> +mywrite(struct archive *a, void *client_data, const void +*buff, size_t n) <br> +{ <br> +struct mydata *mydata = client_data;</p> + +<p style="margin-left:17%; margin-top: 1em">return +(write(mydata->fd, buff, n)); <br> +}</p> + +<p style="margin-left:17%; margin-top: 1em">int <br> +myclose(struct archive *a, void *client_data) <br> +{ <br> +struct mydata *mydata = client_data;</p> + +<p style="margin-left:17%; margin-top: 1em">if +(mydata->fd > 0) <br> +close(mydata->fd); <br> +return (0); <br> +}</p> + +<p style="margin-left:17%; margin-top: 1em">void <br> +write_archive(const char *outname, const char **filename) +<br> +{ <br> +struct mydata *mydata = malloc(sizeof(struct mydata)); <br> +struct archive *a; <br> +struct archive_entry *entry; <br> +struct stat st; <br> +char buff[8192]; <br> +int len; <br> +int fd;</p> + +<p style="margin-left:17%; margin-top: 1em">a = +archive_write_new(); <br> +mydata->name = outname; <br> +archive_write_set_compression_gzip(a); <br> +archive_write_set_format_ustar(a); <br> +archive_write_open(a, mydata, myopen, mywrite, myclose); +<br> +while (*filename) { <br> +stat(*filename, &st); <br> +entry = archive_entry_new(); <br> +archive_entry_copy_stat(entry, &st); <br> +archive_entry_set_pathname(entry, *filename); <br> +archive_write_header(a, entry); <br> +fd = open(*filename, O_RDONLY); <br> +len = read(fd, buff, sizeof(buff)); <br> +while ( len > 0 ) {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">archive_write_data(a, buff, len);</p></td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">len = read(fd, buff, sizeof(buff));</p></td> +</table> + +<p style="margin-left:17%;">} <br> +archive_entry_free(entry); <br> +filename++; <br> +} <br> +archive_write_finish(a); <br> +}</p> + +<p style="margin-left:17%; margin-top: 1em">int main(int +argc, const char **argv) <br> +{</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">const char *outname;</p></td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">argv++;</p></td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">outname = argv++;</p></td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">write_archive(outname, argv);</p></td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">return 0;</p></td> +</table> + +<p style="margin-left:17%;">}</p> + +<p style="margin-top: 1em" valign="top"><b>RETURN +VALUES</b></p> + +<p style="margin-left:8%;">Most functions return +<b>ARCHIVE_OK</b> (zero) on success, or one of several +non-zero error codes for errors. Specific error codes +include: <b>ARCHIVE_RETRY</b> for operations that might +succeed if retried, <b>ARCHIVE_WARN</b> for unusual +conditions that do not prevent further operations, and +<b>ARCHIVE_FATAL</b> for serious errors that make remaining +operations impossible. The <b>archive_errno</b>() and +<b>archive_error_string</b>() functions can be used to +retrieve an appropriate error code and a textual error +message.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_write_new</b>() +returns a pointer to a newly-allocated struct archive +object.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_write_data</b>() +returns a count of the number of bytes actually written. On +error, -1 is returned and the <b>archive_errno</b>() and +<b>archive_error_string</b>() functions will return +appropriate values. Note that if the client-provided write +callback function returns a non-zero value, that error will +be propagated back to the caller through whatever API +function resulted in that call, which may include +<b>archive_write_header</b>(), <b>archive_write_data</b>(), +<b>archive_write_close</b>(), or +<b>archive_write_finish</b>(). The client callback can call +<b>archive_set_error</b>() to provide values that can then +be retrieved by <b>archive_errno</b>() and +<b>archive_error_string</b>().</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">tar(1), libarchive(3), +tar(5)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@acm.org⟩.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">There are many peculiar bugs in +historic tar implementations that may cause certain programs +to reject archives written by this library. For example, +several historic implementations calculated header checksums +incorrectly and will thus reject valid archives; GNU tar +does not fully support pax interchange format; some old tar +implementations required specific field terminations.</p> + +<p style="margin-left:8%; margin-top: 1em">The default pax +interchange format eliminates most of the historic tar +limitations and provides a generic key/value attribute +facility for vendor-defined extensions. One oversight in +POSIX is the failure to provide a standard attribute for +large device numbers. This library uses +‘‘SCHILY.devminor’’ and +‘‘SCHILY.devmajor’’ for device +numbers that exceed the range supported by the +backwards-compatible ustar header. These keys are compatible +with Joerg Schilling’s <b>star</b> archiver. Other +implementations may not recognize these keys and will thus +be unable to correctly restore device nodes with large +device numbers from archives created by this library.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +May 11, 2008 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/archive_write_disk.3.html b/archivers/libarchive/files/doc/html/archive_write_disk.3.html index 38ba5fddcfb..3dc529a62eb 100644 --- a/archivers/libarchive/files/doc/html/archive_write_disk.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_disk.3.html @@ -1,892 +1,421 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:16 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 63 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(August 5, 2008 archi)74.5 48 Q -.15(ve)-.25 G(_write_disk 3).15 E -(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_disk_ne) -.15 E(w</b>,)-.25 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_disk_set_options</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_disk_set_skip_\214le</b>,).15 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_disk_set_group_lookup</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_disk_set_standard_lookup</b>,).15 E(<b>archi)0 36 Q -.15(ve)-.25 -G(_write_disk_set_user_lookup</b>,).15 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_header</b>,).15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_data</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write_\214nish_entry</b>,).15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_close</b>,).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_\214nish</b>).15 E 2.5(-f)0 36 S -(unctions for creating objects on disk)-2.5 E(<h3 id="SYNOPSIS">)36 48 Q -(SYNOPSIS)36 60 Q(</h3>)36 72 Q 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(<br><br><code></code><code>struct</code><code> archi)0 12 Q -.15(ve) --.25 G(</code><code> *</code>).15 E(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_disk_ne).15 E(w</b>\(<code></code><code>v)-.25 E(oid</code>\)) --.2 E(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15 -(ve)-.25 G(_write_disk_set_options</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code><code>, int \215ags</code>\)).15 E -(<br><br><code></code><code>int</code>)0 60 Q(<b>archi)0 72 Q -.15(ve) --.25 G(_write_disk_set_skip_\214le</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code><code>, de).15 E -(v_t</code><code>, ino_t</code>\))-.25 E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>int</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_disk_set_group_lookup</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 36 Q .3 -.15(ve *)-.25 H(</code>).15 -E(<code></code><code>v)0 48 Q(oid *</code>)-.2 E -(<code></code>gid_t \(*\)\(v)0 60 Q -(oid *, const char *gname, gid_t gid\))-.2 E(<code></code><code>v)0 72 Q -(oid \(*cleanup\)\(v)-.2 E(oid *\)</code>)-.2 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\))0 12 Q(<br><br><code></code><code>int</code>) -0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_disk_set_standard_lookup</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 48 Q(<b>archi)0 60 Q -.15(ve) --.25 G(_write_disk_set_user_lookup</b>\(<code></code>).15 E -(<code></code><code>struct archi)0 72 Q .3 -.15(ve *)-.25 H(</code>).15 -E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>v)0 12 Q(oid *</code>)-.2 E -(<code></code>uid_t \(*\)\(v)0 24 Q -(oid *, const char *uname, uid_t uid\))-.2 E(<code></code><code>v)0 36 Q -(oid \(*cleanup\)\(v)-.2 E(oid *\)</code>)-.2 E(\))0 48 Q -(<br><br><code></code><code>int</code>)0 60 Q(<b>archi)0 72 Q -.15(ve) --.25 G(_write_header</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code><code>, struct archi).15 E -.15(ve)-.25 G -(_entry *</code>\)).15 E 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>ssize_t</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_data</b>\(<code></code><code>struct archi).15 E .3 -.15(ve *) --.25 H(</code><code>, const v).15 E(oid *</code><code>, size_t</code>\)) --.2 E(<br><br><code></code><code>int</code>)0 36 Q(<b>archi)0 48 Q -.15 -(ve)-.25 G(_write_\214nish_entry</b>\(<code></code><code>struct archi) -.15 E .3 -.15(ve *)-.25 H(</code>\)).15 E -(<br><br><code></code><code>int</code>)0 60 Q(<b>archi)0 72 Q -.15(ve) --.25 G(_write_close</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code>\)).15 E 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br><br><code></code><code>int</code>)0 12 Q -(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_\214nish</b>\(<code></code><code>struct archi).15 E .3 -.15 -(ve *)-.25 H(</code>\)).15 E(<h3 id="DESCRIPTION">)36 36 Q(DESCRIPTION) -36 48 Q(</h3>)36 60 Q(These functions pro)0 72 Q -(vide a complete API for creating objects on)-.15 E 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(disk from)0 12 Q(<font size="-1"></font><font s\ -ize="-1">struct</font><font size="-1"> archi)0 24 Q -.15(ve)-.25 G -(_entry</font>).15 E(descriptions.)0 36 Q(The)0 48 Q 2.5(ya)-.15 G -(re most naturally used when e)-2.5 E(xtracting objects from an archi) --.15 E -.15(ve)-.25 G(using the)0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G -(_read</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(interf)0 12 Q(ace.)-.1 E -(The general process is to read)0 24 Q(<font size="-1"></font><font siz\ -e="-1">struct</font><font size="-1"> archi)0 36 Q -.15(ve)-.25 G -(_entry</font>).15 E(objects from an archi)0 48 Q -.15(ve)-.25 G 2.5(,t) -.15 G(hen write those objects to a)-2.5 E(<font size="-1"></font><font \ -size="-1">struct</font><font size="-1"> archi)0 60 Q -.15(ve)-.25 G -(</font>).15 E(object created using the)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_disk</b>\(<code></code>\)).15 E -.1(fa)0 24 S(mily functions.).1 -E(This interf)0 36 Q(ace is deliberately v)-.1 E(ery similar to the)-.15 -E(<b>archi)0 48 Q -.15(ve)-.25 G(_write</b>\(<code></code>\)).15 E -(interf)0 60 Q(ace used to write objects to a streaming archi)-.1 E -.15 -(ve)-.25 G(.).15 E(<dl compact>)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_disk_ne).15 E(w</b>\(<code></code>\)<dd>)-.25 E -(Allocates and initializes a)0 24 Q(<font size="-1"></font><font size="\ --1">struct</font><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(</font>) -.15 E(object suitable for writing objects to disk.)0 48 Q -(<p><dt><b>archi)0 60 Q -.15(ve)-.25 G -(_write_disk_set_skip_\214le</b>\(<code></code>\)<dd>).15 E -(Records the de)0 72 Q -(vice and inode numbers of a \214le that should not be)-.25 E 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(ove)0 12 S(rwritten.).15 E -(This is typically used to ensure that an e)0 24 Q -(xtraction process does not)-.15 E -.15(ove)0 36 S(rwrite the archi).15 -E .3 -.15(ve f)-.25 H(rom which objects are being read.).15 E -(This capability is technically unnecessary b)0 48 Q -(ut can be a signi\214cant)-.2 E(performance optimization in practice.)0 -60 Q(<p><dt><b>archi)0 72 Q -.15(ve)-.25 G -(_write_disk_set_options</b>\(<code></code>\)<dd>).15 E 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(The options \214eld consists of a bitwise OR of one or more of the)0 12 -Q(follo)0 24 Q(wing v)-.25 E(alues:)-.25 E(<dl compact>)0 36 Q -(<dt><b></b><b>ARCHIVE_EXTRA)0 48 Q(CT_O)-.4 E(WNER</b><dd>)-.35 E -(The user and group IDs should be set on the restored \214le.)0 60 Q -(By def)0 72 Q(ault, the user and group IDs are not restored.)-.1 E 0 Cg -EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b></b><b>ARCHIVE_EXTRA)0 12 Q -(CT_PERM</b><dd>)-.4 E -(Full permissions \(including SGID, SUID, and stick)0 24 Q 2.5(yb)-.15 G -(its\) should)-2.5 E(be restored e)0 36 Q -(xactly as speci\214ed, without obe)-.15 E(ying the)-.15 E -(current umask.)0 48 Q -(Note that SUID and SGID bits can only be restored if the)0 60 Q -(user and group ID of the object on disk are correct.)0 72 Q 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(If)0 12 Q(<b></b><b>ARCHIVE_EXTRA)0 24 Q(CT_O) --.4 E(WNER</b>)-.35 E -(is not speci\214ed, then SUID and SGID bits will only be restored)0 36 -Q(if the def)0 48 Q(ault user and group IDs of ne)-.1 E -(wly-created objects on disk)-.25 E -(happen to match those speci\214ed in the archi)0 60 Q .3 -.15(ve e)-.25 -H(ntry).15 E(.)-.65 E(By def)0 72 Q -(ault, only basic permissions are restored, and umask is obe)-.1 E(yed.) --.15 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b></b><b>ARCHIVE_EXTRA)0 12 Q -(CT_TIME</b><dd>)-.4 E -(The timestamps \(mtime, ctime, and atime\) should be restored.)0 24 Q -(By def)0 36 Q(ault, the)-.1 E 2.5(ya)-.15 G(re ignored.)-2.5 E -(Note that restoring of atime is not currently supported.)0 48 Q -(<dt><b></b><b>ARCHIVE_EXTRA)0 60 Q(CT_NO_O)-.4 E(VER)-.5 E -(WRITE</b><dd>)-.55 E(Existing \214les on disk will not be o)0 72 Q -.15 -(ve)-.15 G(rwritten.).15 E 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(By def)0 12 Q(ault, e)-.1 E(xisting re)-.15 E -(gular \214les are truncated and o)-.15 E -.15(ve)-.15 G(rwritten;).15 E --.15(ex)0 24 S(isting directories will ha).15 E .3 -.15(ve t)-.2 H -(heir permissions updated;).15 E(other pre-e)0 36 Q -(xisting objects are unlink)-.15 E(ed and recreated from scratch.)-.1 E -(<dt><b></b><b>ARCHIVE_EXTRA)0 48 Q(CT_UNLINK</b><dd>)-.4 E -(Existing \214les on disk will be unlink)0 60 Q(ed before an)-.1 E 2.5 -(ya)-.15 G(ttempt to)-2.5 E(create them.)0 72 Q 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In some cases, this can pro)0 12 Q .3 -.15(ve t) --.15 H 2.5(ob).15 G 2.5(eas)-2.5 G(igni\214cant performance impro)-2.5 E --.15(ve)-.15 G(ment.).15 E(By def)0 24 Q(ault, e)-.1 E -(xisting \214les are truncated and re)-.15 E(written, b)-.25 E(ut)-.2 E -(the \214le is not recreated.)0 36 Q(In particular)0 48 Q 2.5(,t)-.4 G -(he def)-2.5 E(ault beha)-.1 E(vior does not break e)-.2 E -(xisting hard links.)-.15 E(<dt><b></b><b>ARCHIVE_EXTRA)0 60 Q(CT_A)-.4 -E(CL</b><dd>)-.4 E(Attempt to restore A)0 72 Q(CLs.)-.4 E 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(By def)0 12 Q(ault, e)-.1 E(xtended A)-.15 E -(CLs are ignored.)-.4 E(<dt><b></b><b>ARCHIVE_EXTRA)0 24 Q(CT_FFLA)-.4 E -(GS</b><dd>)-.4 E(Attempt to restore e)0 36 Q(xtended \214le \215ags.) --.15 E(By def)0 48 Q(ault, \214le \215ags are ignored.)-.1 E -(<dt><b></b><b>ARCHIVE_EXTRA)0 60 Q(CT_XA)-.4 E(TTR</b><dd>)-1.11 E -(Attempt to restore POSIX.1e e)0 72 Q(xtended attrib)-.15 E(utes.)-.2 E -0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(By def)0 12 Q(ault, the)-.1 E 2.5(ya)-.15 G -(re ignored.)-2.5 E(<dt><b></b><b>ARCHIVE_EXTRA)0 24 Q -(CT_SECURE_SYMLINKS</b><dd>)-.4 E(Refuse to e)0 36 Q(xtract an)-.15 E -2.5(yo)-.15 G(bject whose \214nal location w)-2.5 E(ould be altered)-.1 -E(by a symlink on disk.)0 48 Q(This is intended to help guard ag)0 60 Q -(ainst a v)-.05 E(ariety of mischief)-.25 E(caused by archi)0 72 Q -.15 -(ve)-.25 G 2.5(st).15 G(hat \(deliberately or otherwise\) e)-2.5 E -(xtract)-.15 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214les outside of the current directory)0 12 Q -(.)-.65 E(The def)0 24 Q(ault is not to perform this check.)-.1 E(If)0 -36 Q(<b></b><b>ARCHIVE_EXTRA)0 48 Q(CT_UNLINK</b>)-.4 E -(is speci\214ed together with this option, the library will)0 60 Q(remo) -0 72 Q .3 -.15(ve a)-.15 H .3 -.15(ny i).15 H -(ntermediate symlinks it \214nds and return an).15 E 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(error only if such symlink could not be remo)0 -12 Q -.15(ve)-.15 G(d.).15 E(<dt><b></b><b>ARCHIVE_EXTRA)0 24 Q -(CT_SECURE_NODO)-.4 E(TDO)-.4 E(T</b><dd>)-.4 E(Refuse to e)0 36 Q -(xtract a path that contains a)-.15 E(<code></code><code>..</code>)0 48 -Q(element an)0 60 Q(ywhere within it.)-.15 E(The def)0 72 Q -(ault is to not refuse such paths.)-.1 E 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that paths ending in)0 12 Q -(<code></code><code>..</code>)0 24 Q(al)0 36 Q -.1(wa)-.1 G -(ys cause an error).1 E 2.5(,r)-.4 G -2.25 -.15(eg a)-2.5 H -(rdless of this \215ag.).15 E(<dt><b></b><b>ARCHIVE_EXTRA)0 48 Q(CT_SP) --.4 E(ARSE</b><dd>)-.92 E -(Scan data for blocks of NUL bytes and try to recreate them with holes.) -0 60 Q(This results in sparse \214les, independent of whether the archi) -0 72 Q .3 -.15(ve f)-.25 H(ormat).15 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(supports or uses them.)0 12 Q(</dl>)0 24 Q -(<p><dt>Xo<dd>)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_disk_set_group_lookup</b>\(<code></code>\),).15 E(<b>archi)0 60 -Q -.15(ve)-.25 G(_write_disk_set_user_lookup</b>\(<code></code>\)).15 E -(The)0 72 Q 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E -(objects contain both names and ids that can be used to identify users)0 -24 Q(and groups.)0 36 Q(These names and ids describe the o)0 48 Q -(wnership of the \214le itself and)-.25 E(also appear in A)0 60 Q -(CL lists.)-.4 E(By def)0 72 Q -(ault, the library uses the ids and ignores the names, b)-.1 E(ut)-.2 E -0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(this can be o)0 12 Q -.15(ve)-.15 G -(rridden by re).15 E(gistering user and group lookup functions.)-.15 E -1.6 -.8(To r)0 24 T -.15(eg).8 G(ister).15 E 2.5(,y)-.4 G(ou must pro) --2.5 E(vide a lookup function which)-.15 E -(accepts both a name and id and returns a suitable id.)0 36 Q -1.1(Yo)0 -48 S 2.5(um)1.1 G(ay also pro)-2.5 E(vide a)-.15 E -(<font size="-1"></font><font size="-1">v)0 60 Q -(oid</font><font size="-1"> *</font>)-.2 E(pointer to a pri)0 72 Q -.25 -(va)-.25 G(te data structure and a cleanup function for).25 E 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(that data.)0 12 Q -(The cleanup function will be in)0 24 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw) -.1 G(hen the)-2.5 E(<font size="-1"></font><font size="-1">struct</font\ -><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(</font>).15 E -(object is destro)0 48 Q(yed.)-.1 E(<p><dt><b>archi)0 60 Q -.15(ve)-.25 -G(_write_disk_set_standard_lookup</b>\(<code></code>\)<dd>).15 E -(This con)0 72 Q -.15(ve)-.4 G -(nience function installs a standard set of user).15 E 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and group lookup functions.)0 12 Q -(These functions use)0 24 Q -(<a href="../html3/getpwnam.html">getpwnam\(3\)</a>)0 36 Q(and)0 48 Q -(<a href="../html3/getgrnam.html">getgrnam\(3\)</a>)0 60 Q(to con)0 72 Q --.15(ve)-.4 G(rt names to ids, def).15 E -(aulting to the ids if the names cannot)-.1 E 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(be look)0 12 Q(ed up.)-.1 E -(These functions also implement a simple memory cache to reduce)0 24 Q -(the number of calls to)0 36 Q -(<a href="../html3/getpwnam.html">getpwnam\(3\)</a>)0 48 Q(and)0 60 Q -(<a href="../html3/getgrnam.html">getgrnam\(3\)</a>.)0 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_header</b>\(<code></code>\)<dd>).15 E -(Build and write a header using the data in the pro)0 24 Q(vided)-.15 E -(<font size="-1"></font><font size="-1">struct</font><font size="-1"> a\ -rchi)0 36 Q -.15(ve)-.25 G(_entry</font>).15 E(structure.)0 48 Q(See)0 -60 Q(<a href="../html3/archi)0 72 Q -.15(ve)-.25 G(_entry).15 E -(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>).15 E 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(for information on creating and populating)0 12 -Q(<font size="-1"></font><font size="-1">struct</font><font size="-1"> \ -archi)0 24 Q -.15(ve)-.25 G(_entry</font>).15 E(objects.)0 36 Q -(<p><dt><b>archi)0 48 Q -.15(ve)-.25 G -(_write_data</b>\(<code></code>\)<dd>).15 E -(Write data corresponding to the header just written.)0 60 Q -(Returns number of bytes written or -1 on error)0 72 Q(.)-.55 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_\214nish_entry</b>\(<code></code>\)<dd>).15 E -(Close out the entry just written.)0 24 Q(Ordinarily)0 36 Q 2.5(,c)-.65 -G(lients ne)-2.5 E -.15(ve)-.25 G 2.5(rn).15 G(eed to call this, as it) --2.5 E(is called automatically by)0 48 Q(<b>archi)0 60 Q -.15(ve)-.25 G -(_write_ne).15 E(xt_header</b>\(<code></code>\))-.15 E(and)0 72 Q 0 Cg -EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\)).15 E(as needed.)0 24 Q -(<p><dt><b>archi)0 36 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\)<dd>).15 E(Set an)0 48 Q 2.5(ya)-.15 G -(ttrib)-2.5 E(utes that could not be set during the initial restore.)-.2 -E -.15(Fo)0 60 S 2.5(re).15 G -(xample, directory timestamps are not restored initially because)-2.65 E -(restoring a subsequent \214le w)0 72 Q(ould alter that timestamp.)-.1 E -0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Similarly)0 12 Q 2.5(,n)-.65 G -(on-writable directories are initially created with)-2.5 E -(write permissions \(so that their contents can be restored\).)0 24 Q -(The)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_disk_ne).15 E(w</b>) --.25 E(library maintains a list of all such deferred attrib)0 60 Q -(utes and)-.2 E(sets them when this function is in)0 72 Q -.2(vo)-.4 G --.1(ke).2 G(d.).1 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>archi)0 12 Q -.15(ve)-.25 G -(_write_\214nish</b>\(<code></code>\)<dd>).15 E(In)0 24 Q -.2(vo)-.4 G --.1(ke).2 G(s).1 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\)).15 E(if it w)0 48 Q(as not in)-.1 E --.2(vo)-.4 G -.1(ke).2 G 2.5(dm).1 G(anually)-2.5 E 2.5(,t)-.65 G -(hen releases all resources.)-2.5 E(</dl>)0 60 Q -(More information about the)0 72 Q 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>struct</i><i> archi)0 12 Q -.15(ve) --.25 G(</i>).15 E(object and the o)0 24 Q -.15(ve)-.15 G -(rall design of the library can be found in the).15 E -(<a href="../html3/libarchi)0 36 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E -.15(ove)0 48 S(rvie).15 E -.65(w.)-.25 G -(Man)0 60 Q 2.5(yo)-.15 G 2.5(ft)-2.5 G -(hese functions are also documented under)-2.5 E -(<a href="../html3/archi)0 72 Q -.15(ve)-.25 G(_write.html">archi).15 E --.15(ve)-.25 G(_write\(3\)</a>.).15 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="RETURN V)36 12 Q(ALUES">)-1.35 E -(RETURN V)36 24 Q(ALUES)-1.35 E(</h3>)36 36 Q(Most functions return)0 48 -Q(<b></b><b>ARCHIVE_OK</b>)0 60 Q(\(zero\) on success, or one of se)0 72 -Q -.15(ve)-.25 G(ral non-zero).15 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(error codes for errors.)0 12 Q -(Speci\214c error codes include:)0 24 Q(<b></b><b>ARCHIVE_RETR)0 36 Q -(Y</b>)-.65 E(for operations that might succeed if retried,)0 48 Q -(<b></b><b>ARCHIVE_W)0 60 Q(ARN</b>)-1.2 E -(for unusual conditions that do not pre)0 72 Q -.15(ve)-.25 G -(nt further operations, and).15 E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>ARCHIVE_F)0 12 Q -1.21 -1.11(AT A)-.74 -H(L</b>)1.11 E(for serious errors that mak)0 24 Q 2.5(er)-.1 G -(emaining operations impossible.)-2.5 E(The)0 36 Q(<b>archi)0 48 Q -.15 -(ve)-.25 G(_errno</b>\(<code></code>\)).15 E(and)0 60 Q(<b>archi)0 72 Q --.15(ve)-.25 G(_error_string</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(functions can be used to retrie)0 12 Q .3 -.15 -(ve a)-.25 H 2.5(na).15 G(ppropriate error code and a)-2.5 E(te)0 24 Q -(xtual error message.)-.15 E(<p>)36 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G -(_write_disk_ne).15 E(w</b>\(<code></code>\))-.25 E -(returns a pointer to a ne)0 60 Q(wly-allocated)-.25 E(<font size="-1">\ -</font><font size="-1">struct</font><font size="-1"> archi)0 72 Q -.15 -(ve)-.25 G(</font>).15 E 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(object.)0 12 Q(<p>)36 24 Q(<b>archi)0 36 Q -.15 -(ve)-.25 G(_write_data</b>\(<code></code>\)).15 E -(returns a count of the number of bytes actually written.)0 48 Q -(On error)0 60 Q 2.5(,-)-.4 G 2.5(1i)-2.5 G 2.5(sr)-2.5 G -(eturned and the)-2.5 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_error_string</b>\(<code></code>\)).15 E -(functions will return appropriate v)0 36 Q(alues.)-.25 E -(<h3 id="SEE ALSO">)36 48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G -(_read.html">archi).15 E -.15(ve)-.25 G(_read\(3\)</a>,).15 E -(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G(_write.html">archi).15 E --.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html1/tar)0 36 Q -(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/libarchi)0 48 Q -.15(ve) --.25 G(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>).15 E -(<h3 id="HIST)36 60 Q(OR)-.18 E(Y">)-.65 E(HIST)36 72 Q(OR)-.18 E(Y)-.65 -E 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(The)0 24 Q(<b>libarchi)0 36 Q -.15 -(ve)-.25 G(</b>).15 E(library \214rst appeared in)0 48 Q(FreeBSD5.3.)0 -60 Q(The)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_write_disk</b>) -.15 E(interf)0 24 Q(ace w)-.1 E(as added to)-.1 E(<b>libarchi)0 36 Q --.15(ve)-.25 G(</b><b>2.0</b>).15 E(and \214rst appeared in)0 48 Q -(FreeBSD6.3.)0 60 Q(<h3 id="A)36 72 Q(UTHORS">)-.55 E 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.55(AU)36 12 S(THORS).55 E(</h3>)36 24 Q(<p>)36 -36 Q(The)0 48 Q(<b>libarchi)0 60 Q -.15(ve)-.25 G(</b>).15 E(library w)0 -72 Q(as written by)-.1 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.35(Ti)0 12 S 2.5(mK).35 G -(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E(<h3 id="B)36 24 Q -(UGS">)-.1 E -.1(BU)36 36 S(GS).1 E(</h3>)36 48 Q -(Directories are actually e)0 60 Q(xtracted in tw)-.15 E 2.5(od)-.1 G -(istinct phases.)-2.5 E(Directories are created during)0 72 Q 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_header</b>\(<code></code>\),).15 E -.2(bu)0 24 S 2.5<748c>.2 G -(nal permissions are not set until)-2.5 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_close</b>\(<code></code>\).).15 E -(This separation is necessary to correctly handle borderline)0 48 Q -(cases such as a non-writable directory containing)0 60 Q(\214les, b)0 -72 Q(ut can cause une)-.2 E(xpected results.)-.15 E 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,d)-.4 G -(irectory permissions are not fully)-2.5 E(restored until the archi)0 24 -Q .3 -.15(ve i)-.25 H 2.5(sc).15 G(losed.)-2.5 E(If you use)0 36 Q -(<a href="../html2/chdir)0 48 Q(.html">chdir\(2\)</a>)-.55 E -(to change the current directory between calls to)0 60 Q(<b>archi)0 72 Q --.15(ve)-.25 G(_read_e).15 E(xtract</b>\(<code></code>\))-.15 E 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(or before calling)0 12 Q(<b>archi)0 24 Q -.15 -(ve)-.25 G(_read_close</b>\(<code></code>\),).15 E -(you may confuse the permission-setting logic with)0 36 Q -(the result that directory permissions are restored)0 48 Q(incorrectly)0 -60 Q(.)-.65 E(<p>)36 72 Q 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(The library attempts to create objects with \214lenames longer than)0 -12 Q(<b></b><b>P)0 24 Q -1.11(AT)-.92 G(H_MAX</b>)1.11 E -(by creating pre\214x)0 36 Q -(es of the full path and changing the current directory)-.15 E(.)-.65 E -(Currently)0 48 Q 2.5(,t)-.65 G -(his logic is limited in scope; the \214xup pass does)-2.5 E(not w)0 60 -Q(ork correctly for such objects and the symlink security check)-.1 E -(option disables the support for v)0 72 Q(ery long pathnames.)-.15 E 0 -Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(Restoring the path)0 24 Q -(<code></code><code>aa/../bb</code>)0 36 Q -(does create each intermediate directory)0 48 Q(.)-.65 E(In particular)0 -60 Q 2.5(,t)-.4 G(he directory)-2.5 E(<code></code><code>aa</code>)0 72 -Q 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(is created as well as the \214nal object)0 12 Q -(<code></code><code>bb</code>.)0 24 Q(In theory)0 36 Q 2.5(,t)-.65 G -(his can be e)-2.5 E(xploited to create an entire directory heirarch) --.15 E(y)-.05 E(with a single request.)0 48 Q -(Of course, this does not w)0 60 Q(ork if the)-.1 E -(<b></b><b>ARCHIVE_EXTRA)0 72 Q(CT_NODO)-.4 E(TDO)-.4 E(T</b>)-.4 E 0 Cg -EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(option is speci\214ed.)0 12 Q(<p>)36 24 Q -(Implicit directories are al)0 36 Q -.1(wa)-.1 G(ys created obe).1 E -(ying the current umask.)-.15 E(Explicit objects are created obe)0 48 Q -(ying the current umask unless)-.15 E(<b></b><b>ARCHIVE_EXTRA)0 60 Q -(CT_PERM</b>)-.4 E(is speci\214ed, in which case the)0 72 Q 2.5(yc)-.15 -G(urrent umask is ignored.)-2.5 E 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -(SGID and SUID bits are restored only if the correct user and)0 24 Q -(group could be set.)0 36 Q(If)0 48 Q(<b></b><b>ARCHIVE_EXTRA)0 60 Q -(CT_O)-.4 E(WNER</b>)-.35 E -(is not speci\214ed, then no attempt is made to set the o)0 72 Q -(wnership.)-.25 E 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(In this case, SGID and SUID bits are restored only if the)0 12 Q -(user and group of the \214nal object happen to match those speci\214ed) -0 24 Q(in the entry)0 36 Q(.)-.65 E(<p>)36 48 Q(The)0 60 Q -.74(``)0 72 -S(standard').74 E(')-.74 E 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(user)0 12 Q -(-id and group-id lookup functions are not the def)-.2 E(aults because) --.1 E(<a href="../html3/getgrnam.html">getgrnam\(3\)</a>)0 24 Q(and)0 36 -Q(<a href="../html3/getpwnam.html">getpwnam\(3\)</a>)0 48 Q -(are sometimes too lar)0 60 Q(ge for particular applications.)-.18 E -(The current design allo)0 72 Q(ws the application author to use a more) --.25 E 0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(compact implementation when appropriate.)0 12 Q -(<p>)36 24 Q(There should be a corresponding)0 36 Q(<b>archi)0 48 Q -.15 -(ve)-.25 G(_read_disk</b>).15 E(interf)0 60 Q(ace that w)-.1 E -(alks a directory heirarch)-.1 E 2.5(ya)-.05 G(nd returns archi)-2.5 E --.15(ve)-.25 G(entry objects.)0 72 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:25 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">archive_write_disk(3) FreeBSD Library +Functions Manual archive_write_disk(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>archive_write_disk_new</b>, +<b>archive_write_disk_set_options</b>, +<b>archive_write_disk_set_skip_file</b>, +<b>archive_write_disk_set_group_lookup</b>, +<b>archive_write_disk_set_standard_lookup</b>, +<b>archive_write_disk_set_user_lookup</b>, +<b>archive_write_header</b>, <b>archive_write_data</b>, +<b>archive_write_finish_entry</b>, +<b>archive_write_close</b>, <b>archive_write_finish</b> +— functions for creating objects on disk</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:8%;"><b>#include +<archive.h></b></p> + +<p style="margin-left:8%; margin-top: 1em"><i>struct +archive *</i></p> + + +<p style="margin-left:14%;"><b>archive_write_disk_new</b>(<i>void</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_disk_set_options</b>(<i>struct archive *</i>, +<i>int flags</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_disk_set_skip_file</b>(<i>struct archive *</i>, +<i>dev_t</i>, <i>ino_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_write_disk_set_group_lookup</b>(<i>struct archive *</i>, +<i>void *</i>, +<i>gid_t (*)(void *, const char *gname, gid_t gid)</i>, +<i>void (*cleanup)(void *)</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_disk_set_standard_lookup</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p valign="top"><b>archive_write_disk_set_user_lookup</b>(<i>struct archive *</i>, +<i>void *</i>, +<i>uid_t (*)(void *, const char *uname, uid_t uid)</i>, +<i>void (*cleanup)(void *)</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_header</b>(<i>struct archive *</i>, +<i>struct archive_entry *</i>);</p> + + +<p style="margin-left:8%; margin-top: 1em"><i>ssize_t</i></p> + + +<p style="margin-left:14%;"><b>archive_write_data</b>(<i>struct archive *</i>, +<i>const void *</i>, <i>size_t</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_finish_entry</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_close</b>(<i>struct archive *</i>);</p> + +<p style="margin-left:8%; margin-top: 1em"><i>int</i></p> + + +<p style="margin-left:14%;"><b>archive_write_finish</b>(<i>struct archive *</i>);</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">These functions provide a +complete API for creating objects on disk from struct +archive_entry descriptions. They are most naturally used +when extracting objects from an archive using the +<b>archive_read</b>() interface. The general process is to +read struct archive_entry objects from an archive, then +write those objects to a struct archive object created using +the <b>archive_write_disk</b>() family functions. This +interface is deliberately very similar to the +<b>archive_write</b>() interface used to write objects to a +streaming archive.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_disk_new</b>()</p> + +<p style="margin-left:20%;">Allocates and initializes a +struct archive object suitable for writing objects to +disk.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_skip_file</b>()</p> + +<p style="margin-left:20%;">Records the device and inode +numbers of a file that should not be overwritten. This is +typically used to ensure that an extraction process does not +overwrite the archive from which objects are being read. +This capability is technically unnecessary but can be a +significant performance optimization in practice.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_options</b>()</p> + +<p style="margin-left:20%;">The options field consists of a +bitwise OR of one or more of the following values:</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_OWNER</b></p> + +<p style="margin-left:32%;">The user and group IDs should +be set on the restored file. By default, the user and group +IDs are not restored.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_PERM</b></p> + +<p style="margin-left:32%;">Full permissions (including +SGID, SUID, and sticky bits) should be restored exactly as +specified, without obeying the current umask. Note that SUID +and SGID bits can only be restored if the user and group ID +of the object on disk are correct. If +<b>ARCHIVE_EXTRACT_OWNER</b> is not specified, then SUID and +SGID bits will only be restored if the default user and +group IDs of newly-created objects on disk happen to match +those specified in the archive entry. By default, only basic +permissions are restored, and umask is obeyed.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_TIME</b></p> + +<p style="margin-left:32%;">The timestamps (mtime, ctime, +and atime) should be restored. By default, they are ignored. +Note that restoring of atime is not currently supported.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_NO_OVERWRITE</b></p> + +<p style="margin-left:32%;">Existing files on disk will not +be overwritten. By default, existing regular files are +truncated and overwritten; existing directories will have +their permissions updated; other pre-existing objects are +unlinked and recreated from scratch.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_UNLINK</b></p> + +<p style="margin-left:32%;">Existing files on disk will be +unlinked before any attempt to create them. In some cases, +this can prove to be a significant performance improvement. +By default, existing files are truncated and rewritten, but +the file is not recreated. In particular, the default +behavior does not break existing hard links.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_ACL</b></p> + +<p style="margin-left:32%;">Attempt to restore ACLs. By +default, extended ACLs are ignored.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_FFLAGS</b></p> + +<p style="margin-left:32%;">Attempt to restore extended +file flags. By default, file flags are ignored.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_XATTR</b></p> + +<p style="margin-left:32%;">Attempt to restore POSIX.1e +extended attributes. By default, they are ignored.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_SECURE_SYMLINKS</b></p> + +<p style="margin-left:32%;">Refuse to extract any object +whose final location would be altered by a symlink on disk. +This is intended to help guard against a variety of mischief +caused by archives that (deliberately or otherwise) extract +files outside of the current directory. The default is not +to perform this check. If <b>ARCHIVE_EXTRACT_UNLINK</b> is +specified together with this option, the library will remove +any intermediate symlinks it finds and return an error only +if such symlink could not be removed.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_SECURE_NODOTDOT</b></p> + +<p style="margin-left:32%;">Refuse to extract a path that +contains a <i>..</i> element anywhere within it. The default +is to not refuse such paths. Note that paths ending in +<i>..</i> always cause an error, regardless of this +flag.</p> + +<p valign="top"><b>ARCHIVE_EXTRACT_SPARSE</b></p> + +<p style="margin-left:32%;">Scan data for blocks of NUL +bytes and try to recreate them with holes. This results in +sparse files, independent of whether the archive format +supports or uses them.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_group_lookup</b>(), +<b>archive_write_disk_set_user_lookup</b>()</p> + +<p style="margin-left:20%;">The struct archive_entry +objects contain both names and ids that can be used to +identify users and groups. These names and ids describe the +ownership of the file itself and also appear in ACL lists. +By default, the library uses the ids and ignores the names, +but this can be overridden by registering user and group +lookup functions. To register, you must provide a lookup +function which accepts both a name and id and returns a +suitable id. You may also provide a void * pointer to a +private data structure and a cleanup function for that data. +The cleanup function will be invoked when the struct archive +object is destroyed.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_disk_set_standard_lookup</b>()</p> + +<p style="margin-left:20%;">This convenience function +installs a standard set of user and group lookup functions. +These functions use getpwnam(3) and getgrnam(3) to convert +names to ids, defaulting to the ids if the names cannot be +looked up. These functions also implement a simple memory +cache to reduce the number of calls to getpwnam(3) and +getgrnam(3).</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_header</b>()</p> + +<p style="margin-left:20%;">Build and write a header using +the data in the provided struct archive_entry structure. See +archive_entry(3) for information on creating and populating +struct archive_entry objects.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_data</b>()</p> + +<p style="margin-left:20%;">Write data corresponding to the +header just written. Returns number of bytes written or -1 +on error.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_finish_entry</b>()</p> + +<p style="margin-left:20%;">Close out the entry just +written. Ordinarily, clients never need to call this, as it +is called automatically by +<b>archive_write_next_header</b>() and +<b>archive_write_close</b>() as needed.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_close</b>()</p> + +<p style="margin-left:20%;">Set any attributes that could +not be set during the initial restore. For example, +directory timestamps are not restored initially because +restoring a subsequent file would alter that timestamp. +Similarly, non-writable directories are initially created +with write permissions (so that their contents can be +restored). The <b>archive_write_disk_new</b> library +maintains a list of all such deferred attributes and sets +them when this function is invoked.</p> + + +<p style="margin-top: 1em" valign="top"><b>archive_write_finish</b>()</p> + +<p style="margin-left:20%;">Invokes +<b>archive_write_close</b>() if it was not invoked manually, +then releases all resources.</p> + +<p style="margin-left:8%;">More information about the +<i>struct archive</i> object and the overall design of the +library can be found in the libarchive(3) overview. Many of +these functions are also documented under +archive_write(3).</p> + +<p style="margin-top: 1em" valign="top"><b>RETURN +VALUES</b></p> + +<p style="margin-left:8%;">Most functions return +<b>ARCHIVE_OK</b> (zero) on success, or one of several +non-zero error codes for errors. Specific error codes +include: <b>ARCHIVE_RETRY</b> for operations that might +succeed if retried, <b>ARCHIVE_WARN</b> for unusual +conditions that do not prevent further operations, and +<b>ARCHIVE_FATAL</b> for serious errors that make remaining +operations impossible. The <b>archive_errno</b>() and +<b>archive_error_string</b>() functions can be used to +retrieve an appropriate error code and a textual error +message.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_write_disk_new</b>() +returns a pointer to a newly-allocated struct archive +object.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_write_data</b>() +returns a count of the number of bytes actually written. On +error, -1 is returned and the <b>archive_errno</b>() and +<b>archive_error_string</b>() functions will return +appropriate values.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">archive_read(3), +archive_write(3), tar(1), libarchive(3)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3. The +<b>archive_write_disk</b> interface was added to +<b>libarchive 2.0</b> and first appeared in +FreeBSD 6.3.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@acm.org⟩.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">Directories are actually +extracted in two distinct phases. Directories are created +during <b>archive_write_header</b>(), but final permissions +are not set until <b>archive_write_close</b>(). This +separation is necessary to correctly handle borderline cases +such as a non-writable directory containing files, but can +cause unexpected results. In particular, directory +permissions are not fully restored until the archive is +closed. If you use chdir(2) to change the current directory +between calls to <b>archive_read_extract</b>() or before +calling <b>archive_read_close</b>(), you may confuse the +permission-setting logic with the result that directory +permissions are restored incorrectly.</p> + +<p style="margin-left:8%; margin-top: 1em">The library +attempts to create objects with filenames longer than +<b>PATH_MAX</b> by creating prefixes of the full path and +changing the current directory. Currently, this logic is +limited in scope; the fixup pass does not work correctly for +such objects and the symlink security check option disables +the support for very long pathnames.</p> + +<p style="margin-left:8%; margin-top: 1em">Restoring the +path <i>aa/../bb</i> does create each intermediate +directory. In particular, the directory <i>aa</i> is created +as well as the final object <i>bb</i>. In theory, this can +be exploited to create an entire directory heirarchy with a +single request. Of course, this does not work if the +<b>ARCHIVE_EXTRACT_NODOTDOT</b> option is specified.</p> + +<p style="margin-left:8%; margin-top: 1em">Implicit +directories are always created obeying the current umask. +Explicit objects are created obeying the current umask +unless <b>ARCHIVE_EXTRACT_PERM</b> is specified, in which +case they current umask is ignored.</p> + +<p style="margin-left:8%; margin-top: 1em">SGID and SUID +bits are restored only if the correct user and group could +be set. If <b>ARCHIVE_EXTRACT_OWNER</b> is not specified, +then no attempt is made to set the ownership. In this case, +SGID and SUID bits are restored only if the user and group +of the final object happen to match those specified in the +entry.</p> + +<p style="margin-left:8%; margin-top: 1em">The +‘‘standard’’ user-id and group-id +lookup functions are not the defaults because getgrnam(3) +and getpwnam(3) are sometimes too large for particular +applications. The current design allows the application +author to use a more compact implementation when +appropriate.</p> + +<p style="margin-left:8%; margin-top: 1em">There should be +a corresponding <b>archive_read_disk</b> interface that +walks a directory heirarchy and returns archive entry +objects.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +August 5, 2008 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/bsdcpio.1.html b/archivers/libarchive/files/doc/html/bsdcpio.1.html index 66d08c5e978..27c60219ec7 100644 --- a/archivers/libarchive/files/doc/html/bsdcpio.1.html +++ b/archivers/libarchive/files/doc/html/bsdcpio.1.html @@ -1,890 +1,519 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:18 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 72 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(December 21, 2007 BSDCPIO 1)74.5 48 Q(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>cpio</b>)0 48 Q 2.5(-c)0 60 S(op)-2.5 E 2.5 -<798c>-.1 G(les to and from archi)-2.5 E -.15(ve)-.25 G(s).15 E -(<h3 id="SYNOPSIS">)36 72 Q 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(SYNOPSIS)36 12 Q(</h3>)36 24 Q(<b>cpio</b>)0 36 -Q({<b>\255</b><b>i</b>})0 48 Q([<i></i><i>options</i>])0 60 Q -([<i></i><i>pattern</i><i> ...</i>])0 72 Q 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF([<i></i><i><</i><i> archi)0 12 Q -.15(ve)-.25 G -(</i>]).15 E(<b>cpio</b>)0 24 Q({<b>\255</b><b>o</b>})0 36 Q -([<i></i><i>options</i>])0 48 Q(<i></i><i><</i><i> name-list</i>)0 60 Q -([<i></i><i>></i><i> archi)0 72 Q -.15(ve)-.25 G(</i>]).15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>cpio</b>)0 12 Q({<b>\255</b><b>p</b>})0 24 Q -([<i></i><i>options</i>])0 36 Q(<i></i><i>dest-dir</i>)0 48 Q -(<i></i><i><</i><i> name-list</i>)0 60 Q(<h3 id="DESCRIPTION">)36 72 Q 0 -Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(<b>cpio</b>)0 -36 Q(copies \214les between archi)0 48 Q -.15(ve)-.25 G 2.5(sa).15 G -(nd directories.)-2.5 E(This implementation can e)0 60 Q -(xtract from tar)-.15 E 2.5(,p)-.4 G(ax, cpio, zip, jar)-2.5 E 2.5(,a) --.4 G -.4(r,)-2.5 G(and ISO 9660 cdrom images and can create tar)0 72 Q -2.5(,p)-.4 G(ax, cpio, ar)-2.5 E(,)-.4 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and shar archi)0 12 Q -.15(ve)-.25 G(s.).15 E -(<p>)36 24 Q(The \214rst option to)0 36 Q(<b>cpio</b>)0 48 Q -(is a mode indicator from the follo)0 60 Q(wing list:)-.25 E -(<dl compact>)0 72 Q 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>\255</b><b>i</b><dd>)0 12 Q(Input.)0 24 Q -(Read an archi)0 36 Q .3 -.15(ve f)-.25 H(rom standard input \(unless o) -.15 E -.15(ve)-.15 G(rriden\) and e).15 E(xtract the)-.15 E -(contents to disk or \(if the)0 48 Q(<b>\255</b><b>t</b>)0 60 Q -(option is speci\214ed\))0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(list the contents to standard output.)0 12 Q -(If one or more \214le patterns are speci\214ed, only \214les matching)0 -24 Q(one of the patterns will be e)0 36 Q(xtracted.)-.15 E -(<dt><b>\255</b><b>o</b><dd>)0 48 Q(Output.)0 60 Q -(Read a list of \214lenames from standard input and produce a ne)0 72 Q -2.5(wa)-.25 G(rchi)-2.5 E -.15(ve)-.25 G 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(on standard output \(unless o)0 12 Q -.15(ve) --.15 G(rriden\) containing the speci\214ed items.).15 E -(<dt><b>\255</b><b>p</b><dd>)0 24 Q -.15(Pa)0 36 S(ss-through.).15 E -(Read a list of \214lenames from standard input and cop)0 48 Q 2.5(yt) --.1 G(he \214les to the)-2.5 E(speci\214ed directory)0 60 Q(.)-.65 E -(</dl>)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(<h3 id="OPTIONS">)36 24 Q(OPTIONS)36 -36 Q(</h3>)36 48 Q -(Unless speci\214cally stated otherwise, options are applicable in)0 60 -Q(all operating modes.)0 72 Q 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q -(<p><dt><b>\255</b><b>0</b><dd>)0 24 Q -(Read \214lenames separated by NUL characters instead of ne)0 36 Q -(wlines.)-.25 E(This is necessary if an)0 48 Q 2.5(yo)-.15 G 2.5(ft)-2.5 -G(he \214lenames being read might contain ne)-2.5 E(wlines.)-.25 E -(<p><dt><b>\255</b><b>A</b><dd>)0 60 Q(\(o mode only\))0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Append to the speci\214ed archi)0 12 Q -.15(ve) --.25 G(.).15 E(\(Not yet implemented.\))0 24 Q -(<p><dt><b>\255</b><b>a</b><dd>)0 36 Q(\(o and p modes\))0 48 Q -(Reset access times on \214les after the)0 60 Q 2.5(ya)-.15 G(re read.) --2.5 E(<p><dt><b>\255</b><b>B</b><dd>)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(o mode only\))0 12 Q -(Block output to records of 5120 bytes.)0 24 Q -(<p><dt><b>\255</b><b>C</b><i></i><i> size</i><dd>)0 36 Q -(\(o mode only\))0 48 Q(Block output to records of)0 60 Q -(<i></i><i>size</i>)0 72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(bytes.)0 12 Q(<p><dt><b>\255</b><b>c</b><dd>)0 -24 Q(\(o mode only\))0 36 Q -(Use the old POSIX portable character format.)0 48 Q(Equi)0 60 Q -.25 -(va)-.25 G(lent to).25 E(<b>\255</b><b>-format</b><i></i><i> odc</i>.)0 -72 Q 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>d</b><dd>)0 12 Q -(\(i and p modes\))0 24 Q(Create directories as necessary)0 36 Q(.)-.65 -E(<p><dt><b>\255</b><b>E</b><i></i><i> \214le</i><dd>)0 48 Q -(\(i mode only\))0 60 Q(Read list of \214le name patterns from)0 72 Q 0 -Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>\214le</i>)0 12 Q(to list and e)0 24 Q -(xtract.)-.15 E(<p><dt><b>\255</b><b>F</b><i></i><i> \214le</i><dd>)0 36 -Q(Read archi)0 48 Q .3 -.15(ve f)-.25 H(rom or write archi).15 E .3 -.15 -(ve t)-.25 H(o).15 E(<i></i><i>\214le</i>.)0 60 Q -(<p><dt><b>\255</b><b>f</b><i></i><i> pattern</i><dd>)0 72 Q 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(i mode only\))0 12 Q -(Ignore \214les that match)0 24 Q(<i></i><i>pattern</i>.)0 36 Q -(<p><dt><b>\255</b><b>-format</b><i></i><i> format</i><dd>)0 48 Q -(\(o mode only\))0 60 Q(Produce the output archi)0 72 Q .3 -.15(ve i) --.25 H 2.5(nt).15 G(he speci\214ed format.)-2.5 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Supported formats include:)0 12 Q(<p>)36 24 Q -(<dl compact>)0 36 Q(<dt><i></i><i>cpio</i><dd>)0 48 Q(Synon)0 60 Q -(ym for)-.15 E(<i></i><i>odc</i>.)0 72 Q 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><i></i><i>ne)0 12 Q(wc</i><dd>)-.25 E -(The SVR4 portable cpio format.)0 24 Q(<dt><i></i><i>odc</i><dd>)0 36 Q -(The old POSIX.1 portable octet-oriented cpio format.)0 48 Q -(<dt><i></i><i>pax</i><dd>)0 60 Q(The POSIX.1 pax format, an e)0 72 Q -(xtension of the ustar format.)-.15 E 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><i></i><i>ustar</i><dd>)0 12 Q -(The POSIX.1 tar format.)0 24 Q(</dl>)0 36 Q(<p>)36 48 Q(The def)0 60 Q -(ault format is)-.1 E(<i></i><i>odc</i>.)0 72 Q 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(See)0 12 Q(<a href="../html5/libarchi)0 24 Q --.15(ve)-.25 G(_formats.html">libarchi).15 E -.15(ve)-.25 G -(_formats\(5\)</a>).15 E(for more complete information about the)0 36 Q -(formats currently supported by the underlying)0 48 Q -(<a href="../html3/libarchi)0 60 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E(library)0 72 Q(.)-.65 E 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(<p><dt><b>\255</b><b>H</b><i></i><i> format</i><dd>)0 12 Q(Synon)0 24 Q -(ym for)-.15 E(<b>\255</b><b>-format</b>.)0 36 Q -(<p><dt><b>\255</b><b>h</b><b> \255</b>,<b>-help</b><dd>)0 48 Q -(Print usage information.)0 60 Q -(<p><dt><b>\255</b><b>I</b><i></i><i> \214le</i><dd>)0 72 Q 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Read archi)0 12 Q .3 -.15(ve f)-.25 H(rom).15 E -(<i></i><i>\214le</i>.)0 24 Q(<p><dt><b>\255</b><b>i</b><dd>)0 36 Q -(Input mode.)0 48 Q(See abo)0 60 Q .3 -.15(ve f)-.15 H(or description.) -.15 E(<p><dt><b>\255</b><b>-insecure</b><dd>)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(i and p mode only\))0 12 Q -(Disable security checks during e)0 24 Q(xtraction or cop)-.15 E(ying.) --.1 E(This allo)0 36 Q(ws e)-.25 E -(xtraction via symbolic links and path names containing)-.15 E(`..)0 48 -Q(')-.7 E(in the name.)0 60 Q(<p><dt><b>\255</b><b>J</b><dd>)0 72 Q 0 Cg -EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(o mode only\))0 12 Q -(Compress the \214le with xz-compatible compression before writing it.)0 -24 Q -(In input mode, this option is ignored; xz compression is recognized)0 -36 Q(automatically on input.)0 48 Q(<p><dt><b>\255</b><b>j</b><dd>)0 60 -Q(Synon)0 72 Q(ym for)-.15 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>y</b>.)0 12 Q -(<p><dt><b>\255</b><b>L</b><dd>)0 24 Q(\(o and p modes\))0 36 Q -(All symbolic links will be follo)0 48 Q(wed.)-.25 E(Normally)0 60 Q 2.5 -(,s)-.65 G(ymbolic links are archi)-2.5 E -.15(ve)-.25 G 2.5(da).15 G -(nd copied as symbolic links.)-2.5 E -.4(Wi)0 72 S -(th this option, the tar).4 E(get of the link will be archi)-.18 E -.15 -(ve)-.25 G 2.5(do).15 G 2.5(rc)-2.5 G(opied instead.)-2.5 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>l</b><dd>)0 12 Q -(\(p mode only\))0 24 Q(Create links from the tar)0 36 Q -(get directory to the original \214les,)-.18 E(instead of cop)0 48 Q -(ying.)-.1 E(<p><dt><b>\255</b><b>lzma</b><dd>)0 60 Q(\(o mode only\))0 -72 Q 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Compress the \214le with lzma-compatible compre\ -ssion before writing it.)0 12 Q -(In input mode, this option is ignored; lzma compression is recognized)0 -24 Q(automatically on input.)0 36 Q(<p><dt><b>\255</b><b>m</b><dd>)0 48 -Q(\(i and p modes\))0 60 Q -(Set \214le modi\214cation time on created \214les to match)0 72 Q 0 Cg -EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(those in the source.)0 12 Q -(<p><dt><b>\255</b><b>n</b><dd>)0 24 Q(\(i mode, only with)0 36 Q -(<b>\255</b><b>t</b>\))0 48 Q(Display numeric uid and gid.)0 60 Q -(By def)0 72 Q(ault,)-.1 E 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>cpio</b>)0 12 Q -(displays the user and group names when the)0 24 Q 2.5(ya)-.15 G(re pro) --2.5 E(vided in the)-.15 E(archi)0 36 Q -.15(ve)-.25 G 2.5(,o).15 G 2.5 -(rl)-2.5 G(ooks up the user and group names in the system)-2.5 E(passw)0 -48 Q(ord database.)-.1 E(<p><dt><b>\255</b><b>no-preserv)0 60 Q(e-o)-.15 -E(wner</b><dd>)-.25 E(\(i mode only\))0 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Do not attempt to restore \214le o)0 12 Q -(wnership.)-.25 E(This is the def)0 24 Q -(ault when run by non-root users.)-.1 E -(<p><dt><b>\255</b><b>O</b><i></i><i> \214le</i><dd>)0 36 Q(Write archi) -0 48 Q .3 -.15(ve t)-.25 H(o).15 E(<i></i><i>\214le</i>.)0 60 Q -(<p><dt><b>\255</b><b>o</b><dd>)0 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Output mode.)0 12 Q(See abo)0 24 Q .3 -.15(ve f) --.15 H(or description.).15 E(<p><dt><b>\255</b><b>p</b><dd>)0 36 Q -.15 -(Pa)0 48 S(ss-through mode.).15 E(See abo)0 60 Q .3 -.15(ve f)-.15 H -(or description.).15 E(<p><dt><b>\255</b><b>preserv)0 72 Q(e-o)-.15 E -(wner</b><dd>)-.25 E 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(i mode only\))0 12 Q(Restore \214le o)0 24 Q -(wnership.)-.25 E(This is the def)0 36 Q(ault when run by the root user) --.1 E(.)-.55 E(<p><dt><b>\255</b><b>-quiet</b><dd>)0 48 Q -(Suppress unnecessary messages.)0 60 Q(<p><dt><b>\255</b><b>R </b><b>us\ -er[.blm Pp</b>[.blm Pp:group[.blm Pp<dd>]]])0 72 Q 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Set the o)0 12 Q -(wner and/or group on \214les in the output.)-.25 E -(If group is speci\214ed with no user)0 24 Q(\(for e)0 36 Q(xample,)-.15 -E(<b>\255</b><b>R</b><i></i><i> :wheel</i>\))0 48 Q -(then the group will be set b)0 60 Q(ut not the user)-.2 E(.)-.55 E -(If the user is speci\214ed with a trailing colon and no group)0 72 Q 0 -Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(for e)0 12 Q(xample,)-.15 E -(<b>\255</b><b>R</b><i></i><i> root:</i>\))0 24 Q -(then the group will be set to the user')0 36 Q 2.5(sd)-.55 G(ef)-2.5 E -(ault group.)-.1 E -(If the user is speci\214ed with no trailing colon, then)0 48 Q -(the user will be set b)0 60 Q(ut not the group.)-.2 E(In)0 72 Q 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>i</b>)0 12 Q(and)0 24 Q -(<b>\255</b><b>p</b>)0 36 Q -(modes, this option can only be used by the super)0 48 Q(-user)-.2 E(.) --.55 E(\(F)0 60 Q(or compatibility)-.15 E 2.5(,ap)-.65 G -(eriod can be used in place of the colon.\))-2.5 E -(<p><dt><b>\255</b><b>r</b><dd>)0 72 Q 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(All modes.\))0 12 Q(Rename \214les interacti)0 -24 Q -.15(ve)-.25 G(ly).15 E(.)-.65 E -.15(Fo)0 36 S 2.5(re).15 G -(ach \214le, a prompt is written to)-2.5 E(<code></code><code>/de)0 48 Q -(v/tty</code>)-.25 E -(containing the name of the \214le and a line is read from)0 60 Q -(<code></code><code>/de)0 72 Q(v/tty</code>.)-.25 E 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(If the line read is blank, the \214le is skipped.)0 12 Q -(If the line contains a single period, the \214le is processed normally) -0 24 Q(.)-.65 E(Otherwise, the line is tak)0 36 Q(en to be the ne)-.1 E -2.5(wn)-.25 G(ame of the \214le.)-2.5 E(<p><dt><b>\255</b><b>t</b><dd>)0 -48 Q(\(i mode only\))0 60 Q(List the contents of the archi)0 72 Q .3 --.15(ve t)-.25 H 2.5(os).15 G(tdout;)-2.5 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(do not restore the contents to disk.)0 12 Q -(<p><dt><b>\255</b><b>u</b><dd>)0 24 Q(\(i and p modes\))0 36 Q -(Unconditionally o)0 48 Q -.15(ve)-.15 G(rwrite e).15 E -(xisting \214les.)-.15 E(Ordinarily)0 60 Q 2.5(,a)-.65 G 2.5(no)-2.5 G -(lder \214le will not o)-2.5 E -.15(ve)-.15 G(rwrite a ne).15 E -(wer \214le on disk.)-.25 E(<p><dt><b>\255</b><b>v</b><dd>)0 72 Q 0 Cg -EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Print the name of each \214le to stderr as it is processed.)0 12 Q -.4 -(Wi)0 24 S(th).4 E(<b>\255</b><b>t</b>,)0 36 Q(pro)0 48 Q -(vide a detailed listing of each \214le.)-.15 E(<p><dt><b>\255</b><b>-v) -0 60 Q(ersion</b><dd>)-.15 E(Print the program v)0 72 Q -(ersion information and e)-.15 E(xit.)-.15 E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>y</b><dd>)0 12 Q -(\(o mode only\))0 24 Q(Compress the archi)0 36 Q .3 -.15(ve w)-.25 H -(ith bzip2-compatible compression before writing it.).15 E -(In input mode, this option is ignored;)0 48 Q -(bzip2 compression is recognized automatically on input.)0 60 Q -(<p><dt><b>\255</b><b>Z</b><dd>)0 72 Q 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(o mode only\))0 12 Q(Compress the archi)0 24 Q -.3 -.15(ve w)-.25 H -(ith compress-compatible compression before writing it.).15 E -(In input mode, this option is ignored;)0 36 Q -(compression is recognized automatically on input.)0 48 Q -(<p><dt><b>\255</b><b>z</b><dd>)0 60 Q(\(o mode only\))0 72 Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Compress the archi)0 12 Q .3 -.15(ve w)-.25 H -(ith gzip-compatible compression before writing it.).15 E -(In input mode, this option is ignored;)0 24 Q -(gzip compression is recognized automatically on input.)0 36 Q(</dl>)0 -48 Q(<h3 id="ENVIR)36 60 Q(ONMENT">)-.4 E(ENVIR)36 72 Q(ONMENT)-.4 E 0 -Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(The follo)0 24 Q(wing en)-.25 E -(vironment v)-.4 E(ariables af)-.25 E(fect the e)-.25 E -.15(xe)-.15 G -(cution of).15 E(<b>:</b>)0 36 Q(<dl compact>)0 48 Q -(<p><dt><code></code><code>LANG</code><dd>)0 60 Q(The locale to use.)0 -72 Q 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(See)0 12 Q(<a href="../html7/en)0 24 Q -(viron.html">en)-.4 E(viron\(7\)</a>)-.4 E(for more information.)0 36 Q -(<p><dt><code></code><code>TZ</code><dd>)0 48 Q -(The timezone to use when displaying dates.)0 60 Q(See)0 72 Q 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html7/en)0 12 Q(viron.html">en)-.4 E -(viron\(7\)</a>)-.4 E(for more information.)0 24 Q(</dl>)0 36 Q -(<h3 id="EXIT ST)36 48 Q -1.11(AT)-.93 G(US">)1.11 E(EXIT ST)36 60 Q --1.11(AT)-.93 G(US)1.11 E(</h3>)36 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="EXAMPLES">)36 12 Q(EXAMPLES)36 24 Q -(</h3>)36 36 Q(The)0 48 Q(<b>cpio</b>)0 60 Q -(command is traditionally used to cop)0 72 Q 2.5<798c>-.1 G -(le heirarchies in conjunction)-2.5 E 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(with the)0 12 Q -(<a href="../html1/\214nd.html">\214nd\(1\)</a>)0 24 Q(command.)0 36 Q -(The \214rst e)0 48 Q(xample here simply copies all \214les from)-.15 E -(<code></code><code>src</code>)0 60 Q(to)0 72 Q 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>dest</code>:)0 12 Q(<br>)0 24 -Q( )0 36 Q(<code></code><b>\214nd</b\ -><code></code><code>src</code><code> |</code><b>Fl</b><b> pmud</b><code\ -></code><code> dest</code>)0 48 Q(<br>)0 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(By carefully selecting options to the)0 12 Q -(<a href="../html1/\214nd.html">\214nd\(1\)</a>)0 24 Q -(command and combining it with other standard utilities,)0 36 Q -(it is possible to e)0 48 Q -.15(xe)-.15 G(rcise v).15 E -(ery \214ne control o)-.15 E -.15(ve)-.15 G 2.5(rw).15 G -(hich \214les are copied.)-2.5 E(This ne)0 60 Q(xt e)-.15 E -(xample copies \214les from)-.15 E(<code></code><code>src</code>)0 72 Q -0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(to)0 12 Q(<code></code><code>dest</code>)0 24 Q -(that are more than 2 days old and whose names match a particular patte\ -rn:)0 36 Q(<br>)0 48 Q( )0 60 Q(<cod\ -e></code><b>\214nd</b><code></code><code>src</code><b> \255</b><b>mtime\ -</b><i></i><i> +2</i><i> |</i><b>grep</b><b> foo[bar]</b><b> |</b><b>Fl\ -</b><b> pdmu</b><code></code><code> dest</code>)0 72 Q 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br>)0 12 Q(<p>)36 24 Q(This e)0 36 Q -(xample copies \214les from)-.15 E(<code></code><code>src</code>)0 48 Q -(to)0 60 Q(<code></code><code>dest</code>)0 72 Q 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(that are more than 2 days old and which contain the w)0 12 Q(ord)-.1 E -(foobar`)0 24 Q(`.blm Pp: ')-.74 E(')-.74 E(<br>)0 36 Q -( )0 48 Q(<code></code><b>\214nd</b>\ -<code></code><code>src</code><b> \255</b><b>mtime</b><i></i><i> +2</i><\ -i> |</i><b>xar)0 60 Q(gs</b><b>grep</b><b> -l</b><b> foobar</b><b> |</b\ -><b>Fl</b><b> pdmu</b><code></code><code> dest</code>)-.18 E(<br>)0 72 Q -0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="COMP)36 12 Q -1.11(AT)-.92 G(IBILITY">) -1.11 E(COMP)36 24 Q -1.11(AT)-.92 G(IBILITY)1.11 E(</h3>)36 36 Q -(The mode options i, o, and p and the options)0 48 Q -(a, B, c, d, f, l, m, r)0 60 Q 2.5(,t)-.4 G 2.5(,u)-2.5 G 2.5(,a)-2.5 G -(nd v comply with SUSv2.)-2.5 E(<p>)36 72 Q 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The old POSIX.1 standard speci\214ed that only)0 -12 Q(<b>\255</b><b>i</b>,)0 24 Q(<b>\255</b><b>o</b>,)0 36 Q(and)0 48 Q -(<b>\255</b><b>p</b>)0 60 Q(were interpreted as command-line options.)0 -72 Q 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Each took a single ar)0 12 Q -(gument of a list of modi\214er)-.18 E(characters.)0 24 Q -.15(Fo)0 36 S -2.5(re).15 G(xample, the standard syntax allo)-2.65 E(ws)-.25 E -(<b>\255</b><b>imu</b>)0 48 Q -.2(bu)0 60 S 2.5(td).2 G(oes not support) --2.5 E(<b>\255</b><b>miu</b>)0 72 Q 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(or)0 12 Q -(<b>\255</b><b>i</b><b> \255</b><b>m</b><b> \255</b><b>u</b>,)0 24 Q -(since)0 36 Q(<i></i><i>m</i>)0 48 Q(and)0 60 Q(<i></i><i>u</i>)0 72 Q 0 -Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(are only modi\214ers to)0 12 Q -(<b>\255</b><b>i</b>,)0 24 Q(the)0 36 Q 2.5(ya)-.15 G -(re not command-line options in their o)-2.5 E(wn right.)-.25 E -(The syntax supported by this implementation is backw)0 48 Q -(ards-compatible)-.1 E(with the standard.)0 60 Q -.15(Fo)0 72 S 2.5(rb) -.15 G(est compatibility)-2.5 E 2.5(,s)-.65 G -(cripts should limit themselv)-2.5 E(es to the)-.15 E 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(standard syntax.)0 12 Q(<h3 id="SEE ALSO">)36 24 -Q(SEE ALSO)36 36 Q(</h3>)36 48 Q -(<a href="../html1/bzip2.html">bzip2\(1\)</a>,)0 60 Q -(<a href="../html1/tar)0 72 Q(.html">tar\(1\)</a>,)-.55 E 0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/gzip.html">gzip\(1\)</a>,)0 12 -Q(<a href="../html1/mt.html">mt\(1\)</a>,)0 24 Q -(<a href="../html1/pax.html">pax\(1\)</a>,)0 36 Q -(<a href="../html3/libarchi)0 48 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>,).15 E -(<a href="../html5/cpio.html">cpio\(5\)</a>,)0 60 Q -(<a href="../html5/libarchi)0 72 Q -.15(ve)-.25 G -(-formats.html">libarchi).15 E -.15(ve)-.25 G(-formats\(5\)</a>,).15 E 0 -Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html5/tar)0 12 Q -(.html">tar\(5\)</a>)-.55 E(<h3 id="ST)36 24 Q(AND)-.93 E(ARDS">)-.4 E -(ST)36 36 Q(AND)-.93 E(ARDS)-.4 E(</h3>)36 48 Q -(There is no current POSIX standard for the cpio command; it appeared)0 -60 Q(in)0 72 Q 0 Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ISO/IEC 9945-1:1996 \(`)2.5 12 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E -.2(bu)0 24 S 2.5 -(tw).2 G(as dropped from)-2.6 E(IEEE Std 1003.1-2001 \(`)2.5 36 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\) .)-.74 E(<p>)36 48 Q -(The cpio, ustar)0 60 Q 2.5(,a)-.4 G -(nd pax interchange \214le formats are de\214ned by)-2.5 E -(IEEE Std 1003.1-2001 \(`)2.5 72 Q(`<font size="-1">POSIX</font>.1')-.74 -E('\))-.74 E 0 Cg EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(for the pax command.)0 12 Q(<h3 id="HIST)36 24 Q -(OR)-.18 E(Y">)-.65 E(HIST)36 36 Q(OR)-.18 E(Y)-.65 E(</h3>)36 48 Q -(The original)0 60 Q(<b>cpio</b>)0 72 Q 0 Cg EP -%%Page: 67 67 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>\214nd</b>)0 24 Q -(utilities were written by Dick Haight)0 36 Q(while w)0 48 Q -(orking in A)-.1 E(T&T')-1.11 E 2.5(sU)-.55 G(nix Support Group.)-2.5 E -(The)0 60 Q 2.5<798c>-.15 G(rst appeared in 1977 in PWB/UNIX 1.0, the) --2.5 E -.74(``)0 72 S(Programmer').74 E 2.5(sW)-.55 G(ork Bench')-3.3 E -(')-.74 E 0 Cg EP -%%Page: 68 68 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(system de)0 12 Q -.15(ve)-.25 G -(loped for use within A).15 E(T&T)-1.11 E(.)-.74 E(The)0 24 Q 2.5(yw) --.15 G(ere \214rst released outside of A)-2.5 E -(T&T as part of System III Unix in 1981.)-1.11 E(As a result,)0 36 Q -(<b>cpio</b>)0 48 Q(actually predates)0 60 Q(<b>tar</b>,)0 72 Q 0 Cg EP -%%Page: 69 69 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -2.15 -.25(ev e)0 12 T 2.5(nt).25 G(hough it w) --2.5 E(as not well-kno)-.1 E(wn outside of A)-.25 E -(T&T until some time later)-1.11 E(.)-.55 E(<p>)36 24 Q -(This is a complete re-implementation based on the)0 36 Q -(<a href="../html3/libarchi)0 48 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E(library)0 60 Q(.)-.65 E(<h3 id="B)36 72 Q -(UGS">)-.1 E 0 Cg EP -%%Page: 70 70 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.1(BU)36 12 S(GS).1 E(</h3>)36 24 Q -(The cpio archi)0 36 Q .3 -.15(ve f)-.25 H(ormat has se).15 E -.15(ve) --.25 G(ral basic limitations:).15 E -(It does not store user and group names, only numbers.)0 48 Q -(As a result, it cannot be reliably used to transfer)0 60 Q -(\214les between systems with dissimilar user and group numbering.)0 72 -Q 0 Cg EP -%%Page: 71 71 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Older cpio formats limit the user and group numbers to)0 12 Q -(16 or 18 bits, which is insuf)0 24 Q(\214cient for modern systems.)-.25 -E(The cpio archi)0 36 Q .3 -.15(ve f)-.25 H -(ormats cannot support \214les o).15 E -.15(ve)-.15 G 2.5(r4g).15 G(ig) --2.5 E(abytes,)-.05 E -.15(ex)0 48 S(cept for the).15 E -.74(``)0 60 S -(odc').74 E(')-.74 E -.25(va)0 72 S -(riant, which can support \214les up to 8 gig).25 E(abytes.)-.05 E 0 Cg -EP -%%Page: 72 72 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</body>)0 12 Q(</html>)0 24 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:40 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">BSDCPIO(1) FreeBSD General Commands Manual +BSDCPIO(1)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>cpio</b> — copy files +to and from archives</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:15%;"><b>cpio</b> {<b>−i</b>} +[<i>options</i>] [<i>pattern ...</i>] +[<i>< archive</i>] <b><br> +cpio</b> {<b>−o</b>} [<i>options</i>] <i>< +name-list</i> [<i>> archive</i>] <b><br> +cpio</b> {<b>−p</b>} [<i>options</i>] <i>dest-dir < +name-list</i></p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;"><b>cpio</b> copies files between +archives and directories. This implementation can extract +from tar, pax, cpio, zip, jar, ar, and ISO 9660 cdrom images +and can create tar, pax, cpio, ar, and shar archives.</p> + +<p style="margin-left:8%; margin-top: 1em">The first option +to <b>cpio</b> is a mode indicator from the following +list:</p> + +<p valign="top"><b>−i</b></p> + +<p style="margin-left:20%; margin-top: 1em">Input. Read an +archive from standard input (unless overriden) and extract +the contents to disk or (if the <b>−t</b> option is +specified) list the contents to standard output. If one or +more file patterns are specified, only files matching one of +the patterns will be extracted.</p> + +<p valign="top"><b>−o</b></p> + +<p style="margin-left:20%; margin-top: 1em">Output. Read a +list of filenames from standard input and produce a new +archive on standard output (unless overriden) containing the +specified items.</p> + +<p valign="top"><b>−p</b></p> + +<p style="margin-left:20%; margin-top: 1em">Pass-through. +Read a list of filenames from standard input and copy the +files to the specified directory.</p> + +<p style="margin-top: 1em" valign="top"><b>OPTIONS</b></p> + +<p style="margin-left:8%;">Unless specifically stated +otherwise, options are applicable in all operating +modes.</p> + + +<p style="margin-top: 1em" valign="top"><b>−0</b></p> + +<p style="margin-left:20%; margin-top: 1em">Read filenames +separated by NUL characters instead of newlines. This is +necessary if any of the filenames being read might contain +newlines.</p> + + +<p style="margin-top: 1em" valign="top"><b>−A</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Append to the specified archive. (Not yet implemented.)</p> + + +<p style="margin-top: 1em" valign="top"><b>−a</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o and p modes) +Reset access times on files after they are read.</p> + + +<p style="margin-top: 1em" valign="top"><b>−B</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Block output to records of 5120 bytes.</p> + +<p style="margin-top: 1em" valign="top"><b>−C</b> +<i>size</i></p> + +<p style="margin-left:20%;">(o mode only) Block output to +records of <i>size</i> bytes.</p> + + +<p style="margin-top: 1em" valign="top"><b>−c</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Use the old POSIX portable character format. Equivalent to +<b>−-format</b> <i>odc</i>.</p> + + +<p style="margin-top: 1em" valign="top"><b>−d</b></p> + +<p style="margin-left:20%; margin-top: 1em">(i and p modes) +Create directories as necessary.</p> + +<p style="margin-top: 1em" valign="top"><b>−E</b> +<i>file</i></p> + +<p style="margin-left:20%;">(i mode only) Read list of file +name patterns from <i>file</i> to list and extract.</p> + +<p style="margin-top: 1em" valign="top"><b>−F</b> +<i>file</i></p> + +<p style="margin-left:20%;">Read archive from or write +archive to <i>file</i>.</p> + +<p style="margin-top: 1em" valign="top"><b>−f</b> +<i>pattern</i></p> + +<p style="margin-left:20%;">(i mode only) Ignore files that +match <i>pattern</i>.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-format</b> +<i>format</i></p> + +<p style="margin-left:20%;">(o mode only) Produce the +output archive in the specified format. Supported formats +include:</p> + +<p style="margin-top: 1em" valign="top"><i>cpio</i></p> + +<p style="margin-left:34%; margin-top: 1em">Synonym for +<i>odc</i>.</p> + +<p valign="top"><i>newc</i></p> + +<p style="margin-left:34%; margin-top: 1em">The SVR4 +portable cpio format.</p> + +<p valign="top"><i>odc</i></p> + +<p style="margin-left:34%; margin-top: 1em">The old POSIX.1 +portable octet-oriented cpio format.</p> + +<p valign="top"><i>pax</i></p> + +<p style="margin-left:34%; margin-top: 1em">The POSIX.1 pax +format, an extension of the ustar format.</p> + +<p valign="top"><i>ustar</i></p> + +<p style="margin-left:34%; margin-top: 1em">The POSIX.1 tar +format.</p> + +<p style="margin-left:20%; margin-top: 1em">The default +format is <i>odc</i>. See libarchive_formats(5) for more +complete information about the formats currently supported +by the underlying libarchive(3) library.</p> + +<p style="margin-top: 1em" valign="top"><b>−H</b> +<i>format</i></p> + +<p style="margin-left:20%;">Synonym for +<b>−-format</b>.</p> + +<p style="margin-top: 1em" valign="top"><b>−h</b>, +<b>−-help</b></p> + +<p style="margin-left:20%;">Print usage information.</p> + +<p style="margin-top: 1em" valign="top"><b>−I</b> +<i>file</i></p> + +<p style="margin-left:20%;">Read archive from +<i>file</i>.</p> + + +<p style="margin-top: 1em" valign="top"><b>−i</b></p> + +<p style="margin-left:20%; margin-top: 1em">Input mode. See +above for description.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-insecure</b></p> + +<p style="margin-left:20%;">(i and p mode only) Disable +security checks during extraction or copying. This allows +extraction via symbolic links and path names containing +‘..’ in the name.</p> + + +<p style="margin-top: 1em" valign="top"><b>−J</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Compress the file with xz-compatible compression before +writing it. In input mode, this option is ignored; xz +compression is recognized automatically on input.</p> + + +<p style="margin-top: 1em" valign="top"><b>−j</b></p> + +<p style="margin-left:20%; margin-top: 1em">Synonym for +<b>−y</b>.</p> + + +<p style="margin-top: 1em" valign="top"><b>−L</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o and p modes) +All symbolic links will be followed. Normally, symbolic +links are archived and copied as symbolic links. With this +option, the target of the link will be archived or copied +instead.</p> + + +<p style="margin-top: 1em" valign="top"><b>−l</b></p> + +<p style="margin-left:20%; margin-top: 1em">(p mode only) +Create links from the target directory to the original +files, instead of copying.</p> + + +<p style="margin-top: 1em" valign="top"><b>−lzma</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Compress the file with lzma-compatible compression before +writing it. In input mode, this option is ignored; lzma +compression is recognized automatically on input.</p> + + +<p style="margin-top: 1em" valign="top"><b>−m</b></p> + +<p style="margin-left:20%; margin-top: 1em">(i and p modes) +Set file modification time on created files to match those +in the source.</p> + + +<p style="margin-top: 1em" valign="top"><b>−n</b></p> + +<p style="margin-left:20%; margin-top: 1em">(i mode, only +with <b>−t</b>) Display numeric uid and gid. By +default, <b>cpio</b> displays the user and group names when +they are provided in the archive, or looks up the user and +group names in the system password database.</p> + + +<p style="margin-top: 1em" valign="top"><b>−no-preserve-owner</b></p> + +<p style="margin-left:20%;">(i mode only) Do not attempt to +restore file ownership. This is the default when run by +non-root users.</p> + +<p style="margin-top: 1em" valign="top"><b>−O</b> +<i>file</i></p> + +<p style="margin-left:20%;">Write archive to +<i>file</i>.</p> + + +<p style="margin-top: 1em" valign="top"><b>−o</b></p> + +<p style="margin-left:20%; margin-top: 1em">Output mode. +See above for description.</p> + + +<p style="margin-top: 1em" valign="top"><b>−p</b></p> + +<p style="margin-left:20%; margin-top: 1em">Pass-through +mode. See above for description.</p> + + +<p style="margin-top: 1em" valign="top"><b>−preserve-owner</b></p> + +<p style="margin-left:20%;">(i mode only) Restore file +ownership. This is the default when run by the root +user.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-quiet</b></p> + +<p style="margin-left:20%;">Suppress unnecessary +messages.</p> + +<p style="margin-top: 1em" valign="top"><b>−R</b> [ +<br> +user][ <br> +:][ <br> +group]</p> + +<p style="margin-left:20%;">Set the owner and/or group on +files in the output. If group is specified with no user (for +example, <b>−R</b> <i>:wheel</i>) then the group will +be set but not the user. If the user is specified with a +trailing colon and no group (for example, <b>−R</b> +<i>root:</i>) then the group will be set to the user’s +default group. If the user is specified with no trailing +colon, then the user will be set but not the group. In +<b>−i</b> and <b>−p</b> modes, this option can +only be used by the super-user. (For compatibility, a period +can be used in place of the colon.)</p> + + +<p style="margin-top: 1em" valign="top"><b>−r</b></p> + +<p style="margin-left:20%; margin-top: 1em">(All modes.) +Rename files interactively. For each file, a prompt is +written to <i>/dev/tty</i> containing the name of the file +and a line is read from <i>/dev/tty</i>. If the line read is +blank, the file is skipped. If the line contains a single +period, the file is processed normally. Otherwise, the line +is taken to be the new name of the file.</p> + + +<p style="margin-top: 1em" valign="top"><b>−t</b></p> + +<p style="margin-left:20%; margin-top: 1em">(i mode only) +List the contents of the archive to stdout; do not restore +the contents to disk.</p> + + +<p style="margin-top: 1em" valign="top"><b>−u</b></p> + +<p style="margin-left:20%; margin-top: 1em">(i and p modes) +Unconditionally overwrite existing files. Ordinarily, an +older file will not overwrite a newer file on disk.</p> + + +<p style="margin-top: 1em" valign="top"><b>−v</b></p> + +<p style="margin-left:20%; margin-top: 1em">Print the name +of each file to stderr as it is processed. With +<b>−t</b>, provide a detailed listing of each +file.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-version</b></p> + +<p style="margin-left:20%;">Print the program version +information and exit.</p> + + +<p style="margin-top: 1em" valign="top"><b>−y</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Compress the archive with bzip2-compatible compression +before writing it. In input mode, this option is ignored; +bzip2 compression is recognized automatically on input.</p> + + +<p style="margin-top: 1em" valign="top"><b>−Z</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Compress the archive with compress-compatible compression +before writing it. In input mode, this option is ignored; +compression is recognized automatically on input.</p> + + +<p style="margin-top: 1em" valign="top"><b>−z</b></p> + +<p style="margin-left:20%; margin-top: 1em">(o mode only) +Compress the archive with gzip-compatible compression before +writing it. In input mode, this option is ignored; gzip +compression is recognized automatically on input.</p> + + +<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p> + +<p style="margin-left:8%;">The following environment +variables affect the execution of <b>cpio</b>:</p> + +<p style="margin-top: 1em" valign="top">LANG</p> + +<p style="margin-left:25%; margin-top: 1em">The locale to +use. See environ(7) for more information.</p> + +<p style="margin-top: 1em" valign="top">TZ</p> + +<p style="margin-left:25%; margin-top: 1em">The timezone to +use when displaying dates. See environ(7) for more +information.</p> + +<p style="margin-top: 1em" valign="top"><b>EXIT +STATUS</b></p> + +<p style="margin-left:8%;">The <b>cpio</b> utility +exits 0 on success, and >0 if an error +occurs.</p> + + +<p style="margin-top: 1em" valign="top"><b>EXAMPLES</b></p> + +<p style="margin-left:8%;">The <b>cpio</b> command is +traditionally used to copy file heirarchies in conjunction +with the find(1) command. The first example here simply +copies all files from <i>src</i> to <i>dest</i>:</p> + +<p style="margin-left:17%;"><b>find</b> <i>src</i> | +<b>cpio −pmud</b> <i>dest</i></p> + +<p style="margin-left:8%; margin-top: 1em">By carefully +selecting options to the find(1) command and combining it +with other standard utilities, it is possible to exercise +very fine control over which files are copied. This next +example copies files from <i>src</i> to <i>dest</i> that are +more than 2 days old and whose names match a particular +pattern:</p> + +<p style="margin-left:17%;"><b>find</b> <i>src</i> +<b>−mtime</b> <i>+2</i> | <b>grep foo[bar]</b> | +<b>cpio −pdmu</b> <i>dest</i></p> + +<p style="margin-left:8%; margin-top: 1em">This example +copies files from <i>src</i> to <i>dest</i> that are more +than 2 days old and which contain the word +‘‘</p> + +<p valign="top">foobar ’’:</p> + +<p style="margin-left:17%;"><b>find</b> <i>src</i> +<b>−mtime</b> <i>+2</i> | <b>xargs grep -l foobar</b> +| <b>cpio −pdmu</b> <i>dest</i></p> + + +<p style="margin-top: 1em" valign="top"><b>COMPATIBILITY</b></p> + +<p style="margin-left:8%;">The mode options i, o, and p and +the options a, B, c, d, f, l, m, r, t, u, and v comply with +SUSv2.</p> + +<p style="margin-left:8%; margin-top: 1em">The old POSIX.1 +standard specified that only <b>−i</b>, +<b>−o</b>, and <b>−p</b> were interpreted as +command-line options. Each took a single argument of a list +of modifier characters. For example, the standard syntax +allows <b>−imu</b> but does not support +<b>−miu</b> or <b>−i −m −u</b>, +since <i>m</i> and <i>u</i> are only modifiers to +<b>−i</b>, they are not command-line options in their +own right. The syntax supported by this implementation is +backwards-compatible with the standard. For best +compatibility, scripts should limit themselves to the +standard syntax.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">bzip2(1), tar(1), gzip(1), +mt(1), pax(1), libarchive(3), cpio(5), +libarchive-formats(5), tar(5)</p> + + +<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p> + +<p style="margin-left:8%;">There is no current POSIX +standard for the cpio command; it appeared in ISO/IEC +9945-1:1996 (‘‘POSIX.1’’) but was +dropped from IEEE Std 1003.1-2001 +(‘‘POSIX.1’’).</p> + +<p style="margin-left:8%; margin-top: 1em">The cpio, ustar, +and pax interchange file formats are defined by IEEE Std +1003.1-2001 (‘‘POSIX.1’’) for the +pax command.</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The original <b>cpio</b> and +<b>find</b> utilities were written by Dick Haight while +working in AT&T’s Unix Support Group. They first +appeared in 1977 in PWB/UNIX 1.0, the +‘‘Programmer’s Work Bench’’ +system developed for use within AT&T. They were first +released outside of AT&T as part of System III Unix in +1981. As a result, <b>cpio</b> actually predates <b>tar</b>, +even though it was not well-known outside of AT&T until +some time later.</p> + +<p style="margin-left:8%; margin-top: 1em">This is a +complete re-implementation based on the libarchive(3) +library.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">The cpio archive format has +several basic limitations: It does not store user and group +names, only numbers. As a result, it cannot be reliably used +to transfer files between systems with dissimilar user and +group numbering. Older cpio formats limit the user and group +numbers to 16 or 18 bits, which is insufficient for modern +systems. The cpio archive formats cannot support files over +4 gigabytes, except for the ‘‘odc’’ +variant, which can support files up to 8 gigabytes.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +December 21, 2007 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/bsdtar.1.html b/archivers/libarchive/files/doc/html/bsdtar.1.html index 5e530104e2a..b26c43627de 100644 --- a/archivers/libarchive/files/doc/html/bsdtar.1.html +++ b/archivers/libarchive/files/doc/html/bsdtar.1.html @@ -1,1839 +1,1014 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:18 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 167 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(Oct 12, 2009 BSDT)74.5 48 Q(AR 1)-.93 E(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>tar</b>)0 48 Q 2.5(-m)0 60 S -(anipulate tape archi)-2.5 E -.15(ve)-.25 G(s).15 E(<h3 id="SYNOPSIS">) -36 72 Q 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(SYNOPSIS)36 12 Q(</h3>)36 24 Q(<b>tar</b>)0 36 Q -([<i></i><i>b)0 48 Q(undled-\215ags </i><i>ar)-.2 E -(gs<.blm Pp</i><i> ></i>])-.18 E([<i></i><i>\214le<.blm Pp</i>\ -<i> | </i><i></i><i>pattern<.blm Pp</i><i> ...</i><i> ></i><i> &g\ -t;</i>])0 60 Q(<b>tar</b>)0 72 Q 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF({<b>\255</b><b>c</b>})0 12 Q -([<i></i><i>options</i>])0 24 Q -([<i></i><i>\214les</i><i> |</i><i></i><i> directories</i>])0 36 Q -(<b>tar</b>)0 48 Q({<b>\255</b><b>r</b><b> |</b><b> \255</b><b>u</b>})0 -60 Q(<b>\255</b><b>f</b><i></i><i> archi)0 72 Q -.15(ve)-.25 G -(-\214le</i>).15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF([<i></i><i>options</i>])0 12 Q -([<i></i><i>\214les</i><i> |</i><i></i><i> directories</i>])0 24 Q -(<b>tar</b>)0 36 Q({<b>\255</b><b>t</b><b> |</b><b> \255</b><b>x</b>})0 -48 Q([<i></i><i>options</i>])0 60 Q([<i></i><i>patterns</i>])0 72 Q 0 Cg -EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="DESCRIPTION">)36 12 Q(DESCRIPTION)36 24 -Q(</h3>)36 36 Q(<b>tar</b>)0 48 Q -(creates and manipulates streaming archi)0 60 Q .3 -.15(ve \214)-.25 H -(les.).15 E(This implementation can e)0 72 Q(xtract from tar)-.15 E 2.5 -(,p)-.4 G(ax, cpio, zip, jar)-2.5 E 2.5(,a)-.4 G -.4(r,)-2.5 G 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and ISO 9660 cdrom images and can create tar)0 -12 Q 2.5(,p)-.4 G(ax, cpio, ar)-2.5 E(,)-.4 E(and shar archi)0 24 Q -.15 -(ve)-.25 G(s.).15 E(<p>)36 36 Q(The \214rst synopsis form sho)0 48 Q -(ws a)-.25 E -.74(``)0 60 S -.2(bu).74 G(ndled').2 E(')-.74 E(option w)0 -72 Q(ord.)-.1 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This usage is pro)0 12 Q -(vided for compatibility with historical implementations.)-.15 E -(See COMP)0 24 Q -1.11(AT)-.92 G(IBILITY belo)1.11 E 2.5(wf)-.25 G -(or details.)-2.5 E(<p>)36 36 Q(The other synopsis forms sho)0 48 Q 2.5 -(wt)-.25 G(he preferred usage.)-2.5 E(The \214rst option to)0 60 Q -(<b>tar</b>)0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(is a mode indicator from the follo)0 12 Q -(wing list:)-.25 E(<dl compact>)0 24 Q(<dt><b>\255</b><b>c</b><dd>)0 36 -Q(Create a ne)0 48 Q 2.5(wa)-.25 G(rchi)-2.5 E .3 -.15(ve c)-.25 H -(ontaining the speci\214ed items.).15 E(<dt><b>\255</b><b>r</b><dd>)0 60 -Q(Lik)0 72 Q(e)-.1 E 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>c</b>,)0 12 Q -.2(bu)0 24 S 2.5 -(tn).2 G .5 -.25(ew e)-2.5 H(ntries are appended to the archi).25 E -.15 -(ve)-.25 G(.).15 E(Note that this only w)0 36 Q -(orks on uncompressed archi)-.1 E -.15(ve)-.25 G 2.5(ss).15 G -(tored in re)-2.5 E(gular \214les.)-.15 E(The)0 48 Q -(<b>\255</b><b>f</b>)0 60 Q(option is required.)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b>\255</b><b>t</b><dd>)0 12 Q(List archi)0 -24 Q .3 -.15(ve c)-.25 H(ontents to stdout.).15 E -(<dt><b>\255</b><b>u</b><dd>)0 36 Q(Lik)0 48 Q(e)-.1 E -(<b>\255</b><b>r</b>,)0 60 Q -.2(bu)0 72 S 2.5(tn).2 G .5 -.25(ew e)-2.5 -H(ntries are added only if the).25 E 2.5(yh)-.15 G -2.25 -.2(av e)-2.5 H -2.5(am)2.7 G(odi\214cation date)-2.5 E 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ne)0 12 Q -(wer than the corresponding entry in the archi)-.25 E -.15(ve)-.25 G(.) -.15 E(Note that this only w)0 24 Q(orks on uncompressed archi)-.1 E -.15 -(ve)-.25 G 2.5(ss).15 G(tored in re)-2.5 E(gular \214les.)-.15 E(The)0 -36 Q(<b>\255</b><b>f</b>)0 48 Q(option is required.)0 60 Q -(<dt><b>\255</b><b>x</b><dd>)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Extract to disk from the archi)0 12 Q -.15(ve) --.25 G(.).15 E -(If a \214le with the same name appears more than once in the archi)0 24 -Q -.15(ve)-.25 G(,).15 E(each cop)0 36 Q 2.5(yw)-.1 G(ill be e)-2.5 E -(xtracted, with later copies o)-.15 E -.15(ve)-.15 G -(rwriting \(replacing\)).15 E(earlier copies.)0 48 Q(</dl>)0 60 Q(<p>)36 -72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In)0 12 Q(<b>\255</b><b>c</b>,)0 24 Q -(<b>\255</b><b>r</b>,)0 36 Q(or)0 48 Q(<b>\255</b><b>u</b>)0 60 Q -(mode, each speci\214ed \214le or directory is added to the)0 72 Q 0 Cg -EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)0 12 Q .3 -.15(ve i)-.25 H 2.5(nt).15 G -(he order speci\214ed on the command line.)-2.5 E(By def)0 24 Q -(ault, the contents of each directory are also archi)-.1 E -.15(ve)-.25 -G(d.).15 E(<p>)36 36 Q(In e)0 48 Q -(xtract or list mode, the entire command line)-.15 E -(is read and parsed before the archi)0 60 Q .3 -.15(ve i)-.25 H 2.5(so) -.15 G(pened.)-2.5 E -(The pathnames or patterns on the command line indicate)0 72 Q 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(which items in the archi)0 12 Q .3 -.15(ve s) --.25 H(hould be processed.).15 E -.15(Pa)0 24 S -(tterns are shell-style globbing patterns as).15 E(documented in)0 36 Q -(<a href="../html1/tcsh.html">tcsh\(1\)</a>.)0 48 Q(<h3 id="OPTIONS">)36 -60 Q(OPTIONS)36 72 Q 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q -(Unless speci\214cally stated otherwise, options are applicable in)0 24 -Q(all operating modes.)0 36 Q(<dl compact>)0 48 Q -(<p><dt><b></b><b>@</b><code></code><code>archi)0 60 Q -.15(ve)-.25 G -(</code><dd>).15 E(\(c and r mode only\))0 72 Q 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The speci\214ed archi)0 12 Q .3 -.15(ve i)-.25 H -2.5(so).15 G(pened and the entries)-2.5 E -(in it will be appended to the current archi)0 24 Q -.15(ve)-.25 G(.).15 -E(As a simple e)0 36 Q(xample,)-.15 E(<br>)0 48 Q -( )0 60 Q(<code></code><b>Fl</b><b>c\ -</b><b> \255</b><b>f</b><code></code><code> -</code><code></code><code>\ - ne)0 72 Q -(w\214le</code><b></b><b> @</b><code></code><code>original.tar</code>) --.25 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br>)0 12 Q(writes a ne)0 24 Q 2.5(wa)-.25 G -(rchi)-2.5 E .3 -.15(ve t)-.25 H 2.5(os).15 G -(tandard output containing a \214le)-2.5 E(<code></code><code>ne)0 36 Q -(w\214le</code>)-.25 E(and all of the entries from)0 48 Q -(<code></code><code>original.tar</code>.)0 60 Q(In contrast,)0 72 Q 0 Cg -EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br>)0 12 Q -( )0 24 Q(<code></code><b>Fl</b><b>c\ -</b><b> \255</b><b>f</b><code></code><code> -</code><code></code><code>\ - ne)0 36 Q(w\214le</code><code></code><code> original.tar</code>)-.25 E -(<br>)0 48 Q(creates a ne)0 60 Q 2.5(wa)-.25 G(rchi)-2.5 E .3 -.15(ve w) --.25 H(ith only tw).15 E 2.5(oe)-.1 G(ntries.)-2.5 E(Similarly)0 72 Q(,) --.65 E 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br>)0 12 Q -( )0 24 Q(<code></code><b>Fl</b><b>c\ -zf</b><code></code><code> -</code><b> \255</b><b>-format</b><b></b><b> \ -pax</b><b></b><b> @</b><code></code><code>-</code>)0 36 Q(<br>)0 48 Q -(reads an archi)0 60 Q .3 -.15(ve f)-.25 H -(rom standard input \(whose format will be determined).15 E -(automatically\) and con)0 72 Q -.15(ve)-.4 G -(rts it into a gzip-compressed).15 E 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(pax-format archi)0 12 Q .3 -.15(ve o)-.25 H 2.5 -(ns).15 G(tdout.)-2.5 E(In this w)0 24 Q(ay)-.1 E(,)-.65 E(<b>tar</b>)0 -36 Q(can be used to con)0 48 Q -.15(ve)-.4 G(rt archi).15 E -.15(ve)-.25 -G 2.5(sf).15 G(rom one format to another)-2.5 E(.)-.55 E -(<p><dt><b>\255</b><b>b</b><i></i><i> blocksize</i><dd>)0 60 Q -(Specify the block size, in 512-byte records, for tape dri)0 72 Q .3 --.15(ve I)-.25 H(/O.).15 E 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(As a rule, this ar)0 12 Q -(gument is only needed when reading from or writing)-.18 E(to tape dri)0 -24 Q -.15(ve)-.25 G(s, and usually not e).15 E -.15(ve)-.25 G 2.5(nt).15 -G(hen as the def)-2.5 E(ault block size of)-.1 E -(20 records \(10240 bytes\) is v)0 36 Q(ery common.)-.15 E -(<p><dt><b>\255</b><b>C</b><i></i><i> directory</i><dd>)0 48 Q -(In c and r mode, this changes the directory before adding)0 60 Q -(the follo)0 72 Q(wing \214les.)-.25 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(In x mode, change directories after opening the archi)0 12 Q -.15(ve) --.25 G -.2(bu)0 24 S 2.5(tb).2 G(efore e)-2.5 E -(xtracting entries from the archi)-.15 E -.15(ve)-.25 G(.).15 E -(<p><dt><b>\255</b><b>-check-links</b><dd>)0 36 Q -(\(c and r modes only\))0 48 Q(Issue a w)0 60 Q -(arning message unless all links to each \214le are archi)-.1 E -.15(ve) --.25 G(d.).15 E(<p><dt><b>\255</b><b>-chroot</b><dd>)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(x mode only\))0 12 Q -(<b>chroot</b>\(<code></code>\))0 24 Q -(to the current directory after processing an)0 36 Q(y)-.15 E -(<b>\255</b><b>C</b>)0 48 Q(options and before e)0 60 Q(xtracting an) --.15 E 2.5<798c>-.15 G(les.)-2.5 E(<p><dt><b>\255</b><b>-e)0 72 Q -(xclude</b><i></i><i> pattern</i><dd>)-.15 E 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Do not process \214les or directories that match the)0 12 Q -(speci\214ed pattern.)0 24 Q(Note that e)0 36 Q(xclusions tak)-.15 E 2.5 -(ep)-.1 G(recedence o)-2.5 E -.15(ve)-.15 G 2.5(rp).15 G -(atterns or \214lenames)-2.5 E(speci\214ed on the command line.)0 48 Q -(<p><dt><b>\255</b><b>-format</b><i></i><i> format</i><dd>)0 60 Q -(\(c, r)0 72 Q 2.5(,um)-.4 G(ode only\))-2.5 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Use the speci\214ed format for the created archi)0 12 Q -.15(ve)-.25 G -(.).15 E(Supported formats include)0 24 Q -.74(``)0 36 S(cpio').74 E(',) --.74 E -.74(``)0 48 S(pax').74 E(',)-.74 E -.74(``)0 60 S(shar').74 E -(',)-.74 E(and)0 72 Q 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(ustar').74 E('.)-.74 E -(Other formats may also be supported; see)0 24 Q -(<a href="../html5/libarchi)0 36 Q -.15(ve)-.25 G -(-formats.html">libarchi).15 E -.15(ve)-.25 G(-formats\(5\)</a>).15 E -(for more information about currently-supported formats.)0 48 Q -(In r and u modes, when e)0 60 Q(xtending an e)-.15 E(xisting archi)-.15 -E -.15(ve)-.25 G 2.5(,t).15 G(he format speci\214ed)-2.5 E -(here must be compatible with the format of the e)0 72 Q(xisting archi) --.15 E .3 -.15(ve o)-.25 H 2.5(nd).15 G(isk.)-2.5 E 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(<p><dt><b>\255</b><b>f</b><i></i><i> \214le</i><dd>)0 12 Q -(Read the archi)0 24 Q .3 -.15(ve f)-.25 H(rom or write the archi).15 E -.3 -.15(ve t)-.25 H 2.5(ot).15 G(he speci\214ed \214le.)-2.5 E -(The \214lename can be)0 36 Q(<code></code><code>-</code>)0 48 Q -(for standard input or standard output.)0 60 Q -(If not speci\214ed, the def)0 72 Q(ault tape de)-.1 E -(vice will be used.)-.25 E 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(On)0 12 Q(FreeBSD,)0 24 Q(the def)0 36 Q -(ault tape de)-.1 E(vice is)-.25 E(<code></code><code>/de)0 48 Q -(v/sa0</code>.\))-.25 E(<p><dt><b>\255</b><b>H</b><dd>)0 60 Q -(\(c and r mode only\))0 72 Q 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Symbolic links named on the command line will be follo)0 12 Q(wed; the) --.25 E(tar)0 24 Q(get of the link will be archi)-.18 E -.15(ve)-.25 G -(d, not the link itself.).15 E(<p><dt><b>\255</b><b>h</b><dd>)0 36 Q -(\(c and r mode only\))0 48 Q(Synon)0 60 Q(ym for)-.15 E -(<b>\255</b><b>L</b>.)0 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>I</b><dd>)0 12 Q(Synon)0 24 -Q(ym for)-.15 E(<b>\255</b><b>T</b>.)0 36 Q -(<p><dt><b>\255</b><b>-include</b><i></i><i> pattern</i><dd>)0 48 Q(Pro\ -cess only \214les or directories that match the speci\214ed pattern.)0 -60 Q(Note that e)0 72 Q(xclusions speci\214ed with)-.15 E 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>-e)0 12 Q(xclude</b>)-.15 E(tak)0 -24 Q 2.5(ep)-.1 G(recedence o)-2.5 E -.15(ve)-.15 G 2.5(ri).15 G -(nclusions.)-2.5 E(If no inclusions are e)0 36 Q -(xplicitly speci\214ed, all entries are processed by)-.15 E(def)0 48 Q -(ault.)-.1 E(The)0 60 Q(<b>\255</b><b>-include</b>)0 72 Q 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(option is especially useful when \214ltering archi)0 12 Q -.15(ve)-.25 -G(s.).15 E -.15(Fo)0 24 S 2.5(re).15 G(xample, the command)-2.65 E(<br>) -0 36 Q( )0 48 Q(<code></code><b>Fl</\ -b><b>c</b><b> \255</b><b>f</b><code></code><code> ne)0 60 Q -.65(w.)-.25 -G(tar</code><b> \255</b><b>-include='*foo*'</b><b></b><b> @</b><code></\ -code><code>old.tgz</code>).65 E(<br>)0 72 Q 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(creates a ne)0 12 Q 2.5(wa)-.25 G(rchi)-2.5 E --.15(ve)-.25 G(<code></code><code>ne)0 24 Q -.65(w.)-.25 G(tar</code>) -.65 E(containing only the entries from)0 36 Q -(<code></code><code>old.tgz</code>)0 48 Q(containing the string)0 60 Q -(`foo'.)0 72 Q 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>j</b><dd>)0 12 Q -(\(c mode only\))0 24 Q(Compress the resulting archi)0 36 Q .3 -.15 -(ve w)-.25 H(ith).15 E(<a href="../html1/bzip2.html">bzip2\(1\)</a>.)0 -48 Q(In e)0 60 Q(xtract or list modes, this option is ignored.)-.15 E -(Note that, unlik)0 72 Q 2.5(eo)-.1 G(ther)-2.5 E 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>tar</b>)0 12 Q -(implementations, this implementation recognizes bzip2 compression)0 24 -Q(automatically when reading archi)0 36 Q -.15(ve)-.25 G(s.).15 E -(<p><dt><b>\255</b><b>k</b><dd>)0 48 Q(\(x mode only\))0 60 Q(Do not o)0 -72 Q -.15(ve)-.15 G(rwrite e).15 E(xisting \214les.)-.15 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,i)-.4 G 2.5(fa\214) --2.5 G(le appears more than once in an archi)-2.5 E -.15(ve)-.25 G(,).15 -E(later copies will not o)0 24 Q -.15(ve)-.15 G(rwrite earlier copies.) -.15 E(<p><dt><b>\255</b><b>-k)0 36 Q(eep-ne)-.1 E(wer)-.25 E -(-\214les</b><dd>)-.2 E(\(x mode only\))0 48 Q(Do not o)0 60 Q -.15(ve) --.15 G(rwrite e).15 E(xisting \214les that are ne)-.15 E(wer than the) --.25 E -.15(ve)0 72 S(rsions appearing in the archi).15 E .3 -.15(ve b) --.25 H(eing e).15 E(xtracted.)-.15 E 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>L</b><dd>)0 12 Q -(\(c and r mode only\))0 24 Q(All symbolic links will be follo)0 36 Q -(wed.)-.25 E(Normally)0 48 Q 2.5(,s)-.65 G(ymbolic links are archi)-2.5 -E -.15(ve)-.25 G 2.5(da).15 G 2.5(ss)-2.5 G(uch.)-2.5 E -.4(Wi)0 60 S -(th this option, the tar).4 E(get of the link will be archi)-.18 E -.15 -(ve)-.25 G 2.5(di).15 G(nstead.)-2.5 E(<p><dt><b>\255</b><b>l</b><dd>)0 -72 Q 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This is a synon)0 12 Q(ym for the)-.15 E -(<b>\255</b><b>-check-links</b>)0 24 Q(option.)0 36 Q -(<p><dt><b>\255</b><b>m</b><dd>)0 48 Q(\(x mode only\))0 60 Q(Do not e)0 -72 Q(xtract modi\214cation time.)-.15 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(By def)0 12 Q -(ault, the modi\214cation time is set to the time stored in the archi) --.1 E -.15(ve)-.25 G(.).15 E(<p><dt><b>\255</b><b>n</b><dd>)0 24 Q -(\(c, r)0 36 Q 2.5(,um)-.4 G(odes only\))-2.5 E(Do not recursi)0 48 Q --.15(ve)-.25 G(ly archi).15 E .3 -.15(ve t)-.25 H -(he contents of directories.).15 E(<p><dt><b>\255</b><b>-ne)0 60 Q -(wer</b><i></i><i> date</i><dd>)-.25 E(\(c, r)0 72 Q 2.5(,um)-.4 G -(odes only\))-2.5 E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Only include \214les and directories ne)0 12 Q -(wer than the speci\214ed date.)-.25 E(This compares ctime entries.)0 24 -Q(<p><dt><b>\255</b><b>-ne)0 36 Q(wer)-.25 E -(-mtime</b><i></i><i> date</i><dd>)-.2 E(\(c, r)0 48 Q 2.5(,um)-.4 G -(odes only\))-2.5 E(Lik)0 60 Q(e)-.1 E(<b>\255</b><b>-ne)0 72 Q -(wer</b>,)-.25 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(ex)0 12 S -(cept it compares mtime entries instead of ctime entries.).15 E -(<p><dt><b>\255</b><b>-ne)0 24 Q(wer)-.25 E -(-than</b><code></code><code> \214le</code><dd>)-.2 E(\(c, r)0 36 Q 2.5 -(,um)-.4 G(odes only\))-2.5 E(Only include \214les and directories ne)0 -48 Q(wer than the speci\214ed \214le.)-.25 E -(This compares ctime entries.)0 60 Q(<p><dt><b>\255</b><b>-ne)0 72 Q -(wer)-.25 E(-mtime-than</b><code></code><code> \214le</code><dd>)-.2 E 0 -Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(c, r)0 12 Q 2.5(,um)-.4 G(odes only\))-2.5 E -(Lik)0 24 Q(e)-.1 E(<b>\255</b><b>-ne)0 36 Q(wer)-.25 E(-than</b>,)-.2 E --.15(ex)0 48 S(cept it compares mtime entries instead of ctime entries.) -.15 E(<p><dt><b>\255</b><b>-nodump</b><dd>)0 60 Q -(\(c and r modes only\))0 72 Q 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Honor the nodump \214le \215ag by skipping this \214le.)0 12 Q -(<p><dt><b>\255</b><b>-null</b><dd>)0 24 Q(\(use with)0 36 Q -(<b>\255</b><b>I</b>,)0 48 Q(<b>\255</b><b>T</b>,)0 60 Q(or)0 72 Q 0 Cg -EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>X</b>\))0 12 Q -(Filenames or patterns are separated by null characters,)0 24 Q -(not by ne)0 36 Q(wlines.)-.25 E -(This is often used to read \214lenames output by the)0 48 Q -(<b>\255</b><b>print0</b>)0 60 Q(option to)0 72 Q 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/\214nd.html">\214nd\(1\)</a>.) -0 12 Q(<p><dt><b>\255</b><b>-numeric-o)0 24 Q(wner</b><dd>)-.25 E -(\(x mode only\))0 36 Q -(Ignore symbolic user and group names when restoring archi)0 48 Q -.15 -(ve)-.25 G 2.5(st).15 G 2.5(od)-2.5 G(isk,)-2.5 E -(only numeric uid and gid v)0 60 Q(alues will be obe)-.25 E(yed.)-.15 E -(<p><dt><b>\255</b><b>O</b><dd>)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(x, t modes only\))0 12 Q(In e)0 24 Q(xtract \ -\(-x\) mode, \214les will be written to standard out rather than)-.15 E -(being e)0 36 Q(xtracted to disk.)-.15 E(In list \(-t\) mode, the \214l\ -e listing will be written to stderr rather than)0 48 Q -(the usual stdout.)0 60 Q(<p><dt><b>\255</b><b>o</b><dd>)0 72 Q 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(x mode\))0 12 Q -(Use the user and group of the user running the program rather)0 24 Q -(than those speci\214ed in the archi)0 36 Q -.15(ve)-.25 G(.).15 E -(Note that this has no signi\214cance unless)0 48 Q(<b>\255</b><b>p</b>) -0 60 Q(is speci\214ed, and the program is being run by the root user)0 -72 Q(.)-.55 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In this case, the \214le modes and \215ags from) -0 12 Q(the archi)0 24 Q .3 -.15(ve w)-.25 H(ill be restored, b).15 E -(ut A)-.2 E(CLs or o)-.4 E(wner information in)-.25 E(the archi)0 36 Q -.3 -.15(ve w)-.25 H(ill be discarded.).15 E -(<p><dt><b>\255</b><b>o</b><dd>)0 48 Q(\(c, r)0 60 Q 2.5(,um)-.4 G -(ode\))-2.5 E 2.5(As)0 72 S(ynon)-2.5 E(ym for)-.15 E 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>-format</b><i></i><i> ustar</i>)0 -12 Q(<p><dt><b>\255</b><b>-one-\214le-system</b><dd>)0 24 Q(\(c, r)0 36 -Q 2.5(,a)-.4 G(nd u modes\))-2.5 E(Do not cross mount points.)0 48 Q -(<p><dt><b>\255</b><b>-options</b><i></i><i> options</i><dd>)0 60 Q -(Select optional beha)0 72 Q(viors for particular modules.)-.2 E 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The ar)0 12 Q(gument is a te)-.18 E -(xt string containing comma-separated)-.15 E -.1(ke)0 24 S(yw)-.05 E -(ords and v)-.1 E(alues.)-.25 E -(These are passed to the modules that handle particular)0 36 Q -(formats to control ho)0 48 Q 2.5(wt)-.25 G(hose formats will beha)-2.5 -E -.15(ve)-.2 G(.).15 E(Each option has one of the follo)0 60 Q -(wing forms:)-.25 E(<dl compact>)0 72 Q 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><i></i><i>k)0 12 Q -.15(ey)-.1 G(=v).15 E -(alue</i><dd>)-.25 E(The k)0 24 Q .3 -.15(ey w)-.1 H -(ill be set to the speci\214ed v).15 E(alue in e)-.25 E -.15(ve)-.25 G -(ry module that supports it.).15 E(Modules that do not support this k)0 -36 Q .3 -.15(ey w)-.1 H(ill ignore it.).15 E(<dt><i></i><i>k)0 48 Q -.15 -(ey)-.1 G(</i><dd>).15 E(The k)0 60 Q .3 -.15(ey w)-.1 H -(ill be enabled in e).15 E -.15(ve)-.25 G(ry module that supports it.) -.15 E(This is equi)0 72 Q -.25(va)-.25 G(lent to).25 E 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>k)0 12 Q -.15(ey)-.1 G -(</i><b></b><b>=1</b>.).15 E(<dt><i></i><i>!k)0 24 Q -.15(ey)-.1 G -(</i><dd>).15 E(The k)0 36 Q .3 -.15(ey w)-.1 H(ill be disabled in e).15 -E -.15(ve)-.25 G(ry module that supports it.).15 E -(<dt><i></i><i>module:k)0 48 Q -.15(ey)-.1 G(=v).15 E -(alue</i><i></i>,<i> module:k)-.25 E -.15(ey)-.1 G -(</i><i></i>,<i> module:!k).15 E -.15(ey)-.1 G(</i><dd>).15 E(As abo)0 -60 Q -.15(ve)-.15 G 2.5(,b).15 G(ut the corresponding k)-2.7 E .3 -.15 -(ey a)-.1 H(nd v).15 E(alue will be pro)-.25 E(vided)-.15 E -(only to modules whose name matches)0 72 Q 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>module</i>.)0 12 Q(</dl>)0 24 Q -(The currently supported modules and k)0 36 Q -.15(ey)-.1 G 2.5(sa).15 G -(re:)-2.5 E(<dl compact>)0 48 Q(<dt><b></b><b>iso9660:joliet</b><dd>)0 -60 Q(Support Joliet e)0 72 Q(xtensions.)-.15 E 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This is enabled by def)0 12 Q(ault, use)-.1 E -(<b></b><b>!joliet</b>)0 24 Q(or)0 36 Q(<b></b><b>iso9660:!joliet</b>)0 -48 Q(to disable.)0 60 Q(<dt><b></b><b>iso9660:rockridge</b><dd>)0 72 Q 0 -Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Support Rock Ridge e)0 12 Q(xtensions.)-.15 E -(This is enabled by def)0 24 Q(ault, use)-.1 E(<b></b><b>!rockridge</b>) -0 36 Q(or)0 48 Q(<b></b><b>iso9660:!rockridge</b>)0 60 Q(to disable.)0 -72 Q 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b></b><b>gzip:compression-le)0 12 Q -.15 -(ve)-.25 G(l</b><dd>).15 E 2.5(Ad)0 24 S(ecimal inte)-2.5 E -(ger from 0 to 9 specifying the gzip compression le)-.15 E -.15(ve)-.25 -G(l.).15 E(<dt><b></b><b>xz:compression-le)0 36 Q -.15(ve)-.25 G -(l</b><dd>).15 E 2.5(Ad)0 48 S(ecimal inte)-2.5 E -(ger from 0 to 9 specifying the xz compression le)-.15 E -.15(ve)-.25 G -(l.).15 E(<dt><b></b><b>mtree:</b><i></i><i>k)0 60 Q -.15(ey)-.1 G -.1 -(wo).15 G(rd</i><dd>).1 E(The mtree writer module allo)0 72 Q -(ws you to specify which mtree k)-.25 E -.15(ey)-.1 G -.1(wo).15 G(rds) -.1 E 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(will be included in the output.)0 12 Q -(Supported k)0 24 Q -.15(ey)-.1 G -.1(wo).15 G(rds include:).1 E -(<b></b><b>cksum</b><b></b>,<b> de)0 36 Q(vice</b><b></b>,<b> \215ags</\ -b><b></b>,<b> gid</b><b></b>,<b> gname</b><b></b>,<b> indent</b>,)-.25 E -(<b></b><b>link</b><b></b>,<b> md5</b><b></b>,<b> mode</b><b></b>,<b> n\ -link</b><b></b>,<b> rmd160</b><b></b>,<b> sha1</b><b></b>,<b> sha256</b\ ->,)0 48 Q(<b></b><b>sha384</b><b></b>,<b> sha512</b><b></b>,<b> size</b\ -><b></b>,<b> time</b><b></b>,<b> uid</b><b></b>,<b> uname</b>.)0 60 Q -(The def)0 72 Q(ault is equi)-.1 E -.25(va)-.25 G(lent to:).25 E 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(de).74 E(vice, \215ags, gid, gna\ -me, link, mode, nlink, size, time, type, uid, uname')-.25 E('.)-.74 E -(<dt><b></b><b>mtree:all</b><dd>)0 24 Q(Enables all of the abo)0 36 Q .3 --.15(ve k)-.15 H -.15(ey).05 G -.1(wo).15 G(rds.).1 E -1.1(Yo)0 48 S 2.5 -(uc)1.1 G(an also use)-2.5 E(<b></b><b>mtree:!all</b>)0 60 Q -(to disable all k)0 72 Q -.15(ey)-.1 G -.1(wo).15 G(rds.).1 E 0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt><b></b><b>mtree:use-set</b><dd>)0 12 Q -(Enable generation of)0 24 Q(<b></b><b>/set</b>)0 36 Q -(lines in the output.)0 48 Q(<dt><b></b><b>mtree:indent</b><dd>)0 60 Q -(Produce human-readable output by indenting options and splitting lines) -0 72 Q 0 Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(to \214t into 80 columns.)0 12 Q -(<dt><b></b><b>zip:compression</b>=<i></i><i>type</i><dd>)0 24 Q(Use)0 -36 Q(<i></i><i>type</i>)0 48 Q(as compression method.)0 60 Q -(Supported v)0 72 Q -(alues are store \(uncompressed\) and de\215ate \(gzip algorithm\).)-.25 -E 0 Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(If a pro)0 24 Q -(vided option is not supported by an)-.15 E 2.5(ym)-.15 G(odule, that) --2.5 E(is a f)0 36 Q(atal error)-.1 E(.)-.55 E -(<p><dt><b>\255</b><b>P</b><dd>)0 48 Q(Preserv)0 60 Q 2.5(ep)-.15 G -(athnames.)-2.5 E(By def)0 72 Q -(ault, absolute pathnames \(those that be)-.1 E(gin with a /)-.15 E 0 Cg -EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(character\) ha)0 12 Q .3 -.15(ve t)-.2 H -(he leading slash remo).15 E -.15(ve)-.15 G 2.5(db).15 G -(oth when creating archi)-2.5 E -.15(ve)-.25 G(s).15 E(and e)0 24 Q -(xtracting from them.)-.15 E(Also,)0 36 Q(<b>tar</b>)0 48 Q -(will refuse to e)0 60 Q(xtract archi)-.15 E .3 -.15(ve e)-.25 H -(ntries whose pathnames contain).15 E(<code></code><code>..</code>)0 72 -Q 0 Cg EP -%%Page: 67 67 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(or whose tar)0 12 Q(get directory w)-.18 E -(ould be altered by a symlink.)-.1 E(This option suppresses these beha)0 -24 Q(viors.)-.2 E(<p><dt><b>\255</b><b>p</b><dd>)0 36 Q(\(x mode only\)) -0 48 Q(Preserv)0 60 Q 2.5<658c>-.15 G(le permissions.)-2.5 E -(Attempt to restore the full permissions, including o)0 72 Q(wner)-.25 E -2.5<2c8c>-.4 G(le modes, \214le)-2.5 E 0 Cg EP -%%Page: 68 68 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\215ags and A)0 12 Q(CLs, if a)-.4 E -.25(va)-.2 -G(ilable, for each item e).25 E(xtracted from the archi)-.15 E -.15(ve) --.25 G(.).15 E(By def)0 24 Q(ault, ne)-.1 E(wly-created \214les are o) --.25 E(wned by the user running)-.25 E(<b>,</b>)0 36 Q -(the \214le mode is restored for ne)0 48 Q(wly-created re)-.25 E -(gular \214les, and)-.15 E(all other types of entries recei)0 60 Q .3 --.15(ve d)-.25 H(ef).15 E(ault permissions.)-.1 E(If)0 72 Q 0 Cg EP -%%Page: 69 69 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>tar</b>)0 12 Q(is being run by root, the def) -0 24 Q(ault is to restore the o)-.1 E(wner unless the)-.25 E -(<b>\255</b><b>o</b>)0 36 Q(option is also speci\214ed.)0 48 Q -(<p><dt><b>\255</b><b>q</b><b> \255</b>\(<b>-f)0 60 Q -(ast-read</b><dd>\))-.1 E(\(x and t mode only\))0 72 Q 0 Cg EP -%%Page: 70 70 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Extract or list only the \214rst archi)0 12 Q .3 --.15(ve e)-.25 H(ntry that matches each pattern).15 E -(or \214lename operand.)0 24 Q(Exit as soon as each speci\214ed pattern\ - or \214lename has been matched.)0 36 Q(By def)0 48 Q(ault, the archi) --.1 E .3 -.15(ve i)-.25 H 2.5(sa).15 G -.1(lwa)-2.5 G(ys read to the v) -.1 E(ery end, since)-.15 E -(there can be multiple entries with the same name and, by con)0 60 Q --.15(ve)-.4 G(ntion,).15 E(later entries o)0 72 Q -.15(ve)-.15 G -(rwrite earlier entries.).15 E 0 Cg EP -%%Page: 71 71 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This option is pro)0 12 Q -(vided as a performance optimization.)-.15 E -(<p><dt><b>\255</b><b>S</b><dd>)0 24 Q(\(x mode only\))0 36 Q -(Extract \214les as sparse \214les.)0 48 Q -.15(Fo)0 60 S 2.5(re).15 G --.15(ve)-2.75 G(ry block on disk, check \214rst if it contains only NUL\ -L bytes and seek).15 E -.15(ove)0 72 S 2.5(ri).15 G 2.5(to)-2.5 G -(therwise.)-2.5 E 0 Cg EP -%%Page: 72 72 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This w)0 12 Q(orks similiar to the con)-.1 E -(v=sparse option of dd.)-.4 E -(<p><dt><b>\255</b><b>-strip-components</b><i></i><i> count</i><dd>)0 24 -Q(\(x mode only\))0 36 Q(Remo)0 48 Q .3 -.15(ve t)-.15 H -(he speci\214ed number of leading path elements.).15 E -.15(Pa)0 60 S -(thnames with fe).15 E(wer elements will be silently skipped.)-.25 E -(Note that the pathname is edited after checking inclusion/e)0 72 Q -(xclusion patterns)-.15 E 0 Cg EP -%%Page: 73 73 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.2(bu)0 12 S 2.5(tb).2 G -(efore security checks.)-2.5 E -(<p><dt><b>\255</b><b>s</b><i></i><i> pattern</i><dd>)0 24 Q -(Modify \214le or archi)0 36 Q .3 -.15(ve m)-.25 H -(ember names according to).15 E(<code></code><code>pattern</code>.)0 48 -Q(The pattern has the format)0 60 Q(<i></i><i>/old/ne)0 72 Q -(w/</i>[gps])-.25 E 0 Cg EP -%%Page: 74 74 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(where)0 12 Q(<i></i><i>old</i>)0 24 Q -(is a basic re)0 36 Q(gular e)-.15 E(xpression,)-.15 E(<i></i><i>ne)0 48 -Q(w</i>)-.25 E(is the replacement string of the matched part,)0 60 Q -(and the optional trailing letters modify)0 72 Q 0 Cg EP -%%Page: 75 75 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ho)0 12 Q 2.5(wt)-.25 G -(he replacement is handled.)-2.5 E(If)0 24 Q(<i></i><i>old</i>)0 36 Q -(is not matched, the pattern is skipped.)0 48 Q -.4(Wi)0 60 S(thin).4 E -(<i></i><i>ne)0 72 Q(w</i>,)-.25 E 0 Cg EP -%%Page: 76 76 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(~i)0 12 S 2.5(ss)-2.5 G -(ubstituted with the match, 1 to 9 with the content of)-2.5 E -(the corresponding captured group.)0 24 Q -(The optional trailing g speci\214es that matching should continue)0 36 -Q(after the matched part and stopped on the \214rst unmatched pattern.)0 -48 Q -(The optional trailing s speci\214es that the pattern applies to the v)0 -60 Q(alue)-.25 E(of symbolic links.)0 72 Q 0 Cg EP -%%Page: 77 77 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The optional trailing p speci\214es that after \ -a successful substitution)0 12 Q(the original path name and the ne)0 24 -Q 2.5(wp)-.25 G(ath name should be printed to)-2.5 E(standard error)0 36 -Q(.)-.55 E(<p><dt><b>\255</b><b>T</b><i></i><i> \214lename</i><dd>)0 48 -Q(In x or t mode,)0 60 Q(<b>tar</b>)0 72 Q 0 Cg EP -%%Page: 78 78 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(will read the list of names to be e)0 12 Q -(xtracted from)-.15 E(<code></code><code>\214lename</code>.)0 24 Q -(In c mode,)0 36 Q(<b>tar</b>)0 48 Q(will read names to be archi)0 60 Q --.15(ve)-.25 G 2.5(df).15 G(rom)-2.5 E -(<code></code><code>\214lename</code>.)0 72 Q 0 Cg EP -%%Page: 79 79 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The special name)0 12 Q -.74(``)0 24 S(-C').74 E -(')-.74 E -(on a line by itself will cause the current directory to be changed to)0 -36 Q(the directory speci\214ed on the follo)0 48 Q(wing line.)-.25 E -(Names are terminated by ne)0 60 Q(wlines unless)-.25 E -(<b>\255</b><b>-null</b>)0 72 Q 0 Cg EP -%%Page: 80 80 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(is speci\214ed.)0 12 Q(Note that)0 24 Q -(<b>\255</b><b>-null</b>)0 36 Q -(also disables the special handling of lines containing)0 48 Q -.74(``)0 -60 S(-C').74 E('.)-.74 E(<p><dt><b>\255</b><b>U</b><dd>)0 72 Q 0 Cg EP -%%Page: 81 81 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(x mode only\))0 12 Q -(Unlink \214les before creating them.)0 24 Q -.4(Wi)0 36 S -(thout this option,).4 E(<b>tar</b>)0 48 Q -.15(ove)0 60 S(rwrites e).15 -E(xisting \214les, which preserv)-.15 E(es e)-.15 E(xisting hardlinks.) --.15 E -.4(Wi)0 72 S(th this option, e).4 E -(xisting hardlinks will be brok)-.15 E(en, as will an)-.1 E(y)-.15 E 0 -Cg EP -%%Page: 82 82 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(symlink that w)0 12 Q(ould af)-.1 E -(fect the location of an e)-.25 E(xtracted \214le.)-.15 E(<p><dt><b>\ -\255</b><b>-use-compress-program</b><i></i><i> program</i><dd>)0 24 Q -(Pipe the input \(in x or t mode\) or the output \(in c mode\) through)0 -36 Q(<code></code><code>program</code>)0 48 Q(instead of using the b)0 -60 Q(uiltin compression support.)-.2 E(<p><dt><b>\255</b><b>v</b><dd>)0 -72 Q 0 Cg EP -%%Page: 83 83 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Produce v)0 12 Q(erbose output.)-.15 E -(In create and e)0 24 Q(xtract modes,)-.15 E(<b>tar</b>)0 36 Q -(will list each \214le name as it is read from or written to)0 48 Q -(the archi)0 60 Q -.15(ve)-.25 G(.).15 E(In list mode,)0 72 Q 0 Cg EP -%%Page: 84 84 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>tar</b>)0 12 Q -(will produce output similar to that of)0 24 Q -(<a href="../html1/ls.html">ls\(1\)</a>.)0 36 Q(Additional)0 48 Q -(<b>\255</b><b>v</b>)0 60 Q(options will pro)0 72 Q -(vide additional detail.)-.15 E 0 Cg EP -%%Page: 85 85 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>-v)0 12 Q(ersion</b><dd>) --.15 E(Print v)0 24 Q(ersion of)-.15 E(<b>tar</b>)0 36 Q(and)0 48 Q -(<b>libarchi)0 60 Q -.15(ve)-.25 G(</b>,).15 E(and e)0 72 Q(xit.)-.15 E -0 Cg EP -%%Page: 86 86 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b>\255</b><b>w</b><dd>)0 12 Q -(Ask for con\214rmation for e)0 24 Q -.15(ve)-.25 G(ry action.).15 E -(<p><dt><b>\255</b><b>X</b><i></i><i> \214lename</i><dd>)0 36 Q -(Read a list of e)0 48 Q(xclusion patterns from the speci\214ed \214le.) --.15 E(See)0 60 Q(<b>\255</b><b>-e)0 72 Q(xclude</b>)-.15 E 0 Cg EP -%%Page: 87 87 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(for more information about the handling of e)0 -12 Q(xclusions.)-.15 E(<p><dt><b>\255</b><b>y</b><dd>)0 24 Q -(\(c mode only\))0 36 Q(Compress the resulting archi)0 48 Q .3 -.15 -(ve w)-.25 H(ith).15 E(<a href="../html1/bzip2.html">bzip2\(1\)</a>.)0 -60 Q(In e)0 72 Q(xtract or list modes, this option is ignored.)-.15 E 0 -Cg EP -%%Page: 88 88 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that, unlik)0 12 Q 2.5(eo)-.1 G(ther)-2.5 E -(<b>tar</b>)0 24 Q -(implementations, this implementation recognizes bzip2 compression)0 36 -Q(automatically when reading archi)0 48 Q -.15(ve)-.25 G(s.).15 E -(<p><dt><b>\255</b><b>z</b><dd>)0 60 Q(\(c mode only\))0 72 Q 0 Cg EP -%%Page: 89 89 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Compress the resulting archi)0 12 Q .3 -.15 -(ve w)-.25 H(ith).15 E(<a href="../html1/gzip.html">gzip\(1\)</a>.)0 24 -Q(In e)0 36 Q(xtract or list modes, this option is ignored.)-.15 E -(Note that, unlik)0 48 Q 2.5(eo)-.1 G(ther)-2.5 E(<b>tar</b>)0 60 Q -(implementations, this implementation recognizes gzip compression)0 72 Q -0 Cg EP -%%Page: 90 90 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(automatically when reading archi)0 12 Q -.15(ve) --.25 G(s.).15 E(<p><dt><b>\255</b><b>Z</b><dd>)0 24 Q(\(c mode only\))0 -36 Q(Compress the resulting archi)0 48 Q .3 -.15(ve w)-.25 H(ith).15 E -(<a href="../html1/compress.html">compress\(1\)</a>.)0 60 Q(In e)0 72 Q -(xtract or list modes, this option is ignored.)-.15 E 0 Cg EP -%%Page: 91 91 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that, unlik)0 12 Q 2.5(eo)-.1 G(ther)-2.5 E -(<b>tar</b>)0 24 Q -(implementations, this implementation recognizes compress compression)0 -36 Q(automatically when reading archi)0 48 Q -.15(ve)-.25 G(s.).15 E -(</dl>)0 60 Q(<h3 id="ENVIR)36 72 Q(ONMENT">)-.4 E 0 Cg EP -%%Page: 92 92 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ENVIR)36 12 Q(ONMENT)-.4 E(</h3>)36 24 Q -(The follo)0 36 Q(wing en)-.25 E(vironment v)-.4 E(ariables af)-.25 E -(fect the e)-.25 E -.15(xe)-.15 G(cution of).15 E(<b>:</b>)0 48 Q -(<dl compact>)0 60 Q(<p><dt><code></code><code>LANG</code><dd>)0 72 Q 0 -Cg EP -%%Page: 93 93 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The locale to use.)0 12 Q(See)0 24 Q -(<a href="../html7/en)0 36 Q(viron.html">en)-.4 E(viron\(7\)</a>)-.4 E -(for more information.)0 48 Q(<p><dt><code></code><code>T)0 60 Q -(APE</code><dd>)-.93 E(The def)0 72 Q(ault tape de)-.1 E(vice.)-.25 E 0 -Cg EP -%%Page: 94 94 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>\255</b><b>f</b>)0 24 Q(option o)0 -36 Q -.15(ve)-.15 G(rrides this.).15 E -(<p><dt><code></code><code>TZ</code><dd>)0 48 Q -(The timezone to use when displaying dates.)0 60 Q(See)0 72 Q 0 Cg EP -%%Page: 95 95 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html7/en)0 12 Q(viron.html">en)-.4 E -(viron\(7\)</a>)-.4 E(for more information.)0 24 Q(</dl>)0 36 Q -(<h3 id="FILES">)36 48 Q(FILES)36 60 Q(</h3>)36 72 Q 0 Cg EP -%%Page: 96 96 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q -(<p><dt><code></code><code>/de)0 24 Q(v/sa0</code><dd>)-.25 E(The def)0 -36 Q(ault tape de)-.1 E(vice, if not o)-.25 E -.15(ve)-.15 G -(rridden by the).15 E(<code></code><code>T)0 48 Q(APE</code>)-.93 E(en)0 -60 Q(vironment v)-.4 E(ariable or the)-.25 E(<b>\255</b><b>f</b>)0 72 Q -0 Cg EP -%%Page: 97 97 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(option.)0 12 Q(</dl>)0 24 Q(<h3 id="EXIT ST)36 -36 Q -1.11(AT)-.93 G(US">)1.11 E(EXIT ST)36 48 Q -1.11(AT)-.93 G(US)1.11 -E(</h3>)36 60 Q(<h3 id="EXAMPLES">)36 72 Q 0 Cg EP -%%Page: 98 98 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(EXAMPLES)36 12 Q(</h3>)36 24 Q(The follo)0 36 Q -(wing creates a ne)-.25 E 2.5(wa)-.25 G(rchi)-2.5 E -.15(ve)-.25 G -(called)0 48 Q(<i></i><i>\214le.tar)0 60 Q(.gz</i>)-.55 E -(that contains tw)0 72 Q 2.5<6f8c>-.1 G(les)-2.5 E 0 Cg EP -%%Page: 99 99 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>source.c</i>)0 12 Q(and)0 24 Q -(<i></i><i>source.h</i>:)0 36 Q(<br>)0 48 Q -( )0 60 Q -(<code></code><b>Fl</b><b>czf</b><code></code><code> \214le.tar)0 72 Q(\ -.gz</code><code></code><code> source.c</code><code></code><code> source\ -.h</code>)-.55 E 0 Cg EP -%%Page: 100 100 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br>)0 12 Q(<p>)36 24 Q 1.6 -.8(To v)0 36 T(ie) -.8 E 2.5(wad)-.25 G(etailed table of contents for this)-2.5 E(archi)0 48 -Q -.15(ve)-.25 G(:).15 E(<br>)0 60 Q -( )0 72 Q 0 Cg EP -%%Page: 101 101 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(<code></code><b>Fl</b><b>tvf</b><code></code><code> \214le.tar)0 12 Q -(.gz</code>)-.55 E(<br>)0 24 Q(<p>)36 36 Q 1.6 -.8(To e)0 48 T -(xtract all entries from the archi).65 E .3 -.15(ve o)-.25 H(n).15 E -(the def)0 60 Q(ault tape dri)-.1 E -.15(ve)-.25 G(:).15 E(<br>)0 72 Q 0 -Cg EP -%%Page: 102 102 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q -(<code></code><b>Fl</b><b>x</b>)0 24 Q(<br>)0 36 Q(<p>)36 48 Q 1.6 -.8 -(To e)0 60 T(xamine the contents of an ISO 9660 cdrom image:).65 E(<br>) -0 72 Q 0 Cg EP -%%Page: 103 103 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q -(<code></code><b>Fl</b><b>tf</b><code></code><code> image.iso</code>)0 -24 Q(<br>)0 36 Q(<p>)36 48 Q 1.6 -.8(To m)0 60 T .3 -.15(ove \214).8 H -(le hierarchies, in).15 E -.2(vo)-.4 G -.1(ke).2 G(<b>tar</b>)0 72 Q 0 -Cg EP -%%Page: 104 104 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(as)0 12 Q(<br>)0 24 Q -( )0 36 Q(<code></code><b>Fl</b><b>c\ -f</b><code></code><code> -</code><b> \255</b><b>C</b><code></code><code\ -> srcdir .</code><code> |</code><b>Fl</b><b> xpf</b><code></code><code>\ - -</code><b> \255</b><b>C</b><code></code><code> destdir</code>)0 48 Q -(<br>)0 60 Q(or more traditionally)0 72 Q 0 Cg EP -%%Page: 105 105 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br>)0 12 Q -( )0 24 Q(<code></code><code>cd</cod\ -e><code> srcdir</code><code> ;</code><b>Fl</b><b> cf</b><code></code><c\ -ode> - .</code><code> |</code>\(<code> cd</code><code> destdir</code><c\ -ode> ;</code><b>Fl</b><b> xpf</b><code></code><code> -</code>\))0 36 Q -(<br>)0 48 Q(<p>)36 60 Q -(In create mode, the list of \214les and directories to be archi)0 72 Q --.15(ve)-.25 G(d).15 E 0 Cg EP -%%Page: 106 106 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(can also include directory change instructions of the form)0 12 Q -(<b></b><b>-C</b><code></code><code>foo/baz</code>)0 24 Q(and archi)0 36 -Q .3 -.15(ve i)-.25 H(nclusions of the form).15 E -(<b></b><b>@</b><code></code><code>archi)0 48 Q -.15(ve)-.25 G -(-\214le</code>.).15 E -.15(Fo)0 60 S 2.5(re).15 G -(xample, the command line)-2.65 E(<br>)0 72 Q 0 Cg EP -%%Page: 107 107 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q(<co\ -de></code><b>Fl</b><b>c</b><b> \255</b><b>f</b><code></code><code> ne)0 -24 Q -.65(w.)-.25 G(tar</code><code></code><code> foo1</code><b></b><b>\ - @</b><code></code><code>old.tgz</code><b></b><b> -C</b><code></code><c\ -ode>/tmp</code><code></code><code> foo2</code>).65 E(<br>)0 36 Q -(will create a ne)0 48 Q 2.5(wa)-.25 G(rchi)-2.5 E -.15(ve)-.25 G -(<code></code><code>ne)0 60 Q -.65(w.)-.25 G(tar</code>.).65 E -(<b>tar</b>)0 72 Q 0 Cg EP -%%Page: 108 108 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(will read the \214le)0 12 Q -(<code></code><code>foo1</code>)0 24 Q -(from the current directory and add it to the output archi)0 36 Q -.15 -(ve)-.25 G(.).15 E(It will then read each entry from)0 48 Q -(<code></code><code>old.tgz</code>)0 60 Q -(and add those entries to the output archi)0 72 Q -.15(ve)-.25 G(.).15 E -0 Cg EP -%%Page: 109 109 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Finally)0 12 Q 2.5(,i)-.65 G 2.5(tw)-2.5 G -(ill switch to the)-2.5 E(<code></code><code>/tmp</code>)0 24 Q -(directory and add)0 36 Q(<code></code><code>foo2</code>)0 48 Q -(to the output archi)0 60 Q -.15(ve)-.25 G(.).15 E(<p>)36 72 Q 0 Cg EP -%%Page: 110 110 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(An input \214le in)0 12 Q -(<a href="../html5/mtree.html">mtree\(5\)</a>)0 24 Q -(format can be used to create an output archi)0 36 Q .3 -.15(ve w)-.25 H -(ith arbitrary o).15 E(wnership,)-.25 E(permissions, or names that dif)0 -48 Q(fer from e)-.25 E(xisting data on disk:)-.15 E(<p>)36 60 Q(<br>)0 -72 Q 0 Cg EP -%%Page: 111 111 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q -(<code></code><code>$</code><code> cat</code><code> input.mtree</code>)0 -24 Q(<br>)0 36 Q( )0 48 Q -(<code></code><code>#mtree</code>)0 60 Q(<br>)0 72 Q 0 Cg EP -%%Page: 112 112 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q(<co\ -de></code><code>usr/bin</code><code> uid=0</code><code> gid=0</code><co\ -de> mode=0755</code><code> type=dir</code>)0 24 Q(<br>)0 36 Q -( )0 48 Q(<code></code><code>usr/bin\ -/ls</code><code> uid=0</code><code> gid=0</code><code> mode=0755</code>\ -<code> type=\214le</code><code> content=myls</code>)0 60 Q(<br>)0 72 Q 0 -Cg EP -%%Page: 113 113 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q(<co\ -de></code><code>$</code><code> tar</code><code> -cvf</code><code> outpu\ -t.tar</code><code> @input.mtree</code>)0 24 Q(<br>)0 36 Q(<p>)36 48 Q -(The)0 60 Q(<b>\255</b><b>-ne)0 72 Q(wer</b>)-.25 E 0 Cg EP -%%Page: 114 114 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>\255</b><b>-ne)0 24 Q(wer)-.25 E -(-mtime</b>)-.2 E(switches accept a v)0 36 Q -(ariety of common date and time speci\214cations, including)-.25 E -.74 -(``)0 48 S(12 Mar 2005 7:14:29pm').74 E(',)-.74 E -.74(``)0 60 S -(2005-03-12 19:14').74 E(',)-.74 E -.74(``)0 72 S 2.5(5m).74 G -(inutes ago')-2.5 E(',)-.74 E 0 Cg EP -%%Page: 115 115 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q -.74(``)0 24 S(19:14 PST May 1').74 E -('.)-.74 E(<p>)36 36 Q(The)0 48 Q(<b>\255</b><b>-options</b>)0 60 Q(ar)0 -72 Q(gument can be used to control v)-.18 E(arious details of archi)-.25 -E .3 -.15(ve g)-.25 H(eneration).15 E 0 Cg EP -%%Page: 116 116 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(or reading.)0 12 Q -.15(Fo)0 24 S 2.5(re).15 G -(xample, you can generate mtree output which only contains)-2.65 E -(<b></b><b>type</b><b></b>,<b> time</b>,)0 36 Q(and)0 48 Q -(<b></b><b>uid</b>)0 60 Q -.1(ke)0 72 S(yw)-.05 E(ords:)-.1 E 0 Cg EP -%%Page: 117 117 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<br>)0 12 Q -( )0 24 Q(<code></code><b>Fl</b><b>c\ -f</b><code></code><code> \214le.tar</code><b> \255</b><b>-format=mtree<\ -/b><b> \255</b><b>-options='!all,type,time,uid'</b><code></code><code> \ -dir</code>)0 36 Q(<br>)0 48 Q(or you can set the compression le)0 60 Q --.15(ve)-.25 G 2.5(lu).15 G(sed by gzip or xz compression:)-2.5 E(<br>)0 -72 Q 0 Cg EP -%%Page: 118 118 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q(<co\ -de></code><b>Fl</b><b>czf</b><code></code><code> \214le.tar</code><b> \ -\255</b><b>-options='compression-le)0 24 Q -.15(ve)-.25 G(l=9'</b>.).15 -E(<br>)0 36 Q -.15(Fo)0 48 S 2.5(rm).15 G(ore details, see the e)-2.5 E -(xplanation of the)-.15 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_set_options</b>\(<code></code>\)).15 E(and)0 72 Q 0 Cg EP -%%Page: 119 119 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_options</b>\(<code></code>\)).15 E -(API calls that are described in)0 24 Q(<a href="../html3/archi)0 36 Q --.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G(_read\(3\)</a>).15 -E(and)0 48 Q(<a href="../html3/archi)0 60 Q -.15(ve)-.25 G -(_write.html">archi).15 E -.15(ve)-.25 G(_write\(3\)</a>.).15 E -(<h3 id="COMP)36 72 Q -1.11(AT)-.92 G(IBILITY">)1.11 E 0 Cg EP -%%Page: 120 120 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(COMP)36 12 Q -1.11(AT)-.92 G(IBILITY)1.11 E -(</h3>)36 24 Q(The b)0 36 Q(undled-ar)-.2 E -(guments format is supported for compatibility)-.18 E -(with historic implementations.)0 48 Q(It consists of an initial w)0 60 -Q(ord \(with no leading - character\) in which)-.1 E -(each character indicates an option.)0 72 Q 0 Cg EP -%%Page: 121 121 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Ar)0 12 Q(guments follo)-.18 E 2.5(wa)-.25 G 2.5 -(ss)-2.5 G(eparate w)-2.5 E(ords.)-.1 E(The order of the ar)0 24 Q -(guments must match the order)-.18 E -(of the corresponding characters in the b)0 36 Q(undled command w)-.2 E -(ord.)-.1 E -.15(Fo)0 48 S 2.5(re).15 G(xample,)-2.65 E(<br>)0 60 Q -( )0 72 Q 0 Cg EP -%%Page: 122 122 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><b>Cm</b><b>tbf</b><b> 32</b><code\ -></code><code> \214le.tar</code>)0 12 Q(<br>)0 24 Q -(speci\214es three \215ags)0 36 Q(<b></b><b>t</b>,)0 48 Q -(<b></b><b>b</b>,)0 60 Q(and)0 72 Q 0 Cg EP -%%Page: 123 123 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>f</b>.)0 12 Q(The)0 24 Q -(<b></b><b>b</b>)0 36 Q(and)0 48 Q(<b></b><b>f</b>)0 60 Q -(\215ags both require ar)0 72 Q(guments,)-.18 E 0 Cg EP -%%Page: 124 124 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(so there must be tw)0 12 Q 2.5(oa)-.1 G -(dditional items)-2.5 E(on the command line.)0 24 Q(The)0 36 Q -(<i></i><i>32</i>)0 48 Q(is the ar)0 60 Q(gument to the)-.18 E -(<b></b><b>b</b>)0 72 Q 0 Cg EP -%%Page: 125 125 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\215ag, and)0 12 Q(<i></i><i>\214le.tar</i>)0 24 -Q(is the ar)0 36 Q(gument to the)-.18 E(<b></b><b>f</b>)0 48 Q(\215ag.)0 -60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 126 126 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The mode options c, r)0 12 Q 2.5(,t)-.4 G 2.5 -(,u)-2.5 G 2.5(,a)-2.5 G(nd x and the options)-2.5 E(b, f, l, m, o, v)0 -24 Q 2.5(,a)-.65 G(nd w comply with SUSv2.)-2.5 E(<p>)36 36 Q -.15(Fo)0 -48 S 2.5(rm).15 G(aximum portability)-2.5 E 2.5(,s)-.65 G -(cripts that in)-2.5 E -.2(vo)-.4 G -.1(ke).2 G(<b>tar</b>)0 60 Q -(should use the b)0 72 Q(undled-ar)-.2 E(gument format abo)-.18 E -.15 -(ve)-.15 G 2.5(,s).15 G(hould limit)-2.5 E 0 Cg EP -%%Page: 127 127 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(themselv)0 12 Q(es to the)-.15 E -(<b></b><b>c</b>,)0 24 Q(<b></b><b>t</b>,)0 36 Q(and)0 48 Q -(<b></b><b>x</b>)0 60 Q(modes, and the)0 72 Q 0 Cg EP -%%Page: 128 128 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>b</b>,)0 12 Q(<b></b><b>f</b>,)0 24 Q -(<b></b><b>m</b>,)0 36 Q(<b></b><b>v</b>,)0 48 Q(and)0 60 Q -(<b></b><b>w</b>)0 72 Q 0 Cg EP -%%Page: 129 129 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(options.)0 12 Q(<p>)36 24 Q -(Additional long options are pro)0 36 Q(vided to impro)-.15 E .3 -.15 -(ve c)-.15 H(ompatibility with other).15 E(tar implementations.)0 48 Q -(<h3 id="SECURITY">)36 60 Q(SECURITY)36 72 Q 0 Cg EP -%%Page: 130 130 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q -(Certain security issues are common to man)0 24 Q 2.5(ya)-.15 G(rchi) --2.5 E(ving programs, including)-.25 E(<b>.</b>)0 36 Q(In particular)0 -48 Q 2.5(,c)-.4 G(arefully-crafted archi)-2.5 E -.15(ve)-.25 G 2.5(sc) -.15 G(an request that)-2.5 E(<b>tar</b>)0 60 Q -.15(ex)0 72 S -(tract \214les to locations outside of the tar).15 E(get directory)-.18 -E(.)-.65 E 0 Cg EP -%%Page: 131 131 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(This can potentially be used to cause unwitting users to o)0 12 Q -.15 -(ve)-.15 G(rwrite).15 E(\214les the)0 24 Q 2.5(yd)-.15 G -(id not intend to o)-2.5 E -.15(ve)-.15 G(rwrite.).15 E(If the archi)0 -36 Q .3 -.15(ve i)-.25 H 2.5(sb).15 G(eing e)-2.5 E -(xtracted by the superuser)-.15 E 2.5(,a)-.4 G .3 -.15(ny \214)-2.5 H -(le).15 E(on the system can potentially be o)0 48 Q -.15(ve)-.15 G -(rwritten.).15 E(There are three w)0 60 Q(ays this can happen.)-.1 E -(Although)0 72 Q 0 Cg EP -%%Page: 132 132 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>tar</b>)0 12 Q(has mechanisms to protect ag)0 -24 Q(ainst each one,)-.05 E(sa)0 36 Q(vvy users should be a)-.2 E -.1 -(wa)-.15 G(re of the implications:).1 E(<ul>)0 48 Q(<p><li>)0 60 Q -(Archi)0 72 Q .3 -.15(ve e)-.25 H(ntries can ha).15 E .3 -.15(ve a)-.2 H -(bsolute pathnames.).15 E 0 Cg EP -%%Page: 133 133 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(By def)0 12 Q(ault,)-.1 E(<b>tar</b>)0 24 Q -(remo)0 36 Q -.15(ve)-.15 G 2.5(st).15 G(he leading)-2.5 E -(<code></code><code>/</code>)0 48 Q -(character from \214lenames before restoring them to guard ag)0 60 Q -(ainst this problem.)-.05 E(<p><li>)0 72 Q 0 Cg EP -%%Page: 134 134 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Archi)0 12 Q .3 -.15(ve e)-.25 H(ntries can ha) -.15 E .3 -.15(ve p)-.2 H(athnames that include).15 E -(<code></code><code>..</code>)0 24 Q(components.)0 36 Q(By def)0 48 Q -(ault,)-.1 E(<b>tar</b>)0 60 Q(will not e)0 72 Q -(xtract \214les containing)-.15 E 0 Cg EP -%%Page: 135 135 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>..</code>)0 12 Q -(components in their pathname.)0 24 Q(<p><li>)0 36 Q(Archi)0 48 Q .3 --.15(ve e)-.25 H(ntries can e).15 E(xploit symbolic links to restore) --.15 E(\214les to other directories.)0 60 Q(An archi)0 72 Q .3 -.15 -(ve c)-.25 H(an restore a symbolic link to another directory).15 E(,) --.65 E 0 Cg EP -%%Page: 136 136 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(then use that link to restore a \214le into that directory)0 12 Q(.) --.65 E 1.6 -.8(To g)0 24 T(uard ag).8 E(ainst this,)-.05 E(<b>tar</b>)0 -36 Q(checks each e)0 48 Q(xtracted path for symlinks.)-.15 E -(If the \214nal path element is a symlink, it will be remo)0 60 Q -.15 -(ve)-.15 G(d).15 E(and replaced with the archi)0 72 Q .3 -.15(ve e)-.25 -H(ntry).15 E(.)-.65 E 0 Cg EP -%%Page: 137 137 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(If)0 12 Q(<b>\255</b><b>U</b>)0 24 Q -(is speci\214ed, an)0 36 Q 2.5(yi)-.15 G -(ntermediate symlink will also be unconditionally remo)-2.5 E -.15(ve) --.15 G(d.).15 E(If neither)0 48 Q(<b>\255</b><b>U</b>)0 60 Q(nor)0 72 Q -0 Cg EP -%%Page: 138 138 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>P</b>)0 12 Q(is speci\214ed,)0 24 -Q(<b>tar</b>)0 36 Q(will refuse to e)0 48 Q(xtract the entry)-.15 E(.) --.65 E(</ul>)0 60 Q 1.6 -.8(To p)0 72 T -(rotect yourself, you should be w).8 E(ary of an)-.1 E 2.5(ya)-.15 G -(rchi)-2.5 E -.15(ve)-.25 G 2.5(st).15 G(hat)-2.5 E 0 Cg EP -%%Page: 139 139 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(come from untrusted sources.)0 12 Q -1.1(Yo)0 24 -S 2.5(us)1.1 G(hould e)-2.5 E(xamine the contents of an archi)-.15 E .3 --.15(ve w)-.25 H(ith).15 E(<br>)0 36 Q -( )0 48 Q -(<code></code><b>Fl</b><b>tf</b><code></code><code> \214lename</code>)0 -60 Q(<br>)0 72 Q 0 Cg EP -%%Page: 140 140 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(before e)0 12 Q(xtraction.)-.15 E -1.1(Yo)0 24 S -2.5(us)1.1 G(hould use the)-2.5 E(<b>\255</b><b>k</b>)0 36 Q -(option to ensure that)0 48 Q(<b>tar</b>)0 60 Q(will not o)0 72 Q -.15 -(ve)-.15 G(rwrite an).15 E 2.5(ye)-.15 G(xisting \214les or the)-2.65 E -0 Cg EP -%%Page: 141 141 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>U</b>)0 12 Q(option to remo)0 24 Q -.3 -.15(ve a)-.15 H .3 -.15(ny p).15 H(re-e).15 E(xisting \214les.)-.15 -E -1.1(Yo)0 36 S 2.5(us)1.1 G(hould generally not e)-2.5 E(xtract archi) --.15 E -.15(ve)-.25 G 2.5(sw).15 G(hile running with super)-2.5 E(-user) --.2 E(pri)0 48 Q(vile)-.25 E(ges.)-.15 E(Note that the)0 60 Q -(<b>\255</b><b>P</b>)0 72 Q 0 Cg EP -%%Page: 142 142 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(option to)0 12 Q(<b>tar</b>)0 24 Q -(disables the security checks abo)0 36 Q .3 -.15(ve a)-.15 H(nd allo).15 -E(ws you to e)-.25 E(xtract)-.15 E(an archi)0 48 Q .3 -.15(ve w)-.25 H -(hile preserving an).15 E 2.5(ya)-.15 G(bsolute pathnames,)-2.5 E -(<code></code><code>..</code>)0 60 Q -(components, or symlinks to other directories.)0 72 Q 0 Cg EP -%%Page: 143 143 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="SEE ALSO">)36 12 Q(SEE ALSO)36 24 Q -(</h3>)36 36 Q(<a href="../html1/bzip2.html">bzip2\(1\)</a>,)0 48 Q -(<a href="../html1/compress.html">compress\(1\)</a>,)0 60 Q -(<a href="../html1/cpio.html">cpio\(1\)</a>,)0 72 Q 0 Cg EP -%%Page: 144 144 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/gzip.html">gzip\(1\)</a>,)0 12 -Q(<a href="../html1/mt.html">mt\(1\)</a>,)0 24 Q -(<a href="../html1/pax.html">pax\(1\)</a>,)0 36 Q -(<a href="../html1/shar)0 48 Q(.html">shar\(1\)</a>,)-.55 E -(<a href="../html3/libarchi)0 60 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>,).15 E(<a href="../html5/libarchi)0 72 Q -.15 -(ve)-.25 G(-formats.html">libarchi).15 E -.15(ve)-.25 G -(-formats\(5\)</a>,).15 E 0 Cg EP -%%Page: 145 145 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html5/tar)0 12 Q -(.html">tar\(5\)</a>)-.55 E(<h3 id="ST)36 24 Q(AND)-.93 E(ARDS">)-.4 E -(ST)36 36 Q(AND)-.93 E(ARDS)-.4 E(</h3>)36 48 Q -(There is no current POSIX standard for the tar command; it appeared)0 -60 Q(in)0 72 Q 0 Cg EP -%%Page: 146 146 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ISO/IEC 9945-1:1996 \(`)2.5 12 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E -.2(bu)0 24 S 2.5 -(tw).2 G(as dropped from)-2.6 E(IEEE Std 1003.1-2001 \(`)2.5 36 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\) .)-.74 E -(The options used by this implementation were de)0 48 Q -.15(ve)-.25 G -(loped by surv).15 E -.15(ey)-.15 G(ing a).15 E(number of e)0 60 Q -(xisting tar implementations as well as the old POSIX speci\214cation) --.15 E(for tar and the current POSIX speci\214cation for pax.)0 72 Q 0 -Cg EP -%%Page: 147 147 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -(The ustar and pax interchange \214le formats are de\214ned by)0 24 Q -(IEEE Std 1003.1-2001 \(`)2.5 36 Q(`<font size="-1">POSIX</font>.1')-.74 -E('\))-.74 E(for the pax command.)0 48 Q(<h3 id="HIST)36 60 Q(OR)-.18 E -(Y">)-.65 E(HIST)36 72 Q(OR)-.18 E(Y)-.65 E 0 Cg EP -%%Page: 148 148 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q(A)0 24 Q(<b>tar</b>)0 36 Q -(command appeared in Se)0 48 Q -.15(ve)-.25 G(nth Edition Unix, which w) -.15 E(as released in January)-.1 E 2.5(,1)-.65 G(979.)-2.5 E(There ha)0 -60 Q .3 -.15(ve b)-.2 H(een numerous other implementations,).15 E(man)0 -72 Q 2.5(yo)-.15 G 2.5(fw)-2.5 G(hich e)-2.5 E -(xtended the \214le format.)-.15 E 0 Cg EP -%%Page: 149 149 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(John Gilmore')0 12 Q(s)-.55 E(<b>pdtar</b>)0 24 -Q(public-domain implementation \(circa No)0 36 Q -.15(ve)-.15 G(mber).15 -E 2.5(,1)-.4 G(987\))-2.5 E -.1(wa)0 48 S 2.5(sq).1 G -(uite in\215uential, and formed the basis of GNU tar)-2.5 E(.)-.55 E -(GNU tar w)0 60 Q(as included as the standard system tar)-.1 E(in)0 72 Q -0 Cg EP -%%Page: 150 150 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(FreeBSD)0 12 Q(be)0 24 Q(ginning with)-.15 E -(FreeBSD1.0.)0 36 Q(<p>)36 48 Q -(This is a complete re-implementation based on the)0 60 Q -(<a href="../html3/libarchi)0 72 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E 0 Cg EP -%%Page: 151 151 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(library)0 12 Q(.)-.65 E(<h3 id="B)36 24 Q(UGS">) --.1 E -.1(BU)36 36 S(GS).1 E(</h3>)36 48 Q(This program follo)0 60 Q(ws) --.25 E(ISO/IEC 9945-1:1996 \(`)2.5 72 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E 0 Cg EP -%%Page: 152 152 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(for the de\214nition of the)0 12 Q -(<b>\255</b><b>l</b>)0 24 Q(option.)0 36 Q(Note that GNU tar prior to v) -0 48 Q(ersion 1.15 treated)-.15 E(<b>\255</b><b>l</b>)0 60 Q(as a synon) -0 72 Q(ym for the)-.15 E 0 Cg EP -%%Page: 153 153 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>\255</b><b>-one-\214le-system</b>)0 12 Q -(option.)0 24 Q(<p>)36 36 Q(The)0 48 Q -(<b>\255</b><b>C</b><code></code><code> dir</code>)0 60 Q -(option may dif)0 72 Q(fer from historic implementations.)-.25 E 0 Cg EP -%%Page: 154 154 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(All archi)0 24 Q .3 -.15(ve o)-.25 H -(utput is written in correctly-sized blocks, e).15 E -.15(ve)-.25 G(n) -.15 E(if the output is being compressed.)0 36 Q -(Whether or not the last output block is padded to a full)0 48 Q -(block size v)0 60 Q(aries depending on the format and the)-.25 E -(output de)0 72 Q(vice.)-.25 E 0 Cg EP -%%Page: 155 155 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(Fo)0 12 S 2.5(rt).15 G -(ar and cpio formats, the last block of output is padded)-2.5 E -(to a full block size if the output is being)0 24 Q -(written to standard output or to a character or block de)0 36 Q -(vice such as)-.25 E 2.5(at)0 48 S(ape dri)-2.5 E -.15(ve)-.25 G(.).15 E -(If the output is being written to a re)0 60 Q -(gular \214le, the last block)-.15 E(will not be padded.)0 72 Q 0 Cg EP -%%Page: 156 156 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Man)0 12 Q 2.5(yc)-.15 G(ompressors, including) --2.5 E(<a href="../html1/gzip.html">gzip\(1\)</a>)0 24 Q(and)0 36 Q -(<a href="../html1/bzip2.html">bzip2\(1\)</a>,)0 48 Q -(complain about the null padding when decompressing an archi)0 60 Q .3 --.15(ve c)-.25 H(reated by).15 E(<b>,</b>)0 72 Q 0 Cg EP -%%Page: 157 157 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(although the)0 12 Q 2.5(ys)-.15 G(till e)-2.5 E -(xtract it correctly)-.15 E(.)-.65 E(<p>)36 24 Q -(The compression and decompression is implemented internally)0 36 Q 2.5 -(,s)-.65 G(o)-2.5 E(there may be insigni\214cant dif)0 48 Q -(ferences between the compressed output)-.25 E(generated by)0 60 Q(<br>) -0 72 Q 0 Cg EP -%%Page: 158 158 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF( )0 12 Q(<co\ -de></code><b>Fl</b><b>czf</b><code></code><code> -</code><code> \214le<\ -/code>)0 24 Q(<br>)0 36 Q(and that generated by)0 48 Q(<br>)0 60 Q -( )0 72 Q 0 Cg EP -%%Page: 159 159 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><b>Fl</b><b>cf</b><code></code><co\ -de> -</code><code> \214le</code><code> |</code><b>gzip</b>)0 12 Q(<br>)0 -24 Q(<p>)36 36 Q(The def)0 48 Q(ault should be to read and write archi) --.1 E -.15(ve)-.25 G 2.5(st).15 G 2.5(ot)-2.5 G(he standard I/O paths,) --2.5 E -.2(bu)0 60 S 2.5(tt).2 G -(radition \(and POSIX\) dictates otherwise.)-2.5 E(<p>)36 72 Q 0 Cg EP -%%Page: 160 160 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b></b><b>r</b>)0 24 Q(and)0 36 Q -(<b></b><b>u</b>)0 48 Q(modes require that the archi)0 60 Q .3 -.15 -(ve b)-.25 H 2.5(eu).15 G(ncompressed)-2.5 E(and located in a re)0 72 Q -(gular \214le on disk.)-.15 E 0 Cg EP -%%Page: 161 161 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Other archi)0 12 Q -.15(ve)-.25 G 2.5(sc).15 G -(an be modi\214ed using)-2.5 E(<b></b><b>c</b>)0 24 Q(mode with the)0 36 -Q(<code></code><code>@archi)0 48 Q -.15(ve)-.25 G(-\214le</code>).15 E --.15(ex)0 60 S(tension.).15 E(<p>)36 72 Q 0 Cg EP -%%Page: 162 162 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 1.6 -.8(To a)0 12 T(rchi).8 E .3 -.15(ve a \214) --.25 H(le called).15 E(<code></code><code>@foo</code>)0 24 Q(or)0 36 Q -(<code></code><code>-foo</code>)0 48 Q(you must specify it as)0 60 Q -(<code></code><code>./@foo</code>)0 72 Q 0 Cg EP -%%Page: 163 163 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(or)0 12 Q(<code></code><code>./-foo</code>,)0 24 -Q(respecti)0 36 Q -.15(ve)-.25 G(ly).15 E(.)-.65 E(<p>)36 48 Q -(In create mode, a leading)0 60 Q(<code></code><code>./</code>)0 72 Q 0 -Cg EP -%%Page: 164 164 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(is al)0 12 Q -.1(wa)-.1 G(ys remo).1 E -.15(ve) --.15 G(d.).15 E 2.5(Al)0 24 S(eading)-2.5 E(<code></code><code>/</code>) -0 36 Q(is stripped unless the)0 48 Q(<b>\255</b><b>P</b>)0 60 Q -(option is speci\214ed.)0 72 Q 0 Cg EP -%%Page: 165 165 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -(There needs to be better support for \214le selection on both create)0 -24 Q(and e)0 36 Q(xtract.)-.15 E(<p>)36 48 Q(There is not yet an)0 60 Q -2.5(ys)-.15 G(upport for multi-v)-2.5 E(olume archi)-.2 E -.15(ve)-.25 G -2.5(so).15 G 2.5(rf)-2.5 G(or archi)-2.5 E(ving)-.25 E(sparse \214les.)0 -72 Q 0 Cg EP -%%Page: 166 166 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(Con)0 24 Q -.15(ve)-.4 G -(rting between dissimilar archi).15 E .3 -.15(ve f)-.25 H -(ormats \(such as tar and cpio\) using the).15 E -(<b></b><b>@</b><code></code><code>-</code>)0 36 Q(con)0 48 Q -.15(ve) --.4 G(ntion can cause hard link information to be lost.).15 E -(\(This is a consequence of the incompatible w)0 60 Q(ays that dif)-.1 E -(ferent archi)-.25 E -.15(ve)-.25 G -(formats store hardlink information.\))0 72 Q 0 Cg EP -%%Page: 167 167 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(There are alternati)0 24 Q .3 -.15 -(ve l)-.25 H(ong options for man).15 E 2.5(yo)-.15 G 2.5(ft)-2.5 G -(he short options that)-2.5 E(are deliberately not documented.)0 36 Q -(</body>)0 48 Q(</html>)0 60 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:38 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">BSDTAR(1) FreeBSD General Commands Manual +BSDTAR(1)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>tar</b> — manipulate +tape archives</p> + + +<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p> + +<p style="margin-left:14%;"><b>tar</b> +[<i>bundled-flags </i>⟨</p> + +<p valign="top">args ⟩] [⟨ <i><br> +file</i> ⟩ | ⟨ <i><br> +pattern</i> ⟩ ...]</p> + +<p style="margin-left:14%;"><b>tar</b> {<b>−c</b>} +[<i>options</i>] +[<i>files </i>| <i>directories</i>] <b><br> +tar</b> {<b>−r </b>| <b>−u</b>} +<b>−f</b> <i>archive-file</i> [<i>options</i>] +[<i>files </i>| <i>directories</i>] <b><br> +tar</b> {<b>−t </b>| <b>−x</b>} +[<i>options</i>] [<i>patterns</i>]</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;"><b>tar</b> creates and +manipulates streaming archive files. This implementation can +extract from tar, pax, cpio, zip, jar, ar, and ISO 9660 +cdrom images and can create tar, pax, cpio, ar, and shar +archives.</p> + +<p style="margin-left:8%; margin-top: 1em">The first +synopsis form shows a ‘‘bundled’’ +option word. This usage is provided for compatibility with +historical implementations. See COMPATIBILITY below for +details.</p> + +<p style="margin-left:8%; margin-top: 1em">The other +synopsis forms show the preferred usage. The first option to +<b>tar</b> is a mode indicator from the following list:</p> + +<p valign="top"><b>−c</b></p> + +<p style="margin-left:20%; margin-top: 1em">Create a new +archive containing the specified items.</p> + +<p valign="top"><b>−r</b></p> + +<p style="margin-left:20%; margin-top: 1em">Like +<b>−c</b>, but new entries are appended to the +archive. Note that this only works on uncompressed archives +stored in regular files. The <b>−f</b> option is +required.</p> + +<p valign="top"><b>−t</b></p> + +<p style="margin-left:20%; margin-top: 1em">List archive +contents to stdout.</p> + +<p valign="top"><b>−u</b></p> + +<p style="margin-left:20%; margin-top: 1em">Like +<b>−r</b>, but new entries are added only if they have +a modification date newer than the corresponding entry in +the archive. Note that this only works on uncompressed +archives stored in regular files. The <b>−f</b> option +is required.</p> + +<p valign="top"><b>−x</b></p> + +<p style="margin-left:20%; margin-top: 1em">Extract to disk +from the archive. If a file with the same name appears more +than once in the archive, each copy will be extracted, with +later copies overwriting (replacing) earlier copies.</p> + +<p style="margin-left:8%; margin-top: 1em">In +<b>−c</b>, <b>−r</b>, or <b>−u</b> mode, +each specified file or directory is added to the archive in +the order specified on the command line. By default, the +contents of each directory are also archived.</p> + +<p style="margin-left:8%; margin-top: 1em">In extract or +list mode, the entire command line is read and parsed before +the archive is opened. The pathnames or patterns on the +command line indicate which items in the archive should be +processed. Patterns are shell-style globbing patterns as +documented in tcsh(1).</p> + +<p style="margin-top: 1em" valign="top"><b>OPTIONS</b></p> + +<p style="margin-left:8%;">Unless specifically stated +otherwise, options are applicable in all operating +modes.</p> + + +<p style="margin-top: 1em" valign="top"><b>@</b><i>archive</i></p> + +<p style="margin-left:20%;">(c and r mode only) The +specified archive is opened and the entries in it will be +appended to the current archive. As a simple example,</p> + +<p style="margin-left:29%;"><b>tar −c −f</b> +<i>- newfile</i> <b>@</b><i>original.tar</i></p> + +<p style="margin-left:20%;">writes a new archive to +standard output containing a file <i>newfile</i> and all of +the entries from <i>original.tar</i>. In contrast,</p> + +<p style="margin-left:29%;"><b>tar −c −f</b> +<i>- newfile original.tar</i></p> + +<p style="margin-left:20%;">creates a new archive with only +two entries. Similarly,</p> + +<p style="margin-left:29%;"><b>tar −czf</b> <i>-</i> +<b>−-format pax @</b><i>-</i></p> + +<p style="margin-left:20%;">reads an archive from standard +input (whose format will be determined automatically) and +converts it into a gzip-compressed pax-format archive on +stdout. In this way, <b>tar</b> can be used to convert +archives from one format to another.</p> + +<p style="margin-top: 1em" valign="top"><b>−b</b> +<i>blocksize</i></p> + +<p style="margin-left:20%;">Specify the block size, in +512-byte records, for tape drive I/O. As a rule, this +argument is only needed when reading from or writing to tape +drives, and usually not even then as the default block size +of 20 records (10240 bytes) is very common.</p> + +<p style="margin-top: 1em" valign="top"><b>−C</b> +<i>directory</i></p> + +<p style="margin-left:20%;">In c and r mode, this changes +the directory before adding the following files. In x mode, +change directories after opening the archive but before +extracting entries from the archive.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-check-links</b></p> + +<p style="margin-left:20%;">(c and r modes only) Issue a +warning message unless all links to each file are +archived.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-chroot</b></p> + +<p style="margin-left:20%;">(x mode only) <b>chroot</b>() +to the current directory after processing any +<b>−C</b> options and before extracting any files.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-exclude</b> +<i>pattern</i></p> + +<p style="margin-left:20%;">Do not process files or +directories that match the specified pattern. Note that +exclusions take precedence over patterns or filenames +specified on the command line.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-format</b> +<i>format</i></p> + +<p style="margin-left:20%;">(c, r, u mode only) Use the +specified format for the created archive. Supported formats +include ‘‘cpio’’, +‘‘pax’’, +‘‘shar’’, and +‘‘ustar’’. Other formats may also be +supported; see libarchive-formats(5) for more information +about currently-supported formats. In r and u modes, when +extending an existing archive, the format specified here +must be compatible with the format of the existing archive +on disk.</p> + +<p style="margin-top: 1em" valign="top"><b>−f</b> +<i>file</i></p> + +<p style="margin-left:20%;">Read the archive from or write +the archive to the specified file. The filename can be +<i>-</i> for standard input or standard output. If not +specified, the default tape device will be used. (On +FreeBSD, the default tape device is <i>/dev/sa0</i>.)</p> + + +<p style="margin-top: 1em" valign="top"><b>−H</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c and r mode +only) Symbolic links named on the command line will be +followed; the target of the link will be archived, not the +link itself.</p> + + +<p style="margin-top: 1em" valign="top"><b>−h</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c and r mode +only) Synonym for <b>−L</b>.</p> + + +<p style="margin-top: 1em" valign="top"><b>−I</b></p> + +<p style="margin-left:20%; margin-top: 1em">Synonym for +<b>−T</b>.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-include</b> +<i>pattern</i></p> + +<p style="margin-left:20%;">Process only files or +directories that match the specified pattern. Note that +exclusions specified with <b>−-exclude</b> take +precedence over inclusions. If no inclusions are explicitly +specified, all entries are processed by default. The +<b>−-include</b> option is especially useful when +filtering archives. For example, the command</p> + +<p style="margin-left:29%;"><b>tar −c −f</b> +<i>new.tar</i> <b>−-include=’*foo*’ +@</b><i>old.tgz</i></p> + +<p style="margin-left:20%;">creates a new archive +<i>new.tar</i> containing only the entries from +<i>old.tgz</i> containing the string ‘foo’.</p> + + +<p style="margin-top: 1em" valign="top"><b>−j</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c mode only) +Compress the resulting archive with bzip2(1). In extract or +list modes, this option is ignored. Note that, unlike other +<b>tar</b> implementations, this implementation recognizes +bzip2 compression automatically when reading archives.</p> + + +<p style="margin-top: 1em" valign="top"><b>−k</b></p> + +<p style="margin-left:20%; margin-top: 1em">(x mode only) +Do not overwrite existing files. In particular, if a file +appears more than once in an archive, later copies will not +overwrite earlier copies.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-keep-newer-files</b></p> + +<p style="margin-left:20%;">(x mode only) Do not overwrite +existing files that are newer than the versions appearing in +the archive being extracted.</p> + + +<p style="margin-top: 1em" valign="top"><b>−L</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c and r mode +only) All symbolic links will be followed. Normally, +symbolic links are archived as such. With this option, the +target of the link will be archived instead.</p> + + +<p style="margin-top: 1em" valign="top"><b>−l</b></p> + +<p style="margin-left:20%; margin-top: 1em">This is a +synonym for the <b>−-check-links</b> option.</p> + + +<p style="margin-top: 1em" valign="top"><b>−m</b></p> + +<p style="margin-left:20%; margin-top: 1em">(x mode only) +Do not extract modification time. By default, the +modification time is set to the time stored in the +archive.</p> + + +<p style="margin-top: 1em" valign="top"><b>−n</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c, r, u modes +only) Do not recursively archive the contents of +directories.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-newer</b> +<i>date</i></p> + +<p style="margin-left:20%;">(c, r, u modes only) Only +include files and directories newer than the specified date. +This compares ctime entries.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-newer-mtime</b> +<i>date</i></p> + +<p style="margin-left:20%;">(c, r, u modes only) Like +<b>−-newer</b>, except it compares mtime entries +instead of ctime entries.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-newer-than</b> +<i>file</i></p> + +<p style="margin-left:20%;">(c, r, u modes only) Only +include files and directories newer than the specified file. +This compares ctime entries.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-newer-mtime-than</b> +<i>file</i></p> + +<p style="margin-left:20%;">(c, r, u modes only) Like +<b>−-newer-than</b>, except it compares mtime entries +instead of ctime entries.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-nodump</b></p> + +<p style="margin-left:20%;">(c and r modes only) Honor the +nodump file flag by skipping this file.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-null</b></p> + +<p style="margin-left:20%; margin-top: 1em">(use with +<b>−I</b>, <b>−T</b>, or <b>−X</b>) +Filenames or patterns are separated by null characters, not +by newlines. This is often used to read filenames output by +the <b>−print0</b> option to find(1).</p> + + +<p style="margin-top: 1em" valign="top"><b>−-numeric-owner</b></p> + +<p style="margin-left:20%;">(x mode only) Ignore symbolic +user and group names when restoring archives to disk, only +numeric uid and gid values will be obeyed.</p> + + +<p style="margin-top: 1em" valign="top"><b>−O</b></p> + +<p style="margin-left:20%; margin-top: 1em">(x, t modes +only) In extract (-x) mode, files will be written to +standard out rather than being extracted to disk. In list +(-t) mode, the file listing will be written to stderr rather +than the usual stdout.</p> + + +<p style="margin-top: 1em" valign="top"><b>−o</b></p> + +<p style="margin-left:20%; margin-top: 1em">(x mode) Use +the user and group of the user running the program rather +than those specified in the archive. Note that this has no +significance unless <b>−p</b> is specified, and the +program is being run by the root user. In this case, the +file modes and flags from the archive will be restored, but +ACLs or owner information in the archive will be +discarded.</p> + + +<p style="margin-top: 1em" valign="top"><b>−o</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c, r, u mode) +A synonym for <b>−-format</b> <i>ustar</i></p> + + +<p style="margin-top: 1em" valign="top"><b>−-one-file-system</b></p> + +<p style="margin-left:20%;">(c, r, and u modes) Do not +cross mount points.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-options</b> +<i>options</i></p> + +<p style="margin-left:20%;">Select optional behaviors for +particular modules. The argument is a text string containing +comma-separated keywords and values. These are passed to the +modules that handle particular formats to control how those +formats will behave. Each option has one of the following +forms:</p> + +<p valign="top"><i>key=value</i></p> + +<p style="margin-left:32%;">The key will be set to the +specified value in every module that supports it. Modules +that do not support this key will ignore it.</p> + +<p valign="top"><i>key</i></p> + +<p style="margin-left:32%; margin-top: 1em">The key will be +enabled in every module that supports it. This is equivalent +to <i>key</i><b>=1</b>.</p> + +<p valign="top"><i>!key</i></p> + +<p style="margin-left:32%; margin-top: 1em">The key will be +disabled in every module that supports it.</p> + +<p valign="top"><i>module:key=value</i>, <i>module:key</i>, +<i>module:!key</i></p> + +<p style="margin-left:32%;">As above, but the corresponding +key and value will be provided only to modules whose name +matches <i>module</i>.</p> + +<p style="margin-left:20%;">The currently supported modules +and keys are:</p> + +<p valign="top"><b>iso9660:joliet</b></p> + +<p style="margin-left:32%;">Support Joliet extensions. This +is enabled by default, use <b>!joliet</b> or +<b>iso9660:!joliet</b> to disable.</p> + +<p valign="top"><b>iso9660:rockridge</b></p> + +<p style="margin-left:32%;">Support Rock Ridge extensions. +This is enabled by default, use <b>!rockridge</b> or +<b>iso9660:!rockridge</b> to disable.</p> + +<p valign="top"><b>gzip:compression-level</b></p> + +<p style="margin-left:32%;">A decimal integer from 0 to 9 +specifying the gzip compression level.</p> + +<p valign="top"><b>xz:compression-level</b></p> + +<p style="margin-left:32%;">A decimal integer from 0 to 9 +specifying the xz compression level.</p> + +<p valign="top"><b>mtree:</b><i>keyword</i></p> + +<p style="margin-left:32%;">The mtree writer module allows +you to specify which mtree keywords will be included in the +output. Supported keywords include: <b>cksum</b>, +<b>device</b>, <b>flags</b>, <b>gid</b>, <b>gname</b>, +<b>indent</b>, <b>link</b>, <b>md5</b>, <b>mode</b>, +<b>nlink</b>, <b>rmd160</b>, <b>sha1</b>, <b>sha256</b>, +<b>sha384</b>, <b>sha512</b>, <b>size</b>, <b>time</b>, +<b>uid</b>, <b>uname</b>. The default is equivalent to: +‘‘device, flags, gid, gname, link, mode, nlink, +size, time, type, uid, uname’’.</p> + +<p valign="top"><b>mtree:all</b></p> + +<p style="margin-left:32%;">Enables all of the above +keywords. You can also use <b>mtree:!all</b> to disable all +keywords.</p> + +<p valign="top"><b>mtree:use-set</b></p> + +<p style="margin-left:32%;">Enable generation of +<b>/set</b> lines in the output.</p> + +<p valign="top"><b>mtree:indent</b></p> + +<p style="margin-left:32%;">Produce human-readable output +by indenting options and splitting lines to fit into 80 +columns.</p> + +<p valign="top"><b>zip:compression</b>=<i>type</i></p> + +<p style="margin-left:32%;">Use <i>type</i> as compression +method. Supported values are store (uncompressed) and +deflate (gzip algorithm).</p> + +<p style="margin-left:20%;">If a provided option is not +supported by any module, that is a fatal error.</p> + + +<p style="margin-top: 1em" valign="top"><b>−P</b></p> + +<p style="margin-left:20%; margin-top: 1em">Preserve +pathnames. By default, absolute pathnames (those that begin +with a / character) have the leading slash removed both when +creating archives and extracting from them. Also, <b>tar</b> +will refuse to extract archive entries whose pathnames +contain <i>..</i> or whose target directory would be altered +by a symlink. This option suppresses these behaviors.</p> + + +<p style="margin-top: 1em" valign="top"><b>−p</b></p> + +<p style="margin-left:20%; margin-top: 1em">(x mode only) +Preserve file permissions. Attempt to restore the full +permissions, including owner, file modes, file flags and +ACLs, if available, for each item extracted from the +archive. By default, newly-created files are owned by the +user running <b>tar</b>, the file mode is restored for +newly-created regular files, and all other types of entries +receive default permissions. If <b>tar</b> is being run by +root, the default is to restore the owner unless the +<b>−o</b> option is also specified.</p> + +<p style="margin-top: 1em" valign="top"><b>−q</b> +(<b>−-fast-read</b>)</p> + +<p style="margin-left:20%;">(x and t mode only) Extract or +list only the first archive entry that matches each pattern +or filename operand. Exit as soon as each specified pattern +or filename has been matched. By default, the archive is +always read to the very end, since there can be multiple +entries with the same name and, by convention, later entries +overwrite earlier entries. This option is provided as a +performance optimization.</p> + + +<p style="margin-top: 1em" valign="top"><b>−S</b></p> + +<p style="margin-left:20%; margin-top: 1em">(x mode only) +Extract files as sparse files. For every block on disk, +check first if it contains only NULL bytes and seek over it +otherwise. This works similiar to the conv=sparse option of +dd.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-strip-components</b> +<i>count</i></p> + +<p style="margin-left:20%;">(x mode only) Remove the +specified number of leading path elements. Pathnames with +fewer elements will be silently skipped. Note that the +pathname is edited after checking inclusion/exclusion +patterns but before security checks.</p> + +<p style="margin-top: 1em" valign="top"><b>−s</b> +<i>pattern</i></p> + +<p style="margin-left:20%;">Modify file or archive member +names according to <i>pattern</i>. The pattern has the +format <i>/old/new/</i>[gps] where <i>old</i> is a basic +regular expression, <i>new</i> is the replacement string of +the matched part, and the optional trailing letters modify +how the replacement is handled. If <i>old</i> is not +matched, the pattern is skipped. Within <i>new</i>, ~ is +substituted with the match, 1 to 9 with the content of the +corresponding captured group. The optional trailing g +specifies that matching should continue after the matched +part and stopped on the first unmatched pattern. The +optional trailing s specifies that the pattern applies to +the value of symbolic links. The optional trailing p +specifies that after a successful substitution the original +path name and the new path name should be printed to +standard error.</p> + +<p style="margin-top: 1em" valign="top"><b>−T</b> +<i>filename</i></p> + +<p style="margin-left:20%;">In x or t mode, <b>tar</b> will +read the list of names to be extracted from <i>filename</i>. +In c mode, <b>tar</b> will read names to be archived from +<i>filename</i>. The special name +‘‘-C’’ on a line by itself will +cause the current directory to be changed to the directory +specified on the following line. Names are terminated by +newlines unless <b>−-null</b> is specified. Note that +<b>−-null</b> also disables the special handling of +lines containing ‘‘-C’’.</p> + + +<p style="margin-top: 1em" valign="top"><b>−U</b></p> + +<p style="margin-left:20%; margin-top: 1em">(x mode only) +Unlink files before creating them. Without this option, +<b>tar</b> overwrites existing files, which preserves +existing hardlinks. With this option, existing hardlinks +will be broken, as will any symlink that would affect the +location of an extracted file.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-use-compress-program</b> +<i>program</i></p> + +<p style="margin-left:20%;">Pipe the input (in x or t mode) +or the output (in c mode) through <i>program</i> instead of +using the builtin compression support.</p> + + +<p style="margin-top: 1em" valign="top"><b>−v</b></p> + +<p style="margin-left:20%; margin-top: 1em">Produce verbose +output. In create and extract modes, <b>tar</b> will list +each file name as it is read from or written to the archive. +In list mode, <b>tar</b> will produce output similar to that +of ls(1). Additional <b>−v</b> options will provide +additional detail.</p> + + +<p style="margin-top: 1em" valign="top"><b>−-version</b></p> + +<p style="margin-left:20%;">Print version of <b>tar</b> and +<b>libarchive</b>, and exit.</p> + + +<p style="margin-top: 1em" valign="top"><b>−w</b></p> + +<p style="margin-left:20%; margin-top: 1em">Ask for +confirmation for every action.</p> + +<p style="margin-top: 1em" valign="top"><b>−X</b> +<i>filename</i></p> + +<p style="margin-left:20%;">Read a list of exclusion +patterns from the specified file. See <b>−-exclude</b> +for more information about the handling of exclusions.</p> + + +<p style="margin-top: 1em" valign="top"><b>−y</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c mode only) +Compress the resulting archive with bzip2(1). In extract or +list modes, this option is ignored. Note that, unlike other +<b>tar</b> implementations, this implementation recognizes +bzip2 compression automatically when reading archives.</p> + + +<p style="margin-top: 1em" valign="top"><b>−z</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c mode only) +Compress the resulting archive with gzip(1). In extract or +list modes, this option is ignored. Note that, unlike other +<b>tar</b> implementations, this implementation recognizes +gzip compression automatically when reading archives.</p> + + +<p style="margin-top: 1em" valign="top"><b>−Z</b></p> + +<p style="margin-left:20%; margin-top: 1em">(c mode only) +Compress the resulting archive with compress(1). In extract +or list modes, this option is ignored. Note that, unlike +other <b>tar</b> implementations, this implementation +recognizes compress compression automatically when reading +archives.</p> + + +<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p> + +<p style="margin-left:8%;">The following environment +variables affect the execution of <b>tar</b>:</p> + +<p style="margin-top: 1em" valign="top">LANG</p> + +<p style="margin-left:25%; margin-top: 1em">The locale to +use. See environ(7) for more information.</p> + +<p style="margin-top: 1em" valign="top">TAPE</p> + +<p style="margin-left:25%; margin-top: 1em">The default +tape device. The <b>−f</b> option overrides this.</p> + +<p style="margin-top: 1em" valign="top">TZ</p> + +<p style="margin-left:25%; margin-top: 1em">The timezone to +use when displaying dates. See environ(7) for more +information.</p> + +<p style="margin-top: 1em" valign="top"><b>FILES</b> <br> +/dev/sa0</p> + +<p style="margin-left:25%; margin-top: 1em">The default +tape device, if not overridden by the TAPE environment +variable or the <b>−f</b> option.</p> + +<p style="margin-top: 1em" valign="top"><b>EXIT +STATUS</b></p> + +<p style="margin-left:8%;">The <b>tar</b> utility +exits 0 on success, and >0 if an error +occurs.</p> + + +<p style="margin-top: 1em" valign="top"><b>EXAMPLES</b></p> + +<p style="margin-left:8%;">The following creates a new +archive called <i>file.tar.gz</i> that contains two files +<i>source.c</i> and <i>source.h</i>:</p> + +<p style="margin-left:17%;"><b>tar −czf</b> +<i>file.tar.gz source.c source.h</i></p> + +<p style="margin-left:8%; margin-top: 1em">To view a +detailed table of contents for this archive:</p> + +<p style="margin-left:17%;"><b>tar −tvf</b> +<i>file.tar.gz</i></p> + +<p style="margin-left:8%; margin-top: 1em">To extract all +entries from the archive on the default tape drive:</p> + +<p style="margin-left:17%;"><b>tar −x</b></p> + +<p style="margin-left:8%; margin-top: 1em">To examine the +contents of an ISO 9660 cdrom image:</p> + +<p style="margin-left:17%;"><b>tar −tf</b> +<i>image.iso</i></p> + +<p style="margin-left:8%; margin-top: 1em">To move file +hierarchies, invoke <b>tar</b> as</p> + +<p style="margin-left:17%;"><b>tar −cf</b> <i>-</i> +<b>−C</b> <i>srcdir .</i> | <b>tar −xpf</b> +<i>-</i> <b>−C</b> <i>destdir</i></p> + +<p style="margin-left:8%;">or more traditionally</p> + +<p style="margin-left:17%;">cd srcdir ; <b>tar +−cf</b> <i>- .</i> | (<i>cd destdir ;</i> <b>tar +−xpf</b> <i>-</i>)</p> + +<p style="margin-left:8%; margin-top: 1em">In create mode, +the list of files and directories to be archived can also +include directory change instructions of the form +<b>-C</b><i>foo/baz</i> and archive inclusions of the form +<b>@</b><i>archive-file</i>. For example, the command +line</p> + +<p style="margin-left:17%;"><b>tar −c −f</b> +<i>new.tar foo1</i> <b>@</b><i>old.tgz</i> <b>-C</b><i>/tmp +foo2</i></p> + +<p style="margin-left:8%;">will create a new archive +<i>new.tar</i>. <b>tar</b> will read the file <i>foo1</i> +from the current directory and add it to the output archive. +It will then read each entry from <i>old.tgz</i> and add +those entries to the output archive. Finally, it will switch +to the <i>/tmp</i> directory and add <i>foo2</i> to the +output archive.</p> + +<p style="margin-left:8%; margin-top: 1em">An input file in +mtree(5) format can be used to create an output archive with +arbitrary ownership, permissions, or names that differ from +existing data on disk:</p> + +<p style="margin-left:17%; margin-top: 1em">$ cat +input.mtree <br> +#mtree <br> +usr/bin uid=0 gid=0 mode=0755 type=dir <br> +usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls <br> +$ tar -cvf output.tar @input.mtree</p> + +<p style="margin-left:8%; margin-top: 1em">The +<b>−-newer</b> and <b>−-newer-mtime</b> switches +accept a variety of common date and time specifications, +including ‘‘12 Mar 2005 7:14:29pm’’, +‘‘2005-03-12 19:14’’, +‘‘5 minutes ago’’, and +‘‘19:14 PST May 1’’.</p> + +<p style="margin-left:8%; margin-top: 1em">The +<b>−-options</b> argument can be used to control +various details of archive generation or reading. For +example, you can generate mtree output which only contains +<b>type</b>, <b>time</b>, and <b>uid</b> keywords:</p> + +<p style="margin-left:17%;"><b>tar −cf</b> +<i>file.tar</i> <b>−-format=mtree +−-options=’!all,type,time,uid’</b> +<i>dir</i></p> + +<p style="margin-left:8%;">or you can set the compression +level used by gzip or xz compression:</p> + +<p style="margin-left:17%;"><b>tar −czf</b> +<i>file.tar</i> +<b>−-options=’compression-level=9’</b>.</p> + +<p style="margin-left:8%;">For more details, see the +explanation of the <b>archive_read_set_options</b>() and +<b>archive_write_set_options</b>() API calls that are +described in archive_read(3) and archive_write(3).</p> + + +<p style="margin-top: 1em" valign="top"><b>COMPATIBILITY</b></p> + +<p style="margin-left:8%;">The bundled-arguments format is +supported for compatibility with historic implementations. +It consists of an initial word (with no leading - character) +in which each character indicates an option. Arguments +follow as separate words. The order of the arguments must +match the order of the corresponding characters in the +bundled command word. For example,</p> + +<p style="margin-left:17%;"><b>tar tbf 32</b> +<i>file.tar</i></p> + +<p style="margin-left:8%;">specifies three flags <b>t</b>, +<b>b</b>, and <b>f</b>. The <b>b</b> and <b>f</b> flags both +require arguments, so there must be two additional items on +the command line. The <i>32</i> is the argument to the +<b>b</b> flag, and <i>file.tar</i> is the argument to the +<b>f</b> flag.</p> + +<p style="margin-left:8%; margin-top: 1em">The mode options +c, r, t, u, and x and the options b, f, l, m, o, v, and w +comply with SUSv2.</p> + +<p style="margin-left:8%; margin-top: 1em">For maximum +portability, scripts that invoke <b>tar</b> should use the +bundled-argument format above, should limit themselves to +the <b>c</b>, <b>t</b>, and <b>x</b> modes, and the +<b>b</b>, <b>f</b>, <b>m</b>, <b>v</b>, and <b>w</b> +options.</p> + +<p style="margin-left:8%; margin-top: 1em">Additional long +options are provided to improve compatibility with other tar +implementations.</p> + + +<p style="margin-top: 1em" valign="top"><b>SECURITY</b></p> + +<p style="margin-left:8%;">Certain security issues are +common to many archiving programs, including <b>tar</b>. In +particular, carefully-crafted archives can request that +<b>tar</b> extract files to locations outside of the target +directory. This can potentially be used to cause unwitting +users to overwrite files they did not intend to overwrite. +If the archive is being extracted by the superuser, any file +on the system can potentially be overwritten. There are +three ways this can happen. Although <b>tar</b> has +mechanisms to protect against each one, savvy users should +be aware of the implications:</p> + +<p style="margin-top: 1em" valign="top"><b>•</b></p> + +<p style="margin-left:20%;">Archive entries can have +absolute pathnames. By default, <b>tar</b> removes the +leading <i>/</i> character from filenames before restoring +them to guard against this problem.</p> + +<p style="margin-top: 1em" valign="top"><b>•</b></p> + +<p style="margin-left:20%;">Archive entries can have +pathnames that include <i>..</i> components. By default, +<b>tar</b> will not extract files containing <i>..</i> +components in their pathname.</p> + +<p style="margin-top: 1em" valign="top"><b>•</b></p> + +<p style="margin-left:20%;">Archive entries can exploit +symbolic links to restore files to other directories. An +archive can restore a symbolic link to another directory, +then use that link to restore a file into that directory. To +guard against this, <b>tar</b> checks each extracted path +for symlinks. If the final path element is a symlink, it +will be removed and replaced with the archive entry. If +<b>−U</b> is specified, any intermediate symlink will +also be unconditionally removed. If neither <b>−U</b> +nor <b>−P</b> is specified, <b>tar</b> will refuse to +extract the entry.</p> + +<p style="margin-left:8%;">To protect yourself, you should +be wary of any archives that come from untrusted sources. +You should examine the contents of an archive with</p> + +<p style="margin-left:17%;"><b>tar −tf</b> +<i>filename</i></p> + +<p style="margin-left:8%;">before extraction. You should +use the <b>−k</b> option to ensure that <b>tar</b> +will not overwrite any existing files or the <b>−U</b> +option to remove any pre-existing files. You should +generally not extract archives while running with super-user +privileges. Note that the <b>−P</b> option to +<b>tar</b> disables the security checks above and allows you +to extract an archive while preserving any absolute +pathnames, <i>..</i> components, or symlinks to other +directories.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">bzip2(1), compress(1), cpio(1), +gzip(1), mt(1), pax(1), shar(1), libarchive(3), +libarchive-formats(5), tar(5)</p> + + +<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p> + +<p style="margin-left:8%;">There is no current POSIX +standard for the tar command; it appeared in ISO/IEC +9945-1:1996 (‘‘POSIX.1’’) but was +dropped from IEEE Std 1003.1-2001 +(‘‘POSIX.1’’). The options used by +this implementation were developed by surveying a number of +existing tar implementations as well as the old POSIX +specification for tar and the current POSIX specification +for pax.</p> + +<p style="margin-left:8%; margin-top: 1em">The ustar and +pax interchange file formats are defined by IEEE Std +1003.1-2001 (‘‘POSIX.1’’) for the +pax command.</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">A <b>tar</b> command appeared in +Seventh Edition Unix, which was released in January, 1979. +There have been numerous other implementations, many of +which extended the file format. John Gilmore’s +<b>pdtar</b> public-domain implementation (circa November, +1987) was quite influential, and formed the basis of GNU +tar. GNU tar was included as the standard system tar in +FreeBSD beginning with FreeBSD 1.0.</p> + +<p style="margin-left:8%; margin-top: 1em">This is a +complete re-implementation based on the libarchive(3) +library.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">This program follows ISO/IEC +9945-1:1996 (‘‘POSIX.1’’) for the +definition of the <b>−l</b> option. Note that GNU tar +prior to version 1.15 treated <b>−l</b> as a synonym +for the <b>−-one-file-system</b> option.</p> + +<p style="margin-left:8%; margin-top: 1em">The +<b>−C</b> <i>dir</i> option may differ from historic +implementations.</p> + +<p style="margin-left:8%; margin-top: 1em">All archive +output is written in correctly-sized blocks, even if the +output is being compressed. Whether or not the last output +block is padded to a full block size varies depending on the +format and the output device. For tar and cpio formats, the +last block of output is padded to a full block size if the +output is being written to standard output or to a character +or block device such as a tape drive. If the output is being +written to a regular file, the last block will not be +padded. Many compressors, including gzip(1) and bzip2(1), +complain about the null padding when decompressing an +archive created by <b>tar</b>, although they still extract +it correctly.</p> + +<p style="margin-left:8%; margin-top: 1em">The compression +and decompression is implemented internally, so there may be +insignificant differences between the compressed output +generated by</p> + +<p style="margin-left:17%;"><b>tar −czf</b> <i>- +file</i></p> + +<p style="margin-left:8%;">and that generated by</p> + +<p style="margin-left:17%;"><b>tar −cf</b> <i>- +file</i> | <b>gzip</b></p> + +<p style="margin-left:8%; margin-top: 1em">The default +should be to read and write archives to the standard I/O +paths, but tradition (and POSIX) dictates otherwise.</p> + +<p style="margin-left:8%; margin-top: 1em">The <b>r</b> and +<b>u</b> modes require that the archive be uncompressed and +located in a regular file on disk. Other archives can be +modified using <b>c</b> mode with the <i>@archive-file</i> +extension.</p> + +<p style="margin-left:8%; margin-top: 1em">To archive a +file called <i>@foo</i> or <i>-foo</i> you must specify it +as <i>./@foo</i> or <i>./-foo</i>, respectively.</p> + +<p style="margin-left:8%; margin-top: 1em">In create mode, +a leading <i>./</i> is always removed. A leading <i>/</i> is +stripped unless the <b>−P</b> option is specified.</p> + +<p style="margin-left:8%; margin-top: 1em">There needs to +be better support for file selection on both create and +extract.</p> + +<p style="margin-left:8%; margin-top: 1em">There is not yet +any support for multi-volume archives or for archiving +sparse files.</p> + +<p style="margin-left:8%; margin-top: 1em">Converting +between dissimilar archive formats (such as tar and cpio) +using the <b>@</b><i>-</i> convention can cause hard link +information to be lost. (This is a consequence of the +incompatible ways that different archive formats store +hardlink information.)</p> + +<p style="margin-left:8%; margin-top: 1em">There are +alternative long options for many of the short options that +are deliberately not documented.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +Oct 12, 2009 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/cpio.5.html b/archivers/libarchive/files/doc/html/cpio.5.html index 1980eaa2ae1..88fc8fb0aa7 100644 --- a/archivers/libarchive/files/doc/html/cpio.5.html +++ b/archivers/libarchive/files/doc/html/cpio.5.html @@ -1,769 +1,422 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:16 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 60 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(October 5, 2007 CPIO 5)74.5 48 Q(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>cpio</b>)0 48 Q 2.5(-f)0 60 S -(ormat of cpio archi)-2.5 E .3 -.15(ve \214)-.25 H(les).15 E -(<h3 id="DESCRIPTION">)36 72 Q 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(The)0 36 Q -(<b>cpio</b>)0 48 Q(archi)0 60 Q .3 -.15(ve f)-.25 H(ormat collects an) -.15 E 2.5(yn)-.15 G(umber of \214les, directories, and other)-2.5 E -(\214le system objects \(symbolic links, de)0 72 Q -(vice nodes, etc.\) into a single)-.25 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(stream of bytes.)0 12 Q(<h4 id="General F)36 24 -Q(ormat">)-.15 E(General F)36 36 Q(ormat)-.15 E(</h4>)36 48 Q -(Each \214le system object in a)0 60 Q(<b>cpio</b>)0 72 Q 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)0 12 Q .3 -.15(ve c)-.25 H -(omprises a header record with basic numeric metadata).15 E(follo)0 24 Q -(wed by the full pathname of the entry and the \214le data.)-.25 E -(The header record stores a series of inte)0 36 Q(ger v)-.15 E -(alues that generally)-.25 E(follo)0 48 Q 2.5(wt)-.25 G(he \214elds in) --2.5 E(<i></i><i>struct</i><i> stat</i>.)0 60 Q(\(See)0 72 Q 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html2/stat.html">stat\(2\)</a>)0 12 -Q(for details.\))0 24 Q(The v)0 36 Q(ariants dif)-.25 E -(fer primarily in ho)-.25 E 2.5(wt)-.25 G(he)-2.5 E 2.5(ys)-.15 G -(tore those inte)-2.5 E(gers)-.15 E(\(binary)0 48 Q 2.5(,o)-.65 G -(ctal, or he)-2.5 E(xadecimal\).)-.15 E(The header is follo)0 60 Q -(wed by the pathname of the)-.25 E -(entry \(the length of the pathname is stored in the header\))0 72 Q 0 -Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and an)0 12 Q 2.5<798c>-.15 G(le data.)-2.5 E -(The end of the archi)0 24 Q .3 -.15(ve i)-.25 H 2.5(si).15 G -(ndicated by a special record with)-2.5 E(the pathname)0 36 Q -.74(``)0 -48 S(TRAILER!!!').74 E('.)-.74 E(<h4 id="PWB format">)36 60 Q -(PWB format)36 72 Q 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(XXX An)0 24 Q 2.5(yd)-.15 G -(ocumentation of the original PWB/UNIX 1.0 format? XXX)-2.5 E -(<h4 id="Old Binary F)36 36 Q(ormat">)-.15 E(Old Binary F)36 48 Q(ormat) --.15 E(</h4>)36 60 Q(The old binary)0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>cpio</b>)0 12 Q -(format stores numbers as 2-byte and 4-byte binary v)0 24 Q(alues.)-.25 -E(Each entry be)0 36 Q(gins with a header in the follo)-.15 E -(wing format:)-.25 E(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 -72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct header_old_cpio {)0 12 Q(unsigned short) -20 24 Q(c_magic;)7.5 E(unsigned short)20 36 Q(c_de)7.5 E(v;)-.25 E -(unsigned short)20 48 Q(c_ino;)7.5 E(unsigned short)20 60 Q(c_mode;)7.5 -E(unsigned short)20 72 Q(c_uid;)7.5 E 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(unsigned short)20 12 Q(c_gid;)7.5 E -(unsigned short)20 24 Q(c_nlink;)7.5 E(unsigned short)20 36 Q(c_rde)7.5 -E(v;)-.25 E(unsigned short)36 48 Q(c_mtime[2];)7.5 E(unsigned short)20 -60 Q(c_namesize;)7.5 E(unsigned short)36 72 Q(c_\214lesize[2];)7.5 E 0 -Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(};)0 12 Q(</pre>)0 24 Q(</code>)0 36 Q(</dl>)0 -48 Q(<p>)36 60 Q(The)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>unsigned</i><i> short</i>)0 12 Q -(\214elds here are 16-bit inte)0 24 Q(ger v)-.15 E(alues; the)-.25 E -(<i></i><i>unsigned</i><i> int</i>)0 36 Q(\214elds are 32-bit inte)0 48 -Q(ger v)-.15 E(alues.)-.25 E(The \214elds are as follo)0 60 Q(ws)-.25 E -(<dl compact>)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><i></i><i>magic</i><dd>)0 12 Q(The inte)0 -24 Q(ger v)-.15 E(alue octal 070707.)-.25 E(This v)0 36 Q -(alue can be used to determine whether this archi)-.25 E .3 -.15(ve i) --.25 H(s).15 E(written with little-endian or big-endian inte)0 48 Q -(gers.)-.15 E(<p><dt><i></i><i>de)0 60 Q(v</i><i></i>,<i> ino</i><dd>) --.25 E(The de)0 72 Q(vice and inode numbers from the disk.)-.25 E 0 Cg -EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(These are used by programs that read)0 12 Q -(<b>cpio</b>)0 24 Q(archi)0 36 Q -.15(ve)-.25 G 2.5(st).15 G 2.5(od)-2.5 -G(etermine when tw)-2.5 E 2.5(oe)-.1 G(ntries refer to the same \214le.) --2.5 E(Programs that synthesize)0 48 Q(<b>cpio</b>)0 60 Q(archi)0 72 Q --.15(ve)-.25 G 2.5(ss).15 G(hould be careful to set these to distinct v) --2.5 E(alues for each entry)-.25 E(.)-.65 E 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><i></i><i>mode</i><dd>)0 12 Q -(The mode speci\214es both the re)0 24 Q -(gular permissions and the \214le type.)-.15 E(It consists of se)0 36 Q --.15(ve)-.25 G(ral bit \214elds as follo).15 E(ws:)-.25 E(<dl compact>)0 -48 Q(<dt>0170000<dd>)0 60 Q(This masks the \214le type bits.)0 72 Q 0 Cg -EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt>0140000<dd>)0 12 Q(File type v)0 24 Q -(alue for sock)-.25 E(ets.)-.1 E(<dt>0120000<dd>)0 36 Q(File type v)0 48 -Q(alue for symbolic links.)-.25 E -.15(Fo)0 60 S 2.5(rs).15 G -(ymbolic links, the link body is stored as \214le data.)-2.5 E -(<dt>0100000<dd>)0 72 Q 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(File type v)0 12 Q(alue for re)-.25 E -(gular \214les.)-.15 E(<dt>0060000<dd>)0 24 Q(File type v)0 36 Q -(alue for block special de)-.25 E(vices.)-.25 E(<dt>0040000<dd>)0 48 Q -(File type v)0 60 Q(alue for directories.)-.25 E(<dt>0020000<dd>)0 72 Q -0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(File type v)0 12 Q -(alue for character special de)-.25 E(vices.)-.25 E(<dt>0010000<dd>)0 24 -Q(File type v)0 36 Q(alue for named pipes or FIFOs.)-.25 E -(<dt>0004000<dd>)0 48 Q(SUID bit.)0 60 Q(<dt>0002000<dd>)0 72 Q 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(SGID bit.)0 12 Q(<dt>0001000<dd>)0 24 Q(Stick)0 -36 Q 2.5(yb)-.15 G(it.)-2.5 E(On some systems, this modi\214es the beha) -0 48 Q(vior of e)-.2 E -.15(xe)-.15 G(cutables and/or directories.).15 E -(<dt>0000777<dd>)0 60 Q(The lo)0 72 Q(wer 9 bits specify read/write/e) --.25 E -.15(xe)-.15 G(cute permissions).15 E 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(for w)0 12 Q(orld, group, and user follo)-.1 E -(wing standard POSIX con)-.25 E -.15(ve)-.4 G(ntions.).15 E(</dl>)0 24 Q -(<p><dt><i></i><i>uid</i><i></i>,<i> gid</i><dd>)0 36 Q -(The numeric user id and group id of the o)0 48 Q(wner)-.25 E(.)-.55 E -(<p><dt><i></i><i>nlink</i><dd>)0 60 Q -(The number of links to this \214le.)0 72 Q 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Directories al)0 12 Q -.1(wa)-.1 G(ys ha).1 E .3 --.15(ve a v)-.2 H(alue of at least tw)-.1 E 2.5(oh)-.1 G(ere.)-2.5 E -(Note that hardlink)0 24 Q(ed \214les include \214le data with e)-.1 E --.15(ve)-.25 G(ry cop).15 E 2.5(yi)-.1 G 2.5(nt)-2.5 G(he archi)-2.5 E --.15(ve)-.25 G(.).15 E(<p><dt><i></i><i>rde)0 36 Q(v</i><dd>)-.25 E -.15 -(Fo)0 48 S 2.5(rb).15 G(lock special and character special entries,)-2.5 -E(this \214eld contains the associated de)0 60 Q(vice number)-.25 E(.) --.55 E -.15(Fo)0 72 S 2.5(ra).15 G -(ll other entry types, it should be set to zero by writers)-2.5 E 0 Cg -EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and ignored by readers.)0 12 Q -(<p><dt><i></i><i>mtime</i><dd>)0 24 Q -(Modi\214cation time of the \214le, indicated as the number)0 36 Q -(of seconds since the start of the epoch,)0 48 Q -(00:00:00 UTC January 1, 1970.)0 60 Q(The four)0 72 Q(-byte inte)-.2 E -(ger is stored with the most-signi\214cant 16 bits \214rst)-.15 E 0 Cg -EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(follo)0 12 Q -(wed by the least-signi\214cant 16 bits.)-.25 E(Each of the tw)0 24 Q -2.5(o1)-.1 G 2.5(6b)-2.5 G(it v)-2.5 E(alues are stored in machine-nati) --.25 E .3 -.15(ve b)-.25 H(yte order).15 E(.)-.55 E -(<p><dt><i></i><i>namesize</i><dd>)0 36 Q -(The number of bytes in the pathname that follo)0 48 Q(ws the header) --.25 E(.)-.55 E(This count includes the trailing NUL byte.)0 60 Q -(<p><dt><i></i><i>\214lesize</i><dd>)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The size of the \214le.)0 12 Q -(Note that this archi)0 24 Q .3 -.15(ve f)-.25 H(ormat is limited to).15 -E(four gig)0 36 Q(abyte \214le sizes.)-.05 E(See)0 48 Q -(<i></i><i>mtime</i>)0 60 Q(abo)0 72 Q .3 -.15(ve f)-.15 H -(or a description of the storage of four).15 E(-byte inte)-.2 E(gers.) --.15 E 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p>)36 24 Q -(The pathname immediately follo)0 36 Q(ws the \214x)-.25 E(ed header) --.15 E(.)-.55 E(If the)0 48 Q(<b></b><b>namesize</b>)0 60 Q -(is odd, an additional NUL byte is added after the pathname.)0 72 Q 0 Cg -EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(The \214le data is then appended, padded with NUL)0 12 Q(bytes to an e) -0 24 Q -.15(ve)-.25 G 2.5(nl).15 G(ength.)-2.5 E(<p>)36 36 Q(Hardlink)0 -48 Q(ed \214les are not gi)-.1 E -.15(ve)-.25 G 2.5(ns).15 G -(pecial treatment;)-2.5 E -(the full \214le contents are included with each cop)0 60 Q 2.5(yo)-.1 G -2.5(ft)-2.5 G(he)-2.5 E(\214le.)0 72 Q 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h4 id="Portable ASCII F)36 12 Q(ormat">)-.15 E -(Portable ASCII F)36 24 Q(ormat)-.15 E(</h4>)36 36 Q -1.11(Ve)2.5 48 S -(rsion 2 of the Single UNIX Speci\214cation \(`)1.11 E(`SUSv2')-.74 E -('\))-.74 E(standardized an ASCII v)0 60 Q -(ariant that is portable across all)-.25 E(platforms.)0 72 Q 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(It is commonly kno)0 12 Q(wn as the)-.25 E -.74 -(``)0 24 S(old character').74 E(')-.74 E(format or as the)0 36 Q -.74 -(``)0 48 S(odc').74 E(')-.74 E(format.)0 60 Q -(It stores the same numeric \214elds as the old binary format, b)0 72 Q -(ut)-.2 E 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(represents them as 6-character or 11-character octal v)0 12 Q(alues.) --.25 E(<dl compact><dt><dd>)0 24 Q(<code>)0 36 Q(<pre>)0 48 Q -(struct cpio_odc_header {)0 60 Q 7.5(char c_magic[6];)20 72 R 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 7.5(char c_de)20 12 R(v[6];)-.25 E 7.5 -(char c_ino[6];)20 24 R 7.5(char c_mode[6];)20 36 R 7.5(char c_uid[6];) -20 48 R 7.5(char c_gid[6];)20 60 R 7.5(char c_nlink[6];)20 72 R 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 7.5(char c_rde)20 12 R(v[6];)-.25 E 7.5 -(char c_mtime[11];)20 24 R 7.5(char c_namesize[6];)20 36 R 7.5 -(char c_\214lesize[11];)20 48 R(};)0 60 Q(</pre>)0 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</code>)0 12 Q(</dl>)0 24 Q(<p>)36 36 Q -(The \214elds are identical to those in the old binary format.)0 48 Q -(The name and \214le body follo)0 60 Q 2.5(wt)-.25 G(he \214x)-2.5 E -(ed header)-.15 E(.)-.55 E(Unlik)0 72 Q 2.5(et)-.1 G -(he old binary format, there is no additional padding)-2.5 E 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(after the pathname or \214le contents.)0 12 Q -(If the \214les being archi)0 24 Q -.15(ve)-.25 G 2.5(da).15 G -(re themselv)-2.5 E(es entirely ASCII, then)-.15 E(the resulting archi)0 -36 Q .3 -.15(ve w)-.25 H(ill be entirely ASCII, e).15 E(xcept for the) --.15 E(NUL byte that terminates the name \214eld.)0 48 Q(<h4 id="Ne)36 -60 Q 2.5(wA)-.25 G(SCII F)-2.5 E(ormat">)-.15 E(Ne)36 72 Q 2.5(wA)-.25 G -(SCII F)-2.5 E(ormat)-.15 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(The "ne)0 24 Q -(w" ASCII format uses 8-byte he)-.25 E(xadecimal \214elds for)-.15 E -(all numbers and separates de)0 36 Q -(vice numbers into separate \214elds)-.25 E -(for major and minor numbers.)0 48 Q(<dl compact><dt><dd>)0 60 Q(<code>) -0 72 Q 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<pre>)0 12 Q(struct cpio_ne)0 24 Q(wc_header {) --.25 E 7.5(char c_magic[6];)20 36 R 7.5(char c_ino[8];)20 48 R 7.5 -(char c_mode[8];)20 60 R 7.5(char c_uid[8];)20 72 R 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 7.5(char c_gid[8];)20 12 R 7.5(char c_nlink[8];) -20 24 R 7.5(char c_mtime[8];)20 36 R 7.5(char c_\214lesize[8];)20 48 R -7.5(char c_de)20 60 R(vmajor[8];)-.25 E 7.5(char c_de)20 72 R -(vminor[8];)-.25 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 7.5(char c_rde)20 12 R(vmajor[8];)-.25 E 7.5 -(char c_rde)20 24 R(vminor[8];)-.25 E 7.5(char c_namesize[8];)20 36 R -7.5(char c_check[8];)20 48 R(};)0 60 Q(</pre>)0 72 Q 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</code>)0 12 Q(</dl>)0 24 Q(<p>)36 36 Q -(Except as speci\214ed belo)0 48 Q 1.3 -.65(w, t)-.25 H -(he \214elds here match those speci\214ed).65 E -(for the old binary format abo)0 60 Q -.15(ve)-.15 G(.).15 E -(<dl compact>)0 72 Q 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><i></i><i>magic</i><dd>)0 12 Q -(The string)0 24 Q -.74(``)0 36 S(070701').74 E('.)-.74 E -(<p><dt><i></i><i>check</i><dd>)0 48 Q(This \214eld is al)0 60 Q -.1(wa) --.1 G(ys set to zero by writers and ignored by readers.).1 E(See the ne) -0 72 Q(xt section for more details.)-.15 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p>)36 24 Q(The pathname is follo)0 -36 Q(wed by NUL bytes so that the total size)-.25 E(of the \214x)0 48 Q -(ed header plus pathname is a multiple of four)-.15 E(.)-.55 E(Lik)0 60 -Q -.25(ew)-.1 G -(ise, the \214le data is padded to a multiple of four bytes.).25 E -(Note that this format supports only 4 gig)0 72 Q(abyte \214les \(unlik) --.05 E 2.5(et)-.1 G(he)-2.5 E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(older ASCII format, which supports 8 gig)0 12 Q -(abyte \214les\).)-.05 E(<p>)36 24 Q(In this format, hardlink)0 36 Q -(ed \214les are handled by setting the)-.1 E -(\214lesize to zero for each entry e)0 48 Q(xcept the last one that)-.15 -E(appears in the archi)0 60 Q -.15(ve)-.25 G(.).15 E(<h4 id="Ne)36 72 Q -2.5(wC)-.25 G(RC F)-2.5 E(ormat">)-.15 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Ne)36 12 Q 2.5(wC)-.25 G(RC F)-2.5 E(ormat)-.15 -E(</h4>)36 24 Q(The CRC format is identical to the ne)0 36 Q 2.5(wA)-.25 -G(SCII format described)-2.5 E(in the pre)0 48 Q(vious section e)-.25 E -(xcept that the magic \214eld is set)-.15 E(to)0 60 Q -.74(``)0 72 S -(070702').74 E(')-.74 E 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and the)0 12 Q(<i></i><i>check</i>)0 24 Q -(\214eld is set to the sum of all bytes in the \214le data.)0 36 Q -(This sum is computed treating all bytes as unsigned v)0 48 Q(alues)-.25 -E(and using unsigned arithmetic.)0 60 Q -(Only the least-signi\214cant 32 bits of the sum are stored.)0 72 Q 0 Cg -EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h4 id="HP v)36 12 Q(ariants">)-.25 E(HP v)36 24 -Q(ariants)-.25 E(</h4>)36 36 Q(The)0 48 Q(<b>cpio</b>)0 60 Q -(implementation distrib)0 72 Q(uted with HPUX used XXXX b)-.2 E -(ut stored)-.2 E 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(de)0 12 Q(vice numbers dif)-.25 E(ferently XXX.) --.25 E(<h4 id="Other Extensions and V)36 24 Q(ariants">)-1.11 E -(Other Extensions and V)36 36 Q(ariants)-1.11 E(</h4>)36 48 Q -(Sun Solaris uses additional \214le types to store e)0 60 Q -(xtended \214le)-.15 E(data, including A)0 72 Q(CLs and e)-.4 E -(xtended attrib)-.15 E(utes, as special)-.2 E 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(entries in cpio archi)0 12 Q -.15(ve)-.25 G(s.) -.15 E(<p>)36 24 Q(XXX Others? XXX)0 36 Q(<h3 id="B)36 48 Q(UGS">)-.1 E --.1(BU)36 60 S(GS).1 E(</h3>)36 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q -.74(``)0 24 S(CRC').74 E(')-.74 E -(format is mis-named, as it uses a simple checksum and)0 36 Q(not a c)0 -48 Q(yclic redundanc)-.15 E 2.5(yc)-.15 G(heck.)-2.5 E(<p>)36 60 Q -(The old binary format is limited to 16 bits for user id,)0 72 Q 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(group id, de)0 12 Q(vice, and inode numbers.) --.25 E(It is limited to 4 gig)0 24 Q(abyte \214le sizes.)-.05 E(<p>)36 -36 Q(The old ASCII format is limited to 18 bits for)0 48 Q -(the user id, group id, de)0 60 Q(vice, and inode numbers.)-.25 E -(It is limited to 8 gig)0 72 Q(abyte \214le sizes.)-.05 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The ne)0 24 Q 2.5(wA)-.25 G -(SCII format is limited to 4 gig)-2.5 E(abyte \214le sizes.)-.05 E(<p>) -36 36 Q(None of the cpio formats store user or group names,)0 48 Q -(which are essential when mo)0 60 Q(ving \214les between systems with) --.15 E(dissimilar user or group numbering.)0 72 Q 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -(Especially when writing older cpio v)0 24 Q -(ariants, it may be necessary)-.25 E(to map actual de)0 36 Q -(vice/inode v)-.25 E(alues to synthesized v)-.25 E(alues that)-.25 E -(\214t the a)0 48 Q -.25(va)-.2 G(ilable \214elds.).25 E -.4(Wi)0 60 S -(th v).4 E(ery lar)-.15 E(ge \214lesystems, this may be necessary e)-.18 -E -.15(ve)-.25 G 2.5(nf).15 G(or)-2.5 E(the ne)0 72 Q(wer formats.)-.25 -E 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="SEE ALSO">)36 12 Q(SEE ALSO)36 24 Q -(</h3>)36 36 Q(<a href="../html1/cpio.html">cpio\(1\)</a>,)0 48 Q -(<a href="../html5/tar)0 60 Q(.html">tar\(5\)</a>)-.55 E(<h3 id="ST)36 -72 Q(AND)-.93 E(ARDS">)-.4 E 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ST)36 12 Q(AND)-.93 E(ARDS)-.4 E(</h3>)36 24 Q -(The)0 36 Q(<b>cpio</b>)0 48 Q -(utility is no longer a part of POSIX or the Single Unix Standard.)0 60 -Q(It last appeared in)0 72 Q 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.11(Ve)2.5 12 S -(rsion 2 of the Single UNIX Speci\214cation \(`)1.11 E(`SUSv2')-.74 E -('\) .)-.74 E(It has been supplanted in subsequent standards by)0 24 Q -(<a href="../html1/pax.html">pax\(1\)</a>.)0 36 Q(The portable ASCII fo\ -rmat is currently part of the speci\214cation for the)0 48 Q -(<a href="../html1/pax.html">pax\(1\)</a>)0 60 Q(utility)0 72 Q(.)-.65 E -0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="HIST)36 12 Q(OR)-.18 E(Y">)-.65 E(HIST) -36 24 Q(OR)-.18 E(Y)-.65 E(</h3>)36 36 Q(The original cpio utility w)0 -48 Q(as written by Dick Haight)-.1 E(while w)0 60 Q(orking in A)-.1 E -(T&T')-1.11 E 2.5(sU)-.55 G(nix Support Group.)-2.5 E -(It appeared in 1977 as part of PWB/UNIX 1.0, the)0 72 Q 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(Programmer').74 E 2.5(sW)-.55 G -(ork Bench')-3.3 E(')-.74 E(deri)0 24 Q -.15(ve)-.25 G 2.5(df).15 G(rom) --2.5 E -1.11(Ve)0 36 S(rsion 6 <code>A)1.11 E(T&T UNIX</code>)-1.11 E -(that w)0 48 Q(as used internally at A)-.1 E(T&T)-1.11 E(.)-.74 E -(Both the old binary and old character formats were in use)0 60 Q -(by 1980, according to the System III source released)0 72 Q 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(by SCO under their)0 12 Q -.74(``)0 24 S -(Ancient Unix')-.06 E(')-.74 E(license.)0 36 Q(The character format w)0 -48 Q(as adopted as part of)-.1 E(IEEE Std 1003.1-1988 \(`)2.5 60 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\) .)-.74 E(XXX when did "ne)0 -72 Q(wc" appear?)-.25 E(Who in)5 E -.15(ve)-.4 G(nted it?).15 E -(When did HP come out with their v)5 E 2.5(ariant? When)-.25 F -(did Sun introduce A)2.5 E(CLs and e)-.4 E(xtended attrib)-.15 E -(utes? XXX)-.2 E 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</body>)0 12 Q(</html>)0 24 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:26 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">CPIO(5) FreeBSD File Formats Manual +CPIO(5)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>cpio</b> — format of +cpio archive files</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">The <b>cpio</b> archive format +collects any number of files, directories, and other file +system objects (symbolic links, device nodes, etc.) into a +single stream of bytes.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>General +Format</b> <br> +Each file system object in a <b>cpio</b> archive comprises a +header record with basic numeric metadata followed by the +full pathname of the entry and the file data. The header +record stores a series of integer values that generally +follow the fields in <i>struct stat</i>. (See stat(2) for +details.) The variants differ primarily in how they store +those integers (binary, octal, or hexadecimal). The header +is followed by the pathname of the entry (the length of the +pathname is stored in the header) and any file data. The end +of the archive is indicated by a special record with the +pathname ‘‘TRAILER!!!’’.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>PWB +format</b> <br> +XXX Any documentation of the original PWB/UNIX 1.0 format? +XXX</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Old Binary +Format</b> <br> +The old binary <b>cpio</b> format stores numbers as 2-byte +and 4-byte binary values. Each entry begins with a header in +the following format:</p> + +<p style="margin-left:17%; margin-top: 1em">struct +header_old_cpio { <br> +unsigned short c_magic; <br> +unsigned short c_dev; <br> +unsigned short c_ino; <br> +unsigned short c_mode; <br> +unsigned short c_uid; <br> +unsigned short c_gid; <br> +unsigned short c_nlink; <br> +unsigned short c_rdev;</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">unsigned short c_mtime[2];</p></td> +<td width="58%"> +</td> +</table> + +<p style="margin-left:17%;">unsigned short c_namesize;</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="71%"> + + +<p valign="top">unsigned short c_filesize[2];</p></td> +</table> + +<p style="margin-left:17%;">};</p> + +<p style="margin-left:8%; margin-top: 1em">The <i>unsigned +short</i> fields here are 16-bit integer values; the +<i>unsigned int</i> fields are 32-bit integer values. The +fields are as follows</p> + +<p style="margin-top: 1em" valign="top"><i>magic</i></p> + +<p style="margin-left:20%; margin-top: 1em">The integer +value octal 070707. This value can be used to determine +whether this archive is written with little-endian or +big-endian integers.</p> + +<p style="margin-top: 1em" valign="top"><i>dev</i>, +<i>ino</i></p> + +<p style="margin-left:20%;">The device and inode numbers +from the disk. These are used by programs that read +<b>cpio</b> archives to determine when two entries refer to +the same file. Programs that synthesize <b>cpio</b> archives +should be careful to set these to distinct values for each +entry.</p> + +<p style="margin-top: 1em" valign="top"><i>mode</i></p> + +<p style="margin-left:20%; margin-top: 1em">The mode +specifies both the regular permissions and the file type. It +consists of several bit fields as follows:</p> + +<p valign="top">0170000</p> + +<p style="margin-left:34%; margin-top: 1em">This masks the +file type bits.</p> + +<p valign="top">0140000</p> + +<p style="margin-left:34%; margin-top: 1em">File type value +for sockets.</p> + +<p valign="top">0120000</p> + +<p style="margin-left:34%; margin-top: 1em">File type value +for symbolic links. For symbolic links, the link body is +stored as file data.</p> + +<p valign="top">0100000</p> + +<p style="margin-left:34%; margin-top: 1em">File type value +for regular files.</p> + +<p valign="top">0060000</p> + +<p style="margin-left:34%; margin-top: 1em">File type value +for block special devices.</p> + +<p valign="top">0040000</p> + +<p style="margin-left:34%; margin-top: 1em">File type value +for directories.</p> + +<p valign="top">0020000</p> + +<p style="margin-left:34%; margin-top: 1em">File type value +for character special devices.</p> + +<p valign="top">0010000</p> + +<p style="margin-left:34%; margin-top: 1em">File type value +for named pipes or FIFOs.</p> + +<p valign="top">0004000</p> + +<p style="margin-left:34%; margin-top: 1em">SUID bit.</p> + +<p valign="top">0002000</p> + +<p style="margin-left:34%; margin-top: 1em">SGID bit.</p> + +<p valign="top">0001000</p> + +<p style="margin-left:34%; margin-top: 1em">Sticky bit. On +some systems, this modifies the behavior of executables +and/or directories.</p> + +<p valign="top">0000777</p> + +<p style="margin-left:34%; margin-top: 1em">The lower 9 +bits specify read/write/execute permissions for world, +group, and user following standard POSIX conventions.</p> + +<p style="margin-top: 1em" valign="top"><i>uid</i>, +<i>gid</i></p> + +<p style="margin-left:20%;">The numeric user id and group +id of the owner.</p> + +<p style="margin-top: 1em" valign="top"><i>nlink</i></p> + +<p style="margin-left:20%; margin-top: 1em">The number of +links to this file. Directories always have a value of at +least two here. Note that hardlinked files include file data +with every copy in the archive.</p> + +<p style="margin-top: 1em" valign="top"><i>rdev</i></p> + +<p style="margin-left:20%; margin-top: 1em">For block +special and character special entries, this field contains +the associated device number. For all other entry types, it +should be set to zero by writers and ignored by readers.</p> + +<p style="margin-top: 1em" valign="top"><i>mtime</i></p> + +<p style="margin-left:20%; margin-top: 1em">Modification +time of the file, indicated as the number of seconds since +the start of the epoch, 00:00:00 UTC January 1, 1970. The +four-byte integer is stored with the most-significant 16 +bits first followed by the least-significant 16 bits. Each +of the two 16 bit values are stored in machine-native byte +order.</p> + + +<p style="margin-top: 1em" valign="top"><i>namesize</i></p> + +<p style="margin-left:20%;">The number of bytes in the +pathname that follows the header. This count includes the +trailing NUL byte.</p> + + +<p style="margin-top: 1em" valign="top"><i>filesize</i></p> + +<p style="margin-left:20%;">The size of the file. Note that +this archive format is limited to four gigabyte file sizes. +See <i>mtime</i> above for a description of the storage of +four-byte integers.</p> + +<p style="margin-left:8%; margin-top: 1em">The pathname +immediately follows the fixed header. If the <b>namesize</b> +is odd, an additional NUL byte is added after the pathname. +The file data is then appended, padded with NUL bytes to an +even length.</p> + +<p style="margin-left:8%; margin-top: 1em">Hardlinked files +are not given special treatment; the full file contents are +included with each copy of the file.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Portable +ASCII Format</b> <br> +Version 2 of the Single UNIX Specification +(‘‘SUSv2’’) standardized an ASCII +variant that is portable across all platforms. It is +commonly known as the ‘‘old +character’’ format or as the +‘‘odc’’ format. It stores the same +numeric fields as the old binary format, but represents them +as 6-character or 11-character octal values.</p> + +<p style="margin-left:17%; margin-top: 1em">struct +cpio_odc_header { <br> +char c_magic[6]; <br> +char c_dev[6]; <br> +char c_ino[6]; <br> +char c_mode[6]; <br> +char c_uid[6]; <br> +char c_gid[6]; <br> +char c_nlink[6]; <br> +char c_rdev[6]; <br> +char c_mtime[11]; <br> +char c_namesize[6]; <br> +char c_filesize[11]; <br> +};</p> + +<p style="margin-left:8%; margin-top: 1em">The fields are +identical to those in the old binary format. The name and +file body follow the fixed header. Unlike the old binary +format, there is no additional padding after the pathname or +file contents. If the files being archived are themselves +entirely ASCII, then the resulting archive will be entirely +ASCII, except for the NUL byte that terminates the name +field.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>New ASCII +Format</b> <br> +The "new" ASCII format uses 8-byte hexadecimal +fields for all numbers and separates device numbers into +separate fields for major and minor numbers.</p> + +<p style="margin-left:17%; margin-top: 1em">struct +cpio_newc_header { <br> +char c_magic[6]; <br> +char c_ino[8]; <br> +char c_mode[8]; <br> +char c_uid[8]; <br> +char c_gid[8]; <br> +char c_nlink[8]; <br> +char c_mtime[8]; <br> +char c_filesize[8]; <br> +char c_devmajor[8]; <br> +char c_devminor[8]; <br> +char c_rdevmajor[8]; <br> +char c_rdevminor[8]; <br> +char c_namesize[8]; <br> +char c_check[8]; <br> +};</p> + +<p style="margin-left:8%; margin-top: 1em">Except as +specified below, the fields here match those specified for +the old binary format above.</p> + +<p style="margin-top: 1em" valign="top"><i>magic</i></p> + +<p style="margin-left:20%; margin-top: 1em">The string +‘‘070701’’.</p> + +<p style="margin-top: 1em" valign="top"><i>check</i></p> + +<p style="margin-left:20%; margin-top: 1em">This field is +always set to zero by writers and ignored by readers. See +the next section for more details.</p> + +<p style="margin-left:8%; margin-top: 1em">The pathname is +followed by NUL bytes so that the total size of the fixed +header plus pathname is a multiple of four. Likewise, the +file data is padded to a multiple of four bytes. Note that +this format supports only 4 gigabyte files (unlike the older +ASCII format, which supports 8 gigabyte files).</p> + +<p style="margin-left:8%; margin-top: 1em">In this format, +hardlinked files are handled by setting the filesize to zero +for each entry except the last one that appears in the +archive.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>New CRC +Format</b> <br> +The CRC format is identical to the new ASCII format +described in the previous section except that the magic +field is set to ‘‘070702’’ and the +<i>check</i> field is set to the sum of all bytes in the +file data. This sum is computed treating all bytes as +unsigned values and using unsigned arithmetic. Only the +least-significant 32 bits of the sum are stored.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>HP +variants</b> <br> +The <b>cpio</b> implementation distributed with HPUX used +XXXX but stored device numbers differently XXX.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Other +Extensions and Variants</b> <br> +Sun Solaris uses additional file types to store extended +file data, including ACLs and extended attributes, as +special entries in cpio archives.</p> + +<p style="margin-left:8%; margin-top: 1em">XXX Others? +XXX</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">The +‘‘CRC’’ format is mis-named, as it +uses a simple checksum and not a cyclic redundancy +check.</p> + +<p style="margin-left:8%; margin-top: 1em">The old binary +format is limited to 16 bits for user id, group id, device, +and inode numbers. It is limited to 4 gigabyte file +sizes.</p> + +<p style="margin-left:8%; margin-top: 1em">The old ASCII +format is limited to 18 bits for the user id, group id, +device, and inode numbers. It is limited to 8 gigabyte file +sizes.</p> + +<p style="margin-left:8%; margin-top: 1em">The new ASCII +format is limited to 4 gigabyte file sizes.</p> + +<p style="margin-left:8%; margin-top: 1em">None of the cpio +formats store user or group names, which are essential when +moving files between systems with dissimilar user or group +numbering.</p> + +<p style="margin-left:8%; margin-top: 1em">Especially when +writing older cpio variants, it may be necessary to map +actual device/inode values to synthesized values that fit +the available fields. With very large filesystems, this may +be necessary even for the newer formats.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">cpio(1), tar(5)</p> + + +<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p> + +<p style="margin-left:8%;">The <b>cpio</b> utility is no +longer a part of POSIX or the Single Unix Standard. It last +appeared in Version 2 of the Single UNIX Specification +(‘‘SUSv2’’). It has been supplanted +in subsequent standards by pax(1). The portable ASCII format +is currently part of the specification for the pax(1) +utility.</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The original cpio utility was +written by Dick Haight while working in AT&T’s +Unix Support Group. It appeared in 1977 as part of PWB/UNIX +1.0, the ‘‘Programmer’s Work +Bench’’ derived from Version 6 AT&T +UNIX that was used internally at AT&T. Both the old +binary and old character formats were in use by 1980, +according to the System III source released by SCO under +their ‘‘Ancient Unix’’ license. The +character format was adopted as part of IEEE Std 1003.1-1988 +(‘‘POSIX.1’’). XXX when did +"newc" appear? Who invented it? When did HP come +out with their variant? When did Sun introduce ACLs and +extended attributes? XXX</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +October 5, 2007 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/libarchive-formats.5.html b/archivers/libarchive/files/doc/html/libarchive-formats.5.html index 686061dcd92..bceba09a4f8 100644 --- a/archivers/libarchive/files/doc/html/libarchive-formats.5.html +++ b/archivers/libarchive/files/doc/html/libarchive-formats.5.html @@ -1,895 +1,375 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:17 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 61 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(December 27, 2009 libarchi)74.5 48 Q -.15(ve)-.25 G(-formats 5).15 E -(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(-formats</b>) -.15 E 2.5(-a)0 60 S(rchi)-2.5 E .3 -.15(ve f)-.25 H -(ormats supported by the libarchi).15 E .3 -.15(ve l)-.25 H(ibrary).15 E -(<h3 id="DESCRIPTION">)36 72 Q 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(The)0 36 Q -(<a href="../html3/libarchi)0 48 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E(library reads and writes a v)0 60 Q -(ariety of streaming archi)-.25 E .3 -.15(ve f)-.25 H(ormats.).15 E -(Generally speaking, all of these archi)0 72 Q .3 -.15(ve f)-.25 H -(ormats consist of a series of).15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(entries').74 E('.)-.74 E(Each en\ -try stores a single \214le system object, such as a \214le, directory)0 -24 Q(,)-.65 E(or symbolic link.)0 36 Q(<p>)36 48 Q(The follo)0 60 Q -(wing pro)-.25 E(vides a brief description of each format supported)-.15 -E(by libarchi)0 72 Q -.15(ve)-.25 G 2.5(,w).15 G -(ith some information about recognized e)-2.5 E(xtensions or)-.15 E 0 Cg -EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(limitations of the current library support.)0 12 -Q(Note that just because a format is supported by libarchi)0 24 Q .3 --.15(ve d)-.25 H(oes not).15 E(imply that a program that uses libarchi)0 -36 Q .3 -.15(ve w)-.25 H(ill support that format.).15 E -(Applications that use libarchi)0 48 Q .3 -.15(ve s)-.25 H -(pecify which formats the).15 E 2.5(yw)-.15 G(ish)-2.5 E -(to support, though man)0 60 Q 2.5(yp)-.15 G(rograms do use libarchi) --2.5 E .3 -.15(ve c)-.25 H(on).15 E -.15(ve)-.4 G(nience).15 E -(functions to enable all supported formats.)0 72 Q 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h4 id="T)36 12 Q(ar F)-.8 E(ormats">)-.15 E -.8 -(Ta)36 24 S 2.5(rF).8 G(ormats)-2.65 E(</h4>)36 36 Q(The)0 48 Q -(<a href="../html3/libarchi)0 60 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E(library can read most tar archi)0 72 Q --.15(ve)-.25 G(s.).15 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Ho)0 12 Q(we)-.25 E -.15(ve)-.25 G .8 -.4(r, i) -.15 H 2.5(to).4 G(nly writes POSIX-standard)-2.5 E -.74(``)0 24 S -(ustar').74 E(')-.74 E(and)0 36 Q -.74(``)0 48 S(pax interchange').74 E -(')-.74 E(formats.)0 60 Q(<p>)36 72 Q 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(All tar formats store each entry in one or more 512-byte records.)0 12 -Q(The \214rst record is used for \214le metadata, including \214lename,) -0 24 Q -(timestamp, and mode information, and the \214le data is stored in)0 36 -Q(subsequent records.)0 48 Q(Later v)0 60 Q(ariants ha)-.25 E .3 -.15 -(ve ex)-.2 H(tended this by either appropriating unde\214ned).15 E -(areas of the header record, e)0 72 Q -(xtending the header to multiple records,)-.15 E 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(or by storing special entries that modify the interpretation of)0 12 Q -(subsequent entries.)0 24 Q(<p>)36 36 Q(<dl compact>)0 48 Q -(<p><dt><b></b><b>gnutar</b><dd>)0 60 Q(The)0 72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/libarchi)0 12 Q -.15(ve)-.25 G -(.html">libarchi).15 E -.15(ve)-.25 G(\(3\)</a>).15 E -(library can read GNU-format tar archi)0 24 Q -.15(ve)-.25 G(s.).15 E -(It currently supports the most popular GNU e)0 36 Q -(xtensions, including)-.15 E(modern long \214lename and linkname suppor\ -t, as well as atime and ctime data.)0 48 Q(The libarchi)0 60 Q .3 -.15 -(ve l)-.25 H(ibrary does not support multi-v).15 E(olume)-.2 E(archi)0 -72 Q -.15(ve)-.25 G(s, nor the old GNU long \214lename format.).15 E 0 -Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(It can read GNU sparse \214le entries, including the ne)0 12 Q 2.5(wP) --.25 G(OSIX-based)-2.5 E(formats, b)0 24 Q -(ut cannot write GNU sparse \214le entries.)-.2 E -(<p><dt><b></b><b>pax</b><dd>)0 36 Q(The)0 48 Q -(<a href="../html3/libarchi)0 60 Q -.15(ve)-.25 G(.html">libarchi).15 E --.15(ve)-.25 G(\(3\)</a>).15 E -(library can read and write POSIX-compliant pax interchange format)0 72 -Q 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G(s.).15 E -.15(Pa)0 -24 S 2.5(xi).15 G(nterchange format archi)-2.5 E -.15(ve)-.25 G 2.5(sa) -.15 G(re an e)-2.5 E(xtension of the older ustar)-.15 E -(format that adds a separate entry with additional attrib)0 36 Q -(utes stored)-.2 E(as k)0 48 Q -.15(ey)-.1 G(/v).15 E -(alue pairs immediately before each re)-.25 E(gular entry)-.15 E(.)-.65 -E(The presence of these additional entries is the only dif)0 60 Q -(ference between)-.25 E -(pax interchange format and the older ustar format.)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The e)0 12 Q(xtended attrib)-.15 E -(utes are of unlimited length and are stored)-.2 E -(as UTF-8 Unicode strings.)0 24 Q -2.15 -.25(Ke y)0 36 T -.1(wo).25 G -(rds de\214ned in the standard are in all lo).1 E(wercase; v)-.25 E -(endors are allo)-.15 E(wed)-.25 E(to de\214ne custom k)0 48 Q -.15(ey) --.1 G 2.5(sb).15 G 2.5(yp)-2.5 G(receding them with the v)-2.5 E -(endor name in all uppercase.)-.15 E(When writing pax archi)0 60 Q -.15 -(ve)-.25 G(s, libarchi).15 E .3 -.15(ve u)-.25 H(ses man).15 E 2.5(yo) --.15 G 2.5(ft)-2.5 G(he SCHIL)-2.5 E 2.5(Yk)-1 G -.15(ey)-2.6 G(s).15 E -(de\214ned by Joer)0 72 Q 2.5(gS)-.18 G(chilling')-2.5 E(s)-.55 E 0 Cg -EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(star').74 E(')-.74 E(archi)0 24 Q --.15(ve)-.25 G 2.5(ra).15 G(nd a fe)-2.5 E 2.5(wL)-.25 G(IB)-2.5 E -(ARCHIVE k)-.35 E -.15(ey)-.1 G(s.).15 E(The libarchi)0 36 Q .3 -.15 -(ve l)-.25 H(ibrary can read most of the SCHIL).15 E 2.5(Yk)-1 G -.15 -(ey)-2.6 G(s).15 E(and most of the GNU k)0 48 Q -.15(ey)-.1 G 2.5(si).15 -G(ntroduced by GNU tar)-2.5 E(.)-.55 E(It silently ignores an)0 60 Q 2.5 -(yk)-.15 G -.15(ey)-2.6 G -.1(wo).15 G(rds that it does not understand.) -.1 E(<p><dt><b></b><b>restricted</b><b> pax</b><dd>)0 72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The libarchi)0 12 Q .3 -.15(ve l)-.25 H -(ibrary can also write pax archi).15 E -.15(ve)-.25 G 2.5(si).15 G 2.5 -(nw)-2.5 G(hich it)-2.5 E(attempts to suppress the e)0 24 Q -(xtended attrib)-.15 E(utes entry whene)-.2 E -.15(ve)-.25 G(r).15 E -(possible.)0 36 Q(The result will be identical to a ustar archi)0 48 Q -.3 -.15(ve u)-.25 H(nless the).15 E -.15(ex)0 60 S(tended attrib).15 E -(utes entry is required to store a long \214le)-.2 E -(name, long linkname, e)0 72 Q(xtended A)-.15 E -(CL, \214le \215ags, or if an)-.4 E 2.5(yo)-.15 G 2.5(ft)-2.5 G -(he standard)-2.5 E 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(ustar data \(user name, group name, UID, GID, etc\) cannot be fully)0 -12 Q(represented in the ustar header)0 24 Q(.)-.55 E -(In all cases, the result can be dearchi)0 36 Q -.15(ve)-.25 G 2.5(db) -.15 G 2.5(ya)-2.5 G .3 -.15(ny p)-2.5 H(rogram that).15 E -(can read POSIX-compliant pax interchange format archi)0 48 Q -.15(ve) --.25 G(s.).15 E(Programs that correctly read ustar format \(see belo)0 -60 Q(w\) will also be)-.25 E(able to read this format; an)0 72 Q 2.5(ye) --.15 G(xtended attrib)-2.65 E(utes will be e)-.2 E(xtracted as)-.15 E 0 -Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(separate \214les stored in)0 12 Q -(<code></code><code>P)0 24 Q(axHeader</code>)-.15 E(directories.)0 36 Q -(<p><dt><b></b><b>ustar</b><dd>)0 48 Q(The libarchi)0 60 Q .3 -.15(ve l) --.25 H(ibrary can both read and write this format.).15 E -(This format has the follo)0 72 Q(wing limitations:)-.25 E 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<ul>)0 12 Q(<li>)0 24 Q(De)0 36 Q -(vice major and minor numbers are limited to 21 bits.)-.25 E -(Nodes with lar)0 48 Q(ger numbers will not be added to the archi)-.18 E --.15(ve)-.25 G(.).15 E(<li>)0 60 Q -.15(Pa)0 72 S(th names in the archi) -.15 E .3 -.15(ve a)-.25 H(re limited to 255 bytes.).15 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(Shorter if there is no / character in e)0 12 Q -(xactly the right place.\))-.15 E(<li>)0 24 Q -(Symbolic links and hard links are stored in the archi)0 36 Q .3 -.15 -(ve w)-.25 H(ith).15 E(the name of the referenced \214le.)0 48 Q -(This name is limited to 100 bytes.)0 60 Q(<li>)0 72 Q 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Extended attrib)0 12 Q -(utes, \214le \215ags, and other e)-.2 E(xtended)-.15 E -(security information cannot be stored.)0 24 Q(<li>)0 36 Q(Archi)0 48 Q -.3 -.15(ve e)-.25 H(ntries are limited to 8 gig).15 E(abytes in size.) --.05 E(</ul>)0 60 Q -(Note that the pax interchange format has none of these restrictions.)0 -72 Q 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p>)36 24 Q(The libarchi)0 36 Q .3 --.15(ve l)-.25 H(ibrary also reads a v).15 E(ariety of commonly-used e) --.25 E(xtensions to)-.15 E(the basic tar format.)0 48 Q(These e)0 60 Q -(xtensions are recognized automatically whene)-.15 E -.15(ve)-.25 G 2.5 -(rt).15 G(he)-2.5 E 2.5(ya)-.15 G(ppear)-2.5 E(.)-.55 E(<dl compact>)0 -72 Q 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt>Numeric e)0 12 Q(xtensions.<dd>)-.15 E -(The POSIX standards require \214x)0 24 Q -(ed-length numeric \214elds to be written with)-.15 E -(some character position reserv)0 36 Q(ed for terminators.)-.15 E -(Libarchi)0 48 Q .3 -.15(ve a)-.25 H(llo).15 E -(ws these \214elds to be written without terminator characters.)-.25 E -(This e)0 60 Q(xtends the allo)-.15 E -.1(wa)-.25 G -(ble range; in particular).1 E 2.5(,u)-.4 G(star archi)-2.5 E -.15(ve) --.25 G 2.5(sw).15 G(ith this)-2.5 E -.15(ex)0 72 S -(tension can support entries up to 64 gig).15 E(abytes in size.)-.05 E 0 -Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Libarchi)0 12 Q .3 -.15(ve a)-.25 H -(lso recognizes base-256 v).15 E(alues in most numeric \214elds.)-.25 E -(This essentially remo)0 24 Q -.15(ve)-.15 G 2.5(sa).15 G -(ll limitations on \214le size, modi\214cation time,)-2.5 E(and de)0 36 -Q(vice numbers.)-.25 E(<p><dt>Solaris e)0 48 Q(xtensions<dd>)-.15 E -(Libarchi)0 60 Q .3 -.15(ve r)-.25 H(ecognizes A).15 E(CL and e)-.4 E -(xtended attrib)-.15 E(ute records written)-.2 E(by Solaris tar)0 72 Q -(.)-.55 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Currently)0 12 Q 2.5(,l)-.65 G(ibarchi)-2.5 E .3 --.15(ve o)-.25 H(nly has support for old-style A).15 E(CLs; the)-.4 E -(ne)0 24 Q(wer NFSv4 A)-.25 E(CLs are recognized b)-.4 E(ut discarded.) --.2 E(</dl>)0 36 Q(<p>)36 48 Q(The \214rst tar program appeared in Se)0 -60 Q -.15(ve)-.25 G(nth Edition Unix in 1979.).15 E(The \214rst of)0 72 -Q(\214cial standard for the tar \214le format w)-.25 E(as the)-.1 E 0 Cg -EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(ustar').74 E(')-.74 E -(\(Unix Standard T)0 24 Q(ar\) format de\214ned by POSIX in 1988.)-.8 E -(POSIX.1-2001 e)0 36 Q(xtended the ustar format to create the)-.15 E --.74(``)0 48 S(pax interchange').74 E(')-.74 E(format.)0 60 Q -(<h4 id="Cpio F)36 72 Q(ormats">)-.15 E 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Cpio F)36 12 Q(ormats)-.15 E(</h4>)36 24 Q -(The libarchi)0 36 Q .3 -.15(ve l)-.25 H -(ibrary can read a number of common cpio v).15 E(ariants and can write) --.25 E -.74(``)0 48 S(odc').74 E(')-.74 E(and)0 60 Q -.74(``)0 72 S(ne) -.74 E(wc')-.25 E(')-.74 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(format archi)0 12 Q -.15(ve)-.25 G(s.).15 E 2.5 -(Ac)0 24 S(pio archi)-2.5 E .3 -.15(ve s)-.25 H -(tores each entry as a \214x).15 E(ed-size header follo)-.15 E(wed)-.25 -E(by a v)0 36 Q(ariable-length \214lename and v)-.25 E -(ariable-length data.)-.25 E(Unlik)0 48 Q 2.5(et)-.1 G -(he tar format, the cpio format does only minimal padding)-2.5 E -(of the header or \214le data.)0 60 Q(There are se)0 72 Q -.15(ve)-.25 G -(ral cpio v).15 E(ariants, which dif)-.25 E(fer primarily in)-.25 E 0 Cg -EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ho)0 12 Q 2.5(wt)-.25 G(he)-2.5 E 2.5(ys)-.15 G -(tore the initial header: some store the v)-2.5 E(alues as)-.25 E -(octal or he)0 24 Q(xadecimal numbers in ASCII, others as binary v)-.15 -E(alues of)-.25 E -.25(va)0 36 S(rying byte order and length.).25 E -(<dl compact>)0 48 Q(<p><dt><b></b><b>binary</b><dd>)0 60 Q -(The libarchi)0 72 Q .3 -.15(ve l)-.25 H -(ibrary transparently reads both big-endian and little-endian).15 E 0 Cg -EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.25(va)0 12 S -(riants of the original binary cpio format.).25 E -(This format used 32-bit binary v)0 24 Q -(alues for \214le size and mtime,)-.25 E(and 16-bit binary v)0 36 Q -(alues for the other \214elds.)-.25 E(<p><dt><b></b><b>odc</b><dd>)0 48 -Q(The libarchi)0 60 Q .3 -.15(ve l)-.25 H -(ibrary can both read and write this).15 E -(POSIX-standard format, which is of)0 72 Q(\214cially kno)-.25 E -(wn as the)-.25 E 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(cpio interchange format').74 E(') --.74 E(or the)0 24 Q -.74(``)0 36 S(octet-oriented cpio archi).74 E .3 --.15(ve f)-.25 H(ormat').15 E(')-.74 E(and sometimes unof)0 48 Q -(\214cially referred to as the)-.25 E -.74(``)0 60 S -(old character format').74 E('.)-.74 E -(This format stores the header contents as octal v)0 72 Q -(alues in ASCII.)-.25 E 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(It is standard, portable, and immune from byte-order confusion.)0 12 Q -(File sizes and mtime are limited to 33 bits \(8GB \214le size\),)0 24 Q -(other \214elds are limited to 18 bits.)0 36 Q -(<p><dt><b></b><b>SVR4</b><dd>)0 48 Q(The libarchi)0 60 Q .3 -.15(ve l) --.25 H(ibrary can read both CRC and non-CRC v).15 E(ariants of)-.25 E -(this format.)0 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The SVR4 format uses eight-digit he)0 12 Q -(xadecimal v)-.15 E(alues for)-.25 E(all header \214elds.)0 24 Q -(This limits \214le size to 4GB, and also limits the mtime and)0 36 Q -(other \214elds to 32 bits.)0 48 Q -(The SVR4 format can optionally include a CRC of the \214le)0 60 Q -(contents, although libarchi)0 72 Q .3 -.15(ve d)-.25 H -(oes not currently v).15 E(erify this CRC.)-.15 E 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p>)36 24 Q -(Cpio \214rst appeared in PWB/UNIX 1.0, which w)0 36 Q -(as released within)-.1 E -1.11(AT)0 48 S(&T in 1977.)1.11 E -(PWB/UNIX 1.0 formed the basis of System III Unix, released outside)0 60 -Q(of A)0 72 Q(T&T in 1981.)-1.11 E 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This mak)0 12 Q(es cpio older than tar)-.1 E 2.5 -(,a)-.4 G(lthough cpio w)-2.5 E(as not included)-.1 E(in V)0 24 Q -(ersion 7 A)-1.11 E(T&T Unix.)-1.11 E -(As a result, the tar command became much better kno)0 36 Q(wn in uni) --.25 E -.15(ve)-.25 G(rsities).15 E(and research groups that used V)0 48 -Q(ersion 7.)-1.11 E(The combination of the)0 60 Q(<b>\214nd</b>)0 72 Q 0 -Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>cpio</b>)0 24 Q(utilities pro)0 36 -Q(vided v)-.15 E(ery precise control o)-.15 E -.15(ve)-.15 G 2.5<728c> -.15 G(le selection.)-2.5 E(Unfortunately)0 48 Q 2.5(,t)-.65 G -(he format has man)-2.5 E 2.5(yl)-.15 G(imitations that mak)-2.5 E 2.5 -(ei)-.1 G 2.5(tu)-2.5 G(nsuitable)-2.5 E(for widespread use.)0 60 Q -(Only the POSIX format permits \214les o)0 72 Q -.15(ve)-.15 G 2.5(r4) -.15 G(GB, and its 18-bit)-2.5 E 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(limit for most other \214elds mak)0 12 Q -(es it unsuitable for modern systems.)-.1 E -(In addition, cpio formats only store numeric UID/GID v)0 24 Q -(alues \(not)-.25 E(usernames and group names\), which can mak)0 36 Q -2.5(ei)-.1 G 2.5(tv)-2.5 G(ery dif)-2.65 E(\214cult to correctly)-.25 E -(transfer archi)0 48 Q -.15(ve)-.25 G 2.5(sa).15 G -(cross systems with dissimilar user numbering.)-2.5 E(<h4 id="Shar F)36 -60 Q(ormats">)-.15 E(Shar F)36 72 Q(ormats)-.15 E 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(A)0 24 Q -.74(``)0 36 S -(shell archi).74 E -.15(ve)-.25 G -.74('').15 G -(is a shell script that, when e)0 48 Q -.15(xe)-.15 G -(cuted on a POSIX-compliant).15 E -(system, will recreate a collection of \214le system objects.)0 60 Q -(The libarchi)0 72 Q .3 -.15(ve l)-.25 H(ibrary can write tw).15 E 2.5 -(od)-.1 G(if)-2.5 E(ferent kinds of shar archi)-.25 E -.15(ve)-.25 G(s:) -.15 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q -(<p><dt><b></b><b>shar</b><dd>)0 24 Q -(The traditional shar format uses a limited set of POSIX)0 36 Q -(commands, including)0 48 Q(<a href="../html1/echo.html">echo\(1\)</a>,) -0 60 Q(<a href="../html1/mkdir)0 72 Q(.html">mkdir\(1\)</a>,)-.55 E 0 Cg -EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q -(<a href="../html1/sed.html">sed\(1\)</a>.)0 24 Q -(It is suitable for portably archi)0 36 Q -(ving small collections of plain te)-.25 E(xt \214les.)-.15 E(Ho)0 48 Q -(we)-.25 E -.15(ve)-.25 G .8 -.4(r, i).15 H 2.5(ti).4 G 2.5(sn)-2.5 G -(ot generally well-suited for lar)-2.5 E(ge archi)-.18 E -.15(ve)-.25 G -(s).15 E(\(man)0 60 Q 2.5(yi)-.15 G(mplementations of)-2.5 E -(<a href="../html1/sh.html">sh\(1\)</a>)0 72 Q 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ha)0 12 Q .3 -.15(ve l)-.2 H -(imits on the size of a script\) nor should it be used with non-te).15 E -(xt \214les.)-.15 E(<p><dt><b></b><b>shardump</b><dd>)0 24 Q -(This format is similar to shar b)0 36 Q(ut encodes \214les using)-.2 E -(<a href="../html1/uuencode.html">uuencode\(1\)</a>)0 48 Q -(so that the result will be a plain te)0 60 Q(xt \214le re)-.15 E -.05 -(ga)-.15 G(rdless of the \214le contents.).05 E(It also includes additi\ -onal shell commands that attempt to reproduce as)0 72 Q 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(man)0 12 Q 2.5<798c>-.15 G(le attrib)-2.5 E -(utes as possible, including o)-.2 E(wner)-.25 E 2.5(,m)-.4 G -(ode, and \215ags.)-2.5 E -(The additional commands used to restore \214le attrib)0 24 Q(utes mak) --.2 E(e)-.1 E(shardump archi)0 36 Q -.15(ve)-.25 G 2.5(sl).15 G -(ess portable than plain shar archi)-2.5 E -.15(ve)-.25 G(s.).15 E -(</dl>)0 48 Q(<h4 id="ISO9660 format">)36 60 Q(ISO9660 format)36 72 Q 0 -Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(Libarchi)0 24 Q .3 -.15(ve c)-.25 -H(an read and e).15 E(xtract from \214les containing ISO9660-compliant) --.15 E(CDR)0 36 Q(OM images.)-.4 E(In man)0 48 Q 2.5(yc)-.15 G -(ases, this can remo)-2.5 E .3 -.15(ve t)-.15 H(he need to b).15 E -(urn a ph)-.2 E(ysical CDR)-.05 E(OM)-.4 E -(just in order to read the \214les contained in an ISO9660 image.)0 60 Q -(It also a)0 72 Q -.2(vo)-.2 G(ids security and comple).2 E -(xity issues that come with)-.15 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(virtual mounts and loopback de)0 12 Q(vices.) --.25 E(Libarchi)0 24 Q .3 -.15(ve s)-.25 H -(upports the most common Rockridge e).15 E(xtensions and has partial) --.15 E(support for Joliet e)0 36 Q(xtensions.)-.15 E(If both e)0 48 Q -(xtensions are present, the Joliet e)-.15 E(xtensions will be)-.15 E -(used and the Rockridge e)0 60 Q(xtensions will be ignored.)-.15 E -(In particular)0 72 Q 2.5(,t)-.4 G -(his can create problems with hardlinks and symlinks,)-2.5 E 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(which are supported by Rockridge b)0 12 Q -(ut not by Joliet.)-.2 E(<h4 id="Zip format">)36 24 Q(Zip format)36 36 Q -(</h4>)36 48 Q(Libarchi)0 60 Q .3 -.15(ve c)-.25 H -(an read and write zip format archi).15 E -.15(ve)-.25 G 2.5(st).15 G -(hat ha)-2.5 E -.15(ve)-.2 G -(uncompressed entries and entries compressed with the)0 72 Q 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(de\215ate').74 E(')-.74 E -(algorithm.)0 24 Q(Older zip compression algorithms are not supported.)0 -36 Q(It can e)0 48 Q(xtract jar archi)-.15 E -.15(ve)-.25 G(s, archi).15 -E -.15(ve)-.25 G 2.5(st).15 G(hat use Zip64 e)-2.5 E(xtensions and man) --.15 E(y)-.15 E(self-e)0 60 Q(xtracting zip archi)-.15 E -.15(ve)-.25 G -(s.).15 E(Libarchi)0 72 Q .3 -.15(ve r)-.25 H(eads Zip archi).15 E -.15 -(ve)-.25 G 2.5(sa).15 G 2.5(st)-2.5 G(he)-2.5 E 2.5(ya)-.15 G -(re being streamed,)-2.5 E 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(which allo)0 12 Q(ws it to read archi)-.25 E --.15(ve)-.25 G 2.5(so).15 G 2.5(fa)-2.5 G(rbitrary size.)-2.5 E -(It currently does not use the central directory; this)0 24 Q -(limits libarchi)0 36 Q -.15(ve)-.25 G 1.1 -.55('s a).15 H -(bility to support some self-e).55 E(xtracting)-.15 E(archi)0 48 Q -.15 -(ve)-.25 G 2.5(sa).15 G(nd ones that ha)-2.5 E .3 -.15(ve b)-.2 H -(een modi\214ed in certain w).15 E(ays.)-.1 E(<h4 id="Archi)36 60 Q .3 --.15(ve \()-.25 H(library\) \214le format">).15 E(Archi)36 72 Q .3 -.15 -(ve \()-.25 H(library\) \214le format).15 E 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(The Unix archi)0 24 Q .3 -.15 -(ve f)-.25 H(ormat \(commonly created by the).15 E(<a href="../html1/ar) -0 36 Q(.html">ar\(1\)</a>)-.55 E(archi)0 48 Q -.15(ve)-.25 G -(r\) is a general-purpose format which is).15 E(used almost e)0 60 Q -(xclusi)-.15 E -.15(ve)-.25 G(ly for object \214les to be).15 E -(read by the link editor)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/ld.html">ld\(1\)</a>.)0 12 Q -(The ar format has ne)0 24 Q -.15(ve)-.25 G 2.5(rb).15 G -(een standardised.)-2.5 E(There are tw)0 36 Q 2.5(oc)-.1 G(ommon v)-2.5 -E(ariants:)-.25 E(the GNU format deri)0 48 Q -.15(ve)-.25 G 2.5(df).15 G -(rom SVR4,)-2.5 E(and the BSD format, which \214rst appeared in 4.4BSD.) -0 60 Q(The tw)0 72 Q 2.5(od)-.1 G(if)-2.5 E -(fer primarily in their handling of \214lenames)-.25 E 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(longer than 15 characters:)0 12 Q -(the GNU/SVR4 v)0 24 Q(ariant writes a \214lename table at the be)-.25 E -(ginning of the archi)-.15 E -.15(ve)-.25 G(;).15 E -(the BSD format stores each long \214lename in an e)0 36 Q(xtension)-.15 -E(area adjacent to the entry)0 48 Q(.)-.65 E(Libarchi)0 60 Q .3 -.15 -(ve c)-.25 H(an read both e).15 E(xtensions,)-.15 E(including archi)0 72 -Q -.15(ve)-.25 G 2.5(st).15 G -(hat may include both types of long \214lenames.)-2.5 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Programs using libarchi)0 12 Q .3 -.15(ve c)-.25 -H(an write GNU/SVR4 format).15 E(if the)0 24 Q 2.5(yp)-.15 G(ro)-2.5 E -(vide a \214lename table to be written into)-.15 E(the archi)0 36 Q .3 --.15(ve b)-.25 H(efore an).15 E 2.5(yo)-.15 G 2.5(ft)-2.5 G(he entries.) --2.5 E(An)0 48 Q 2.5(ye)-.15 G -(ntries whose names are not in the \214lename table)-2.5 E -(will be written using BSD-style long \214lenames.)0 60 Q -(This can cause problems for programs such as)0 72 Q 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(GNU ld that do not support the BSD-style long \214lenames.)0 12 Q -(<h4 id="mtree">)36 24 Q(mtree)36 36 Q(</h4>)36 48 Q(Libarchi)0 60 Q .3 --.15(ve c)-.25 H(an read and write \214les in).15 E -(<a href="../html5/mtree.html">mtree\(5\)</a>)0 72 Q 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(format.)0 12 Q(This format is not a true archi)0 -24 Q .3 -.15(ve f)-.25 H(ormat, b).15 E(ut rather a te)-.2 E -(xtual description)-.15 E(of a \214le hierarch)0 36 Q 2.5(yi)-.05 G 2.5 -(nw)-2.5 G(hich each line speci\214es the name of a \214le and)-2.5 E -(pro)0 48 Q(vides speci\214c metadata about that \214le.)-.15 E -(Libarchi)0 60 Q .3 -.15(ve c)-.25 H(an read all of the k).15 E -.15(ey) --.1 G -.1(wo).15 G(rds supported by both).1 E(the NetBSD and FreeBSD v)0 -72 Q(ersions of)-.15 E 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/mtree.html">mtree\(1\)</a>,)0 -12 Q(although man)0 24 Q 2.5(yo)-.15 G 2.5(ft)-2.5 G(he k)-2.5 E -.15 -(ey)-.1 G -.1(wo).15 G(rds cannot currently be stored in an).1 E -(<font size="-1"></font><font size="-1">archi)0 36 Q -.15(ve)-.25 G -(_entry</font>).15 E(object.)0 48 Q(When writing, libarchi)0 60 Q .3 --.15(ve s)-.25 H(upports use of the).15 E(<a href="../html3/archi)0 72 Q --.15(ve)-.25 G(_write_set_options.html">archi).15 E -.15(ve)-.25 G -(_write_set_options\(3\)</a>).15 E 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(interf)0 12 Q(ace to specify which k)-.1 E -.15 -(ey)-.1 G -.1(wo).15 G(rds should be included in the).1 E(output.)0 24 Q -(If libarchi)0 36 Q .3 -.15(ve w)-.25 H -(as compiled with access to suitable).05 E -(cryptographic libraries \(such as the OpenSSL libraries\),)0 48 Q -(it can compute hash entries such as)0 60 Q(<b></b><b>sha512</b>)0 72 Q -0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(or)0 12 Q(<b></b><b>md5</b>)0 24 Q -(from \214le data being written to the mtree writer)0 36 Q(.)-.55 E(<p>) -36 48 Q(When reading an mtree \214le, libarchi)0 60 Q .3 -.15(ve w)-.25 -H(ill locate the corresponding).15 E(\214les on disk using the)0 72 Q 0 -Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>contents</b>)0 12 Q -.1(ke)0 24 S(yw) --.05 E(ord if present or the re)-.1 E(gular \214lename.)-.15 E -(If it can locate and open the \214le on disk, it will use that)0 36 Q -(to \214ll in an)0 48 Q 2.5(ym)-.15 G -(etadata that is missing from the mtree \214le)-2.5 E -(and will read the \214le contents and return those to the program)0 60 -Q(using libarchi)0 72 Q -.15(ve)-.25 G(.).15 E 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(If it cannot locate and open the \214le on disk, libarchi)0 12 Q -.15 -(ve)-.25 G(will return an error for an)0 24 Q 2.5(ya)-.15 G -(ttempt to read the entry)-2.5 E(body)0 36 Q(.)-.65 E -(<h3 id="SEE ALSO">)36 48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/ar)0 12 Q(.html">ar\(1\)</a>,) --.55 E(<a href="../html1/cpio.html">cpio\(1\)</a>,)0 24 Q -(<a href="../html1/mkisofs.html">mkisofs\(1\)</a>,)0 36 Q -(<a href="../html1/shar)0 48 Q(.html">shar\(1\)</a>,)-.55 E -(<a href="../html1/tar)0 60 Q(.html">tar\(1\)</a>,)-.55 E -(<a href="../html1/zip.html">zip\(1\)</a>,)0 72 Q 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/zlib)0 12 Q -(.html">zlib\(3\)</a>,)-.4 E -(<a href="../html5/cpio.html">cpio\(5\)</a>,)0 24 Q -(<a href="../html5/mtree.html">mtree\(5\)</a>,)0 36 Q -(<a href="../html5/tar)0 48 Q(.html">tar\(5\)</a>)-.55 E(</body>)0 60 Q -(</html>)0 72 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:28 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">libarchive-formats(5) FreeBSD File Formats +Manual libarchive-formats(5)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>libarchive-formats</b> +— archive formats supported by the libarchive +library</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">The libarchive(3) library reads +and writes a variety of streaming archive formats. Generally +speaking, all of these archive formats consist of a series +of ‘‘entries’’. Each entry stores a +single file system object, such as a file, directory, or +symbolic link.</p> + +<p style="margin-left:8%; margin-top: 1em">The following +provides a brief description of each format supported by +libarchive, with some information about recognized +extensions or limitations of the current library support. +Note that just because a format is supported by libarchive +does not imply that a program that uses libarchive will +support that format. Applications that use libarchive +specify which formats they wish to support, though many +programs do use libarchive convenience functions to enable +all supported formats.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Tar +Formats</b> <br> +The libarchive(3) library can read most tar archives. +However, it only writes POSIX-standard +‘‘ustar’’ and ‘‘pax +interchange’’ formats.</p> + +<p style="margin-left:8%; margin-top: 1em">All tar formats +store each entry in one or more 512-byte records. The first +record is used for file metadata, including filename, +timestamp, and mode information, and the file data is stored +in subsequent records. Later variants have extended this by +either appropriating undefined areas of the header record, +extending the header to multiple records, or by storing +special entries that modify the interpretation of subsequent +entries.</p> + +<p style="margin-top: 1em" valign="top"><b>gnutar</b></p> + +<p style="margin-left:20%; margin-top: 1em">The +libarchive(3) library can read GNU-format tar archives. It +currently supports the most popular GNU extensions, +including modern long filename and linkname support, as well +as atime and ctime data. The libarchive library does not +support multi-volume archives, nor the old GNU long filename +format. It can read GNU sparse file entries, including the +new POSIX-based formats, but cannot write GNU sparse file +entries.</p> + +<p style="margin-top: 1em" valign="top"><b>pax</b></p> + +<p style="margin-left:20%; margin-top: 1em">The +libarchive(3) library can read and write POSIX-compliant pax +interchange format archives. Pax interchange format archives +are an extension of the older ustar format that adds a +separate entry with additional attributes stored as +key/value pairs immediately before each regular entry. The +presence of these additional entries is the only difference +between pax interchange format and the older ustar format. +The extended attributes are of unlimited length and are +stored as UTF-8 Unicode strings. Keywords defined in the +standard are in all lowercase; vendors are allowed to define +custom keys by preceding them with the vendor name in all +uppercase. When writing pax archives, libarchive uses many +of the SCHILY keys defined by Joerg Schilling’s +‘‘star’’ archiver and a few +LIBARCHIVE keys. The libarchive library can read most of the +SCHILY keys and most of the GNU keys introduced by GNU tar. +It silently ignores any keywords that it does not +understand.</p> + +<p style="margin-top: 1em" valign="top"><b>restricted +pax</b></p> + +<p style="margin-left:20%;">The libarchive library can also +write pax archives in which it attempts to suppress the +extended attributes entry whenever possible. The result will +be identical to a ustar archive unless the extended +attributes entry is required to store a long file name, long +linkname, extended ACL, file flags, or if any of the +standard ustar data (user name, group name, UID, GID, etc) +cannot be fully represented in the ustar header. In all +cases, the result can be dearchived by any program that can +read POSIX-compliant pax interchange format archives. +Programs that correctly read ustar format (see below) will +also be able to read this format; any extended attributes +will be extracted as separate files stored in +<i>PaxHeader</i> directories.</p> + +<p style="margin-top: 1em" valign="top"><b>ustar</b></p> + +<p style="margin-left:20%; margin-top: 1em">The libarchive +library can both read and write this format. This format has +the following limitations:</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:26%;">Device major and minor numbers +are limited to 21 bits. Nodes with larger numbers will not +be added to the archive.</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:26%;">Path names in the archive are +limited to 255 bytes. (Shorter if there is no / character in +exactly the right place.)</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:26%;">Symbolic links and hard links +are stored in the archive with the name of the referenced +file. This name is limited to 100 bytes.</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:26%;">Extended attributes, file +flags, and other extended security information cannot be +stored.</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:26%;">Archive entries are limited to +8 gigabytes in size.</p> + +<p style="margin-left:20%;">Note that the pax interchange +format has none of these restrictions.</p> + +<p style="margin-left:8%; margin-top: 1em">The libarchive +library also reads a variety of commonly-used extensions to +the basic tar format. These extensions are recognized +automatically whenever they appear.</p> + +<p style="margin-top: 1em" valign="top">Numeric +extensions.</p> + +<p style="margin-left:20%;">The POSIX standards require +fixed-length numeric fields to be written with some +character position reserved for terminators. Libarchive +allows these fields to be written without terminator +characters. This extends the allowable range; in particular, +ustar archives with this extension can support entries up to +64 gigabytes in size. Libarchive also recognizes base-256 +values in most numeric fields. This essentially removes all +limitations on file size, modification time, and device +numbers.</p> + +<p style="margin-top: 1em" valign="top">Solaris +extensions</p> + +<p style="margin-left:20%;">Libarchive recognizes ACL and +extended attribute records written by Solaris tar. +Currently, libarchive only has support for old-style ACLs; +the newer NFSv4 ACLs are recognized but discarded.</p> + +<p style="margin-left:8%; margin-top: 1em">The first tar +program appeared in Seventh Edition Unix in 1979. The first +official standard for the tar file format was the +‘‘ustar’’ (Unix Standard Tar) format +defined by POSIX in 1988. POSIX.1-2001 extended the ustar +format to create the ‘‘pax +interchange’’ format.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Cpio +Formats</b> <br> +The libarchive library can read a number of common cpio +variants and can write ‘‘odc’’ and +‘‘newc’’ format archives. A cpio +archive stores each entry as a fixed-size header followed by +a variable-length filename and variable-length data. Unlike +the tar format, the cpio format does only minimal padding of +the header or file data. There are several cpio variants, +which differ primarily in how they store the initial header: +some store the values as octal or hexadecimal numbers in +ASCII, others as binary values of varying byte order and +length.</p> + +<p style="margin-top: 1em" valign="top"><b>binary</b></p> + +<p style="margin-left:20%; margin-top: 1em">The libarchive +library transparently reads both big-endian and +little-endian variants of the original binary cpio format. +This format used 32-bit binary values for file size and +mtime, and 16-bit binary values for the other fields.</p> + +<p style="margin-top: 1em" valign="top"><b>odc</b></p> + +<p style="margin-left:20%; margin-top: 1em">The libarchive +library can both read and write this POSIX-standard format, +which is officially known as the ‘‘cpio +interchange format’’ or the +‘‘octet-oriented cpio archive +format’’ and sometimes unofficially referred to +as the ‘‘old character format’’. +This format stores the header contents as octal values in +ASCII. It is standard, portable, and immune from byte-order +confusion. File sizes and mtime are limited to 33 bits (8GB +file size), other fields are limited to 18 bits.</p> + +<p style="margin-top: 1em" valign="top"><b>SVR4</b></p> + +<p style="margin-left:20%; margin-top: 1em">The libarchive +library can read both CRC and non-CRC variants of this +format. The SVR4 format uses eight-digit hexadecimal values +for all header fields. This limits file size to 4GB, and +also limits the mtime and other fields to 32 bits. The SVR4 +format can optionally include a CRC of the file contents, +although libarchive does not currently verify this CRC.</p> + +<p style="margin-left:8%; margin-top: 1em">Cpio first +appeared in PWB/UNIX 1.0, which was released within AT&T +in 1977. PWB/UNIX 1.0 formed the basis of System III Unix, +released outside of AT&T in 1981. This makes cpio older +than tar, although cpio was not included in Version 7 +AT&T Unix. As a result, the tar command became much +better known in universities and research groups that used +Version 7. The combination of the <b>find</b> and +<b>cpio</b> utilities provided very precise control over +file selection. Unfortunately, the format has many +limitations that make it unsuitable for widespread use. Only +the POSIX format permits files over 4GB, and its 18-bit +limit for most other fields makes it unsuitable for modern +systems. In addition, cpio formats only store numeric +UID/GID values (not usernames and group names), which can +make it very difficult to correctly transfer archives across +systems with dissimilar user numbering.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Shar +Formats</b> <br> +A ‘‘shell archive’’ is a shell +script that, when executed on a POSIX-compliant system, will +recreate a collection of file system objects. The libarchive +library can write two different kinds of shar archives:</p> + +<p style="margin-top: 1em" valign="top"><b>shar</b></p> + +<p style="margin-left:20%; margin-top: 1em">The traditional +shar format uses a limited set of POSIX commands, including +echo(1), mkdir(1), and sed(1). It is suitable for portably +archiving small collections of plain text files. However, it +is not generally well-suited for large archives (many +implementations of sh(1) have limits on the size of a +script) nor should it be used with non-text files.</p> + + +<p style="margin-top: 1em" valign="top"><b>shardump</b></p> + +<p style="margin-left:20%;">This format is similar to shar +but encodes files using uuencode(1) so that the result will +be a plain text file regardless of the file contents. It +also includes additional shell commands that attempt to +reproduce as many file attributes as possible, including +owner, mode, and flags. The additional commands used to +restore file attributes make shardump archives less portable +than plain shar archives.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>ISO9660 +format</b> <br> +Libarchive can read and extract from files containing +ISO9660-compliant CDROM images. In many cases, this can +remove the need to burn a physical CDROM just in order to +read the files contained in an ISO9660 image. It also avoids +security and complexity issues that come with virtual mounts +and loopback devices. Libarchive supports the most common +Rockridge extensions and has partial support for Joliet +extensions. If both extensions are present, the Joliet +extensions will be used and the Rockridge extensions will be +ignored. In particular, this can create problems with +hardlinks and symlinks, which are supported by Rockridge but +not by Joliet.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Zip +format</b> <br> +Libarchive can read and write zip format archives that have +uncompressed entries and entries compressed with the +‘‘deflate’’ algorithm. Older zip +compression algorithms are not supported. It can extract jar +archives, archives that use Zip64 extensions and many +self-extracting zip archives. Libarchive reads Zip archives +as they are being streamed, which allows it to read archives +of arbitrary size. It currently does not use the central +directory; this limits libarchive’s ability to support +some self-extracting archives and ones that have been +modified in certain ways.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Archive +(library) file format</b> <br> +The Unix archive format (commonly created by the ar(1) +archiver) is a general-purpose format which is used almost +exclusively for object files to be read by the link editor +ld(1). The ar format has never been standardised. There are +two common variants: the GNU format derived from SVR4, and +the BSD format, which first appeared in 4.4BSD. The two +differ primarily in their handling of filenames longer than +15 characters: the GNU/SVR4 variant writes a filename table +at the beginning of the archive; the BSD format stores each +long filename in an extension area adjacent to the entry. +Libarchive can read both extensions, including archives that +may include both types of long filenames. Programs using +libarchive can write GNU/SVR4 format if they provide a +filename table to be written into the archive before any of +the entries. Any entries whose names are not in the filename +table will be written using BSD-style long filenames. This +can cause problems for programs such as GNU ld that do not +support the BSD-style long filenames.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>mtree</b> +<br> +Libarchive can read and write files in mtree(5) format. This +format is not a true archive format, but rather a textual +description of a file hierarchy in which each line specifies +the name of a file and provides specific metadata about that +file. Libarchive can read all of the keywords supported by +both the NetBSD and FreeBSD versions of mtree(1), although +many of the keywords cannot currently be stored in an +archive_entry object. When writing, libarchive supports use +of the archive_write_set_options(3) interface to specify +which keywords should be included in the output. If +libarchive was compiled with access to suitable +cryptographic libraries (such as the OpenSSL libraries), it +can compute hash entries such as <b>sha512</b> or <b>md5</b> +from file data being written to the mtree writer.</p> + +<p style="margin-left:8%; margin-top: 1em">When reading an +mtree file, libarchive will locate the corresponding files +on disk using the <b>contents</b> keyword if present or the +regular filename. If it can locate and open the file on +disk, it will use that to fill in any metadata that is +missing from the mtree file and will read the file contents +and return those to the program using libarchive. If it +cannot locate and open the file on disk, libarchive will +return an error for any attempt to read the entry body.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">ar(1), cpio(1), mkisofs(1), +shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5), +tar(5)</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +December 27, 2009 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/libarchive.3.html b/archivers/libarchive/files/doc/html/libarchive.3.html index bb68c206f4f..2c46caf6f83 100644 --- a/archivers/libarchive/files/doc/html/libarchive.3.html +++ b/archivers/libarchive/files/doc/html/libarchive.3.html @@ -1,801 +1,329 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:17 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 58 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(August 19, 2006 LIB)74.5 48 Q(ARCHIVE 3)-.35 E(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E 2.5 -(-f)0 60 S(unctions for reading and writing streaming archi)-2.5 E -.15 -(ve)-.25 G(s).15 E(<h3 id="LIBRAR)36 72 Q(Y">)-.65 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(LIBRAR)36 12 Q(Y)-.65 E(</h3>)36 24 Q(<h3 id="O) -36 36 Q(VER)-.5 E(VIEW">)-.8 E -.5(OV)36 48 S(ER).5 E(VIEW)-.8 E(</h3>) -36 60 Q(The)0 72 Q 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>libarchi)0 12 Q -.15(ve)-.25 G(</b>).15 E -(library pro)0 24 Q(vides a \215e)-.15 E(xible interf)-.15 E -(ace for reading and writing)-.1 E(streaming archi)0 36 Q .3 -.15 -(ve \214)-.25 H(les such as tar and cpio.).15 E(The library is inherent\ -ly stream-oriented; readers serially iterate through)0 48 Q(the archi)0 -60 Q -.15(ve)-.25 G 2.5(,w).15 G -(riters serially add things to the archi)-2.5 E -.15(ve)-.25 G(.).15 E -(In particular)0 72 Q 2.5(,n)-.4 G(ote that there is no b)-2.5 E -(uilt-in support for)-.2 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(random access nor for in-place modi\214cation.)0 -12 Q(<p>)36 24 Q(When reading an archi)0 36 Q -.15(ve)-.25 G 2.5(,t).15 -G(he library automatically detects the)-2.5 E -(format and the compression.)0 48 Q -(The library currently has read support for:)0 60 Q(<ul>)0 72 Q 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q(old-style tar archi)0 24 Q -.15(ve) --.25 G(s,).15 E(<li>)0 36 Q(most v)0 48 Q(ariants of the POSIX)-.25 E --.74(``)0 60 S(ustar').74 E(')-.74 E(format,)0 72 Q 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q(the POSIX)0 24 Q -.74(``)0 36 S -(pax interchange').74 E(')-.74 E(format,)0 48 Q(<li>)0 60 Q -(GNU-format tar archi)0 72 Q -.15(ve)-.25 G(s,).15 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q(most common cpio archi)0 24 Q .3 --.15(ve f)-.25 H(ormats,).15 E(<li>)0 36 Q -(ISO9660 CD images \(with or without RockRidge e)0 48 Q(xtensions\),) --.15 E(<li>)0 60 Q(Zip archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</ul>)0 12 Q -(The library automatically detects archi)0 24 Q -.15(ve)-.25 G 2.5(sc) -.15 G(ompressed with)-2.5 E(<a href="../html1/gzip.html">gzip\(1\)</a>,) -0 36 Q(<a href="../html1/bzip2.html">bzip2\(1\)</a>,)0 48 Q(or)0 60 Q -(<a href="../html1/compress.html">compress\(1\)</a>)0 72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and decompresses them transparently)0 12 Q(.) --.65 E(<p>)36 24 Q(When writing an archi)0 36 Q -.15(ve)-.25 G 2.5(,y) -.15 G(ou can specify the compression)-2.5 E -(to be used and the format to use.)0 48 Q(The library can write)0 60 Q -(<ul>)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q(POSIX-standard)0 24 Q -.74(``)0 36 S -(ustar').74 E(')-.74 E(archi)0 48 Q -.15(ve)-.25 G(s,).15 E(<li>)0 60 Q -(POSIX)0 72 Q 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(pax interchange format').74 E(') --.74 E(archi)0 24 Q -.15(ve)-.25 G(s,).15 E(<li>)0 36 Q -(POSIX octet-oriented cpio archi)0 48 Q -.15(ve)-.25 G(s,).15 E(<li>)0 -60 Q(tw)0 72 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E -(ariants of shar archi)-.25 E -.15(ve)-.25 G(s.).15 E 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</ul>)0 12 Q -.15(Pa)0 24 S 2.5(xi).15 G -(nterchange format is an e)-2.5 E(xtension of the tar archi)-.15 E .3 --.15(ve f)-.25 H(ormat that).15 E -(eliminates essentially all of the limitations of historic tar formats)0 -36 Q(in a standard f)0 48 Q(ashion that is supported)-.1 E -(by POSIX-compliant)0 60 Q(<a href="../html1/pax.html">pax\(1\)</a>)0 72 -Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(implementations on man)0 12 Q 2.5(ys)-.15 G -(ystems as well as se)-2.5 E -.15(ve)-.25 G(ral ne).15 E -(wer implementations of)-.25 E(<a href="../html1/tar)0 24 Q -(.html">tar\(1\)</a>.)-.55 E(Note that the def)0 36 Q -(ault write format will suppress the pax e)-.1 E(xtended)-.15 E(attrib)0 -48 Q(utes for most entries; e)-.2 E -(xplicitly requesting pax format will)-.15 E(enable those attrib)0 60 Q -(utes for all entries.)-.2 E(<p>)36 72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(The read and write APIs are accessed through the)0 12 Q(<b>archi)0 24 Q --.15(ve)-.25 G(_read_XXX</b>\(<code></code>\)).15 E(functions and the)0 -36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_XXX</b>\(<code></code>\)).15 -E(functions, respecti)0 60 Q -.15(ve)-.25 G(ly).15 E 2.5(,a)-.65 G -(nd either can be used independently)-2.5 E(of the other)0 72 Q(.)-.55 E -0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The rest of this manual page pro)0 -24 Q(vides an o)-.15 E -.15(ve)-.15 G(rvie).15 E 2.5(wo)-.25 G 2.5(ft) --2.5 G(he library)-2.5 E(operation.)0 36 Q -(More detailed information can be found in the indi)0 48 Q -(vidual manual)-.25 E(pages for each API or utility function.)0 60 Q -(<h3 id="READING AN ARCHIVE">)36 72 Q 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(READING AN ARCHIVE)36 12 Q(</h3>)36 24 Q 1.6 -.8 -(To r)0 36 T(ead an archi).8 E -.15(ve)-.25 G 2.5(,y).15 G -(ou must \214rst obtain an initialized)-2.5 E(<font size="-1"></font><f\ -ont size="-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G -(</font>).15 E(object from)0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G -(_read_ne).15 E(w</b>\(<code></code>\).)-.25 E 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.1(Yo)0 12 S 2.5(uc)1.1 G -(an then modify this object for the desired operations with the)-2.5 E --.25(va)0 24 S(rious).25 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_set_XXX</b>\(<code></code>\)).15 E(and)0 48 Q(<b>archi)0 60 Q --.15(ve)-.25 G(_read_support_XXX</b>\(<code></code>\)).15 E(functions.)0 -72 Q 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,y)-.4 G -(ou will need to in)-2.5 E -.2(vo)-.4 G .2 -.1(ke a).2 H(ppropriate).1 E -(<b>archi)0 24 Q -.15(ve)-.25 G(_read_support_XXX</b>\(<code></code>\)) -.15 E(functions to enable the corresponding compression and format)0 36 -Q(support.)0 48 Q(Note that these latter functions perform tw)0 60 Q 2.5 -(od)-.1 G(istinct operations:)-2.5 E(the)0 72 Q 2.5(yc)-.15 G -(ause the corresponding support code to be link)-2.5 E(ed into your)-.1 -E 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(program, and the)0 12 Q 2.5(ye)-.15 G -(nable the corresponding auto-detect code.)-2.5 E(Unless you ha)0 24 Q -.3 -.15(ve s)-.2 H(peci\214c constraints, you will generally w).15 E -(ant)-.1 E(to in)0 36 Q -.2(vo)-.4 G -.1(ke).2 G(<b>archi)0 48 Q -.15 -(ve)-.25 G(_read_support_compression_all</b>\(<code></code>\)).15 E(and) -0 60 Q(<b>archi)0 72 Q -.15(ve)-.25 G -(_read_support_format_all</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(to enable auto-detect for all formats and compression types)0 12 Q -(currently supported by the library)0 24 Q(.)-.65 E(<p>)36 36 Q -(Once you ha)0 48 Q .3 -.15(ve p)-.2 H(repared the).15 E(<font size="-1\ -"></font><font size="-1">struct</font><font size="-1"> archi)0 60 Q -.15 -(ve)-.25 G(</font>).15 E(object, you call)0 72 Q 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_open</b>\(<code></code>\)).15 E(to actually open the archi)0 24 Q -.3 -.15(ve a)-.25 H(nd prepare it for reading.).15 E(There are se)0 36 Q --.15(ve)-.25 G(ral v).15 E(ariants of this function;)-.25 E -(the most basic e)0 48 Q(xpects you to pro)-.15 E(vide pointers to se) --.15 E -.15(ve)-.25 G(ral).15 E(functions that can pro)0 60 Q -(vide blocks of bytes from the archi)-.15 E -.15(ve)-.25 G(.).15 E -(There are con)0 72 Q -.15(ve)-.4 G(nience forms that allo).15 E 2.5(wy) --.25 G(ou to)-2.5 E 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(specify a \214lename, \214le descriptor)0 12 Q -(,)-.4 E(<br><br><code></code><code>FILE *</code>)0 24 Q -(object, or a block of memory from which to read the archi)0 36 Q .3 --.15(ve d)-.25 H(ata.).15 E(Note that the core library mak)0 48 Q -(es no assumptions about the)-.1 E(size of the blocks read;)0 60 Q -(callback functions are free to read whate)0 72 Q -.15(ve)-.25 G 2.5(rb) -.15 G(lock size is)-2.5 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(most appropriate for the medium.)0 12 Q(<p>)36 -24 Q(Each archi)0 36 Q .3 -.15(ve e)-.25 H -(ntry consists of a header follo).15 E(wed by a certain)-.25 E -(amount of data.)0 48 Q -1.1(Yo)0 60 S 2.5(uc)1.1 G(an obtain the ne) --2.5 E(xt header with)-.15 E(<b>archi)0 72 Q -.15(ve)-.25 G(_read_ne).15 -E(xt_header</b>\(<code></code>\),)-.15 E 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(which returns a pointer to an)0 12 Q(<font size\ -="-1"></font><font size="-1">struct</font><font size="-1"> archi)0 24 Q --.15(ve)-.25 G(_entry</font>).15 E -(structure with information about the current archi)0 36 Q .3 -.15(ve e) --.25 H(lement.).15 E(If the entry is a re)0 48 Q -(gular \214le, then the header will be follo)-.15 E(wed)-.25 E -(by the \214le data.)0 60 Q -1.1(Yo)0 72 S 2.5(uc)1.1 G(an use)-2.5 E 0 -Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_data</b>\(<code></code>\)).15 E(\(which w)0 24 Q(orks much lik) --.1 E 2.5(et)-.1 G(he)-2.5 E(<a href="../html2/read.html">read\(2\)</a>) -0 36 Q(system call\))0 48 Q(to read this data from the archi)0 60 Q -.15 -(ve)-.25 G(.).15 E -1.1(Yo)0 72 S 2.5(um)1.1 G -(ay prefer to use the higher)-2.5 E(-le)-.2 E -.15(ve)-.25 G(l).15 E 0 -Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_read_data_skip</b>\(<code></code>\),).15 E -(which reads and discards the data for this entry)0 24 Q(,)-.65 E -(<b>archi)0 36 Q -.15(ve)-.25 G(_read_data_to_b).15 E(uf)-.2 E -(fer</b>\(<code></code>\),)-.25 E -(which reads the data into an in-memory b)0 48 Q(uf)-.2 E(fer)-.25 E(,) --.4 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_data_to_\214le</b>\(<code></code>\),).15 E -(which copies the data to the pro)0 72 Q(vided \214le descriptor)-.15 E -2.5(,o)-.4 G(r)-2.5 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_read_e).15 E -(xtract</b>\(<code></code>\),)-.15 E -(which recreates the speci\214ed entry on disk and copies data)0 24 Q -(from the archi)0 36 Q -.15(ve)-.25 G(.).15 E(In particular)0 48 Q 2.5 -(,n)-.4 G(ote that)-2.5 E(<b>archi)0 60 Q -.15(ve)-.25 G(_read_e).15 E -(xtract</b>\(<code></code>\))-.15 E(uses the)0 72 Q 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<font size="-1"></font><font size="-1">struct</\ -font><font size="-1"> archi)0 12 Q -.15(ve)-.25 G(_entry</font>).15 E -(structure that you pro)0 24 Q(vide it, which may dif)-.15 E -(fer from the)-.25 E(entry just read from the archi)0 36 Q -.15(ve)-.25 -G(.).15 E(In particular)0 48 Q 2.5(,m)-.4 G(an)-2.5 E 2.5(ya)-.15 G -(pplications will w)-2.5 E(ant to o)-.1 E -.15(ve)-.15 G(rride the).15 E -(pathname, \214le permissions, or o)0 60 Q(wnership.)-.25 E(<p>)36 72 Q -0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Once you ha)0 12 Q .3 -.15(ve \214)-.2 H -(nished reading data from the archi).15 E -.15(ve)-.25 G 2.5(,y).15 G -(ou)-2.5 E(should call)0 24 Q(<b>archi)0 36 Q -.15(ve)-.25 G -(_read_close</b>\(<code></code>\)).15 E(to close the archi)0 48 Q -.15 -(ve)-.25 G 2.5(,t).15 G(hen call)-2.5 E(<b>archi)0 60 Q -.15(ve)-.25 G -(_read_\214nish</b>\(<code></code>\)).15 E(to release all resources, in\ -cluding all memory allocated by the library)0 72 Q(.)-.65 E 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The)0 24 Q(<a href="../html3/archi)0 -36 Q -.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G -(_read\(3\)</a>).15 E(manual page pro)0 48 Q -(vides more detailed calling information for this API.)-.15 E -(<h3 id="WRITING AN ARCHIVE">)36 60 Q(WRITING AN ARCHIVE)36 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h3>)36 12 Q -1.1(Yo)0 24 S 2.5(uu)1.1 G -(se a similar process to write an archi)-2.5 E -.15(ve)-.25 G(.).15 E -(The)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(_write_ne).15 E -(w</b>\(<code></code>\))-.25 E(function creates an archi)0 60 Q .3 -.15 -(ve o)-.25 H(bject useful for writing,).15 E(the v)0 72 Q(arious)-.25 E -0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G -(_write_set_XXX</b>\(<code></code>\)).15 E -(functions are used to set parameters for writing the archi)0 24 Q -.15 -(ve)-.25 G 2.5(,a).15 G(nd)-2.5 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_open</b>\(<code></code>\)).15 E -(completes the setup and opens the archi)0 48 Q .3 -.15(ve f)-.25 H -(or writing.).15 E(<p>)36 60 Q(Indi)0 72 Q(vidual archi)-.25 E .3 -.15 -(ve e)-.25 H(ntries are written in a three-step).15 E 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(process:)0 12 Q -1.1(Yo)0 24 S 2.5<758c>1.1 G -(rst initialize a)-2.5 E(<font size="-1"></font><font size="-1">struct<\ -/font><font size="-1"> archi)0 36 Q -.15(ve)-.25 G(_entry</font>).15 E -(structure with information about the ne)0 48 Q 2.5(we)-.25 G(ntry)-2.5 -E(.)-.65 E(At a minimum, you should set the pathname of the)0 60 Q -(entry and pro)0 72 Q(vide a)-.15 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>struct</i><i> stat</i>)0 12 Q -(with a v)0 24 Q(alid)-.25 E(<i></i><i>st_mode</i>)0 36 Q -(\214eld, which speci\214es the type of object and)0 48 Q -(<i></i><i>st_size</i>)0 60 Q -(\214eld, which speci\214es the size of the data portion of the object.) -0 72 Q 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_header</b>\(<code></code>\)).15 E -(function actually writes the header data to the archi)0 36 Q -.15(ve) --.25 G(.).15 E -1.1(Yo)0 48 S 2.5(uc)1.1 G(an then use)-2.5 E(<b>archi)0 -60 Q -.15(ve)-.25 G(_write_data</b>\(<code></code>\)).15 E -(to write the actual data.)0 72 Q 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(After all entries ha)0 24 Q .3 -.15 -(ve b)-.2 H(een written, use the).15 E(<b>archi)0 36 Q -.15(ve)-.25 G -(_write_\214nish</b>\(<code></code>\)).15 E -(function to release all resources.)0 48 Q(<p>)36 60 Q(The)0 72 Q 0 Cg -EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G -(_write.html">archi).15 E -.15(ve)-.25 G(_write\(3\)</a>).15 E -(manual page pro)0 24 Q -(vides more detailed calling information for this API.)-.15 E -(<h3 id="DESCRIPTION">)36 36 Q(DESCRIPTION)36 48 Q(</h3>)36 60 Q -(Detailed descriptions of each function are pro)0 72 Q(vided by the)-.15 -E 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(corresponding manual pages.)0 12 Q(<p>)36 24 Q -(All of the functions utilize an opaque)0 36 Q(<font size="-1"></font><\ -font size="-1">struct</font><font size="-1"> archi)0 48 Q -.15(ve)-.25 G -(</font>).15 E(datatype that pro)0 60 Q(vides access to the archi)-.15 E -.3 -.15(ve c)-.25 H(ontents.).15 E(<p>)36 72 Q 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<font size="-1"></font><font size="-\ -1">struct</font><font size="-1"> archi)0 24 Q -.15(ve)-.25 G -(_entry</font>).15 E -(structure contains a complete description of a single archi)0 36 Q -.15 -(ve)-.25 G(entry)0 48 Q(.)-.65 E(It uses an opaque interf)0 60 Q -(ace that is fully documented in)-.1 E(<a href="../html3/archi)0 72 Q --.15(ve)-.25 G(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G -(_entry\(3\)</a>.).15 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(Users f)0 24 Q -(amiliar with historic formats should be a)-.1 E -.1(wa)-.15 G -(re that the ne).1 E(wer)-.25 E -.25(va)0 36 S(riants ha).25 E .3 -.15 -(ve e)-.2 H(liminated most restrictions on the length of te).15 E -(xtual \214elds.)-.15 E -(Clients should not assume that \214lenames, link names, user names, or) -0 48 Q(group names are limited in length.)0 60 Q(In particular)0 72 Q -2.5(,p)-.4 G(ax interchange format can easily accommodate pathnames)-2.5 -E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(in arbitrary character sets that e)0 12 Q(xceed) --.15 E(<i></i><i>P)0 24 Q -1.11(AT)-.92 G(H_MAX</i>.)1.11 E -(<h3 id="RETURN V)36 36 Q(ALUES">)-1.35 E(RETURN V)36 48 Q(ALUES)-1.35 E -(</h3>)36 60 Q(Most functions return zero on success, non-zero on error) -0 72 Q(.)-.55 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The return v)0 12 Q -(alue indicates the general se)-.25 E -.15(ve)-.25 G(rity of the error) -.15 E 2.5(,r)-.4 G(anging)-2.5 E(from)0 24 Q(<b></b><b>ARCHIVE_W)0 36 Q -(ARN</b>,)-1.2 E -(which indicates a minor problem that should probably be reported)0 48 Q -(to the user)0 60 Q 2.5(,t)-.4 G(o)-2.5 E(<b></b><b>ARCHIVE_F)0 72 Q --1.21 -1.11(AT A)-.74 H(L</b>,)1.11 E 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(which indicates a serious problem that will pre) -0 12 Q -.15(ve)-.25 G(nt an).15 E 2.5(yf)-.15 G(urther)-2.5 E -(operations on this archi)0 24 Q -.15(ve)-.25 G(.).15 E(On error)0 36 Q -2.5(,t)-.4 G(he)-2.5 E(<b>archi)0 48 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)).15 E(function can be used to retrie)0 60 Q -.3 -.15(ve a n)-.25 H(umeric error code \(see).15 E -(<a href="../html2/errno.html">errno\(2\)</a>\).)0 72 Q 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_error_string</b>\(<code></code>\)).15 E(returns a te)0 36 Q -(xtual error message suitable for display)-.15 E(.)-.65 E(<p>)36 48 Q -(<b>archi)0 60 Q -.15(ve)-.25 G(_read_ne).15 E(w</b>\(<code></code>\)) --.25 E(and)0 72 Q 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_write_ne).15 E -(w</b>\(<code></code>\))-.25 E -(return pointers to an allocated and initialized)0 24 Q(<font size="-1"\ -></font><font size="-1">struct</font><font size="-1"> archi)0 36 Q -.15 -(ve)-.25 G(</font>).15 E(object.)0 48 Q(<p>)36 60 Q(<b>archi)0 72 Q -.15 -(ve)-.25 G(_read_data</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_data</b>\(<code></code>\)).15 E -(return a count of the number of bytes actually read or written.)0 36 Q -2.5(Av)0 48 S(alue of zero indicates the end of the data for this entry) --2.75 E(.)-.65 E 2.5(An)0 60 S -2.25 -.15(eg a)-2.5 H(ti).15 E .3 -.15 -(ve v)-.25 H(alue indicates an error)-.1 E 2.5(,i)-.4 G 2.5(nw)-2.5 G -(hich case the)-2.5 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_errno</b>\(<code></code>\)).15 E 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_error_string</b>\(<code></code>\)).15 E -(functions can be used to obtain more information.)0 36 Q(<h3 id="ENVIR) -36 48 Q(ONMENT">)-.4 E(ENVIR)36 60 Q(ONMENT)-.4 E(</h3>)36 72 Q 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(There are character set con)0 12 Q -.15(ve)-.4 G -(rsions within the).15 E(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G -(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>).15 E -(functions that are impacted by the currently-selected locale.)0 36 Q -(<h3 id="SEE ALSO">)36 48 Q(SEE ALSO)36 60 Q(</h3>)36 72 Q 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/tar)0 12 Q -(.html">tar\(1\)</a>,)-.55 E(<a href="../html3/archi)0 24 Q -.15(ve)-.25 -G(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>,).15 E -(<a href="../html3/archi)0 36 Q -.15(ve)-.25 G(_read.html">archi).15 E --.15(ve)-.25 G(_read\(3\)</a>,).15 E(<a href="../html3/archi)0 48 Q -.15 -(ve)-.25 G(_util.html">archi).15 E -.15(ve)-.25 G(_util\(3\)</a>,).15 E -(<a href="../html3/archi)0 60 Q -.15(ve)-.25 G(_write.html">archi).15 E --.15(ve)-.25 G(_write\(3\)</a>,).15 E(<a href="../html5/tar)0 72 Q -(.html">tar\(5\)</a>)-.55 E 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="HIST)36 12 Q(OR)-.18 E(Y">)-.65 E(HIST) -36 24 Q(OR)-.18 E(Y)-.65 E(</h3>)36 36 Q(The)0 48 Q(<b>libarchi)0 60 Q --.15(ve)-.25 G(</b>).15 E(library \214rst appeared in)0 72 Q 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(FreeBSD5.3.)0 12 Q(<h3 id="A)36 24 Q(UTHORS">) --.55 E -.55(AU)36 36 S(THORS).55 E(</h3>)36 48 Q(<p>)36 60 Q(The)0 72 Q -0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>libarchi)0 12 Q -.15(ve)-.25 G(</b>).15 E -(library w)0 24 Q(as written by)-.1 E -.35(Ti)0 36 S 2.5(mK).35 G -(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E(<h3 id="B)36 48 Q -(UGS">)-.1 E -.1(BU)36 60 S(GS).1 E(</h3>)36 72 Q 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Some archi)0 12 Q .3 -.15(ve f)-.25 H -(ormats support information that is not supported by).15 E(<font size="\ --1"></font><font size="-1">struct</font><font size="-1"> archi)0 24 Q --.15(ve)-.25 G(_entry</font>.).15 E -(Such information cannot be fully archi)0 36 Q -.15(ve)-.25 G 2.5(do).15 -G 2.5(rr)-2.5 G(estored using this library)-2.5 E(.)-.65 E -(This includes, for e)0 48 Q(xample, comments, character sets,)-.15 E -(or the arbitrary k)0 60 Q -.15(ey)-.1 G(/v).15 E -(alue pairs that can appear in)-.25 E(pax interchange format archi)0 72 -Q -.15(ve)-.25 G(s.).15 E 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(Con)0 24 Q -.15(ve)-.4 G(rsely).15 E -2.5(,o)-.65 G 2.5(fc)-2.5 G -(ourse, not all of the information that can be)-2.5 E(stored in an)0 36 -Q(<font size="-1"></font><font size="-1">struct</font><font size="-1"> \ -archi)0 48 Q -.15(ve)-.25 G(_entry</font>).15 E -(is supported by all formats.)0 60 Q -.15(Fo)0 72 S 2.5(re).15 G -(xample, cpio formats do not support nanosecond timestamps;)-2.65 E 0 Cg -EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(old tar formats do not support lar)0 12 Q(ge de) --.18 E(vice numbers.)-.25 E(</body>)0 24 Q(</html>)0 36 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:29 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">LIBARCHIVE(3) FreeBSD Library Functions +Manual LIBARCHIVE(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>libarchive</b> — +functions for reading and writing streaming archives</p> + +<p style="margin-top: 1em" valign="top"><b>LIBRARY</b></p> + +<p style="margin-left:8%;">Streaming Archive Library +(libarchive, −larchive)</p> + + +<p style="margin-top: 1em" valign="top"><b>OVERVIEW</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +provides a flexible interface for reading and writing +streaming archive files such as tar and cpio. The library is +inherently stream-oriented; readers serially iterate through +the archive, writers serially add things to the archive. In +particular, note that there is no built-in support for +random access nor for in-place modification.</p> + +<p style="margin-left:8%; margin-top: 1em">When reading an +archive, the library automatically detects the format and +the compression. The library currently has read support +for:</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">old-style tar archives,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">most variants of the POSIX +‘‘ustar’’ format,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">the POSIX ‘‘pax +interchange’’ format,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">GNU-format tar archives,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">most common cpio archive +formats,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">ISO9660 CD images (with or +without RockRidge extensions),</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">Zip archives.</p> + +<p style="margin-left:8%;">The library automatically +detects archives compressed with gzip(1), bzip2(1), or +compress(1) and decompresses them transparently.</p> + +<p style="margin-left:8%; margin-top: 1em">When writing an +archive, you can specify the compression to be used and the +format to use. The library can write</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">POSIX-standard +‘‘ustar’’ archives,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">POSIX ‘‘pax +interchange format’’ archives,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">POSIX octet-oriented cpio +archives,</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:14%;">two different variants of shar +archives.</p> + +<p style="margin-left:8%;">Pax interchange format is an +extension of the tar archive format that eliminates +essentially all of the limitations of historic tar formats +in a standard fashion that is supported by POSIX-compliant +pax(1) implementations on many systems as well as several +newer implementations of tar(1). Note that the default write +format will suppress the pax extended attributes for most +entries; explicitly requesting pax format will enable those +attributes for all entries.</p> + +<p style="margin-left:8%; margin-top: 1em">The read and +write APIs are accessed through the +<b>archive_read_XXX</b>() functions and the +<b>archive_write_XXX</b>() functions, respectively, and +either can be used independently of the other.</p> + +<p style="margin-left:8%; margin-top: 1em">The rest of this +manual page provides an overview of the library operation. +More detailed information can be found in the individual +manual pages for each API or utility function.</p> + +<p style="margin-top: 1em" valign="top"><b>READING AN +ARCHIVE</b></p> + +<p style="margin-left:8%;">To read an archive, you must +first obtain an initialized struct archive object from +<b>archive_read_new</b>(). You can then modify this object +for the desired operations with the various +<b>archive_read_set_XXX</b>() and +<b>archive_read_support_XXX</b>() functions. In particular, +you will need to invoke appropriate +<b>archive_read_support_XXX</b>() functions to enable the +corresponding compression and format support. Note that +these latter functions perform two distinct operations: they +cause the corresponding support code to be linked into your +program, and they enable the corresponding auto-detect code. +Unless you have specific constraints, you will generally +want to invoke <b>archive_read_support_compression_all</b>() +and <b>archive_read_support_format_all</b>() to enable +auto-detect for all formats and compression types currently +supported by the library.</p> + +<p style="margin-left:8%; margin-top: 1em">Once you have +prepared the struct archive object, you call +<b>archive_read_open</b>() to actually open the archive and +prepare it for reading. There are several variants of this +function; the most basic expects you to provide pointers to +several functions that can provide blocks of bytes from the +archive. There are convenience forms that allow you to +specify a filename, file descriptor, <i>FILE *</i> object, +or a block of memory from which to read the archive data. +Note that the core library makes no assumptions about the +size of the blocks read; callback functions are free to read +whatever block size is most appropriate for the medium.</p> + +<p style="margin-left:8%; margin-top: 1em">Each archive +entry consists of a header followed by a certain amount of +data. You can obtain the next header with +<b>archive_read_next_header</b>(), which returns a pointer +to an struct archive_entry structure with information about +the current archive element. If the entry is a regular file, +then the header will be followed by the file data. You can +use <b>archive_read_data</b>() (which works much like the +read(2) system call) to read this data from the archive. You +may prefer to use the higher-level +<b>archive_read_data_skip</b>(), which reads and discards +the data for this entry, +<b>archive_read_data_to_buffer</b>(), which reads the data +into an in-memory buffer, +<b>archive_read_data_to_file</b>(), which copies the data to +the provided file descriptor, or +<b>archive_read_extract</b>(), which recreates the specified +entry on disk and copies data from the archive. In +particular, note that <b>archive_read_extract</b>() uses the +struct archive_entry structure that you provide it, which +may differ from the entry just read from the archive. In +particular, many applications will want to override the +pathname, file permissions, or ownership.</p> + +<p style="margin-left:8%; margin-top: 1em">Once you have +finished reading data from the archive, you should call +<b>archive_read_close</b>() to close the archive, then call +<b>archive_read_finish</b>() to release all resources, +including all memory allocated by the library.</p> + +<p style="margin-left:8%; margin-top: 1em">The +archive_read(3) manual page provides more detailed calling +information for this API.</p> + +<p style="margin-top: 1em" valign="top"><b>WRITING AN +ARCHIVE</b></p> + +<p style="margin-left:8%;">You use a similar process to +write an archive. The <b>archive_write_new</b>() function +creates an archive object useful for writing, the various +<b>archive_write_set_XXX</b>() functions are used to set +parameters for writing the archive, and +<b>archive_write_open</b>() completes the setup and opens +the archive for writing.</p> + +<p style="margin-left:8%; margin-top: 1em">Individual +archive entries are written in a three-step process: You +first initialize a struct archive_entry structure with +information about the new entry. At a minimum, you should +set the pathname of the entry and provide a <i>struct +stat</i> with a valid <i>st_mode</i> field, which specifies +the type of object and <i>st_size</i> field, which specifies +the size of the data portion of the object. The +<b>archive_write_header</b>() function actually writes the +header data to the archive. You can then use +<b>archive_write_data</b>() to write the actual data.</p> + +<p style="margin-left:8%; margin-top: 1em">After all +entries have been written, use the +<b>archive_write_finish</b>() function to release all +resources.</p> + +<p style="margin-left:8%; margin-top: 1em">The +archive_write(3) manual page provides more detailed calling +information for this API.</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">Detailed descriptions of each +function are provided by the corresponding manual pages.</p> + +<p style="margin-left:8%; margin-top: 1em">All of the +functions utilize an opaque struct archive datatype that +provides access to the archive contents.</p> + +<p style="margin-left:8%; margin-top: 1em">The struct +archive_entry structure contains a complete description of a +single archive entry. It uses an opaque interface that is +fully documented in archive_entry(3).</p> + +<p style="margin-left:8%; margin-top: 1em">Users familiar +with historic formats should be aware that the newer +variants have eliminated most restrictions on the length of +textual fields. Clients should not assume that filenames, +link names, user names, or group names are limited in +length. In particular, pax interchange format can easily +accommodate pathnames in arbitrary character sets that +exceed <i>PATH_MAX</i>.</p> + +<p style="margin-top: 1em" valign="top"><b>RETURN +VALUES</b></p> + +<p style="margin-left:8%;">Most functions return zero on +success, non-zero on error. The return value indicates the +general severity of the error, ranging from +<b>ARCHIVE_WARN</b>, which indicates a minor problem that +should probably be reported to the user, to +<b>ARCHIVE_FATAL</b>, which indicates a serious problem that +will prevent any further operations on this archive. On +error, the <b>archive_errno</b>() function can be used to +retrieve a numeric error code (see errno(2)). The +<b>archive_error_string</b>() returns a textual error +message suitable for display.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_read_new</b>() +and <b>archive_write_new</b>() return pointers to an +allocated and initialized struct archive object.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>archive_read_data</b>() +and <b>archive_write_data</b>() return a count of the number +of bytes actually read or written. A value of zero indicates +the end of the data for this entry. A negative value +indicates an error, in which case the <b>archive_errno</b>() +and <b>archive_error_string</b>() functions can be used to +obtain more information.</p> + + +<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p> + +<p style="margin-left:8%;">There are character set +conversions within the archive_entry(3) functions that are +impacted by the currently-selected locale.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">tar(1), archive_entry(3), +archive_read(3), archive_util(3), archive_write(3), +tar(5)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@acm.org⟩.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">Some archive formats support +information that is not supported by struct archive_entry. +Such information cannot be fully archived or restored using +this library. This includes, for example, comments, +character sets, or the arbitrary key/value pairs that can +appear in pax interchange format archives.</p> + +<p style="margin-left:8%; margin-top: 1em">Conversely, of +course, not all of the information that can be stored in an +struct archive_entry is supported by all formats. For +example, cpio formats do not support nanosecond timestamps; +old tar formats do not support large device numbers.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +August 19, 2006 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/libarchive_internals.3.html b/archivers/libarchive/files/doc/html/libarchive_internals.3.html index 62f4277aa00..56fc18d4254 100644 --- a/archivers/libarchive/files/doc/html/libarchive_internals.3.html +++ b/archivers/libarchive/files/doc/html/libarchive_internals.3.html @@ -1,891 +1,381 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:17 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 66 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(April 16, 2007 LIB)74.5 48 Q(ARCHIVE 3)-.35 E(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G -(_internals</b>).15 E 2.5(-d)0 60 S(escription of libarchi)-2.5 E .3 --.15(ve i)-.25 H(nternal interf).15 E(aces)-.1 E(<h3 id="O)36 72 Q(VER) --.5 E(VIEW">)-.8 E 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.5(OV)36 12 S(ER).5 E(VIEW)-.8 E(</h3>)36 24 Q -(The)0 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E(library pro)0 -60 Q(vides a \215e)-.15 E(xible interf)-.15 E -(ace for reading and writing)-.1 E(streaming archi)0 72 Q .3 -.15 -(ve \214)-.25 H(les such as tar and cpio.).15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Internally)0 12 Q 2.5(,i)-.65 G 2.5(tf)-2.5 G -(ollo)-2.5 E(ws a modular layered design that should)-.25 E(mak)0 24 Q -2.5(ei)-.1 G 2.5(te)-2.5 G(asy to add ne)-2.5 E 2.5(wa)-.25 G(rchi)-2.5 -E .3 -.15(ve a)-.25 H(nd compression formats.).15 E -(<h3 id="GENERAL ARCHITECTURE">)36 36 Q(GENERAL ARCHITECTURE)36 48 Q -(</h3>)36 60 Q(Externally)0 72 Q 2.5(,l)-.65 G(ibarchi)-2.5 E .3 -.15 -(ve ex)-.25 H(poses most operations through an).15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(opaque, object-style interf)0 12 Q(ace.)-.1 E -(The)0 24 Q(<a href="../html1/archi)0 36 Q -.15(ve)-.25 G(_entry).15 E -(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(1\)</a>).15 E -(objects store information about a single \214lesystem object.)0 48 Q -(The rest of the library pro)0 60 Q(vides f)-.15 E(acilities to write) --.1 E(<a href="../html1/archi)0 72 Q -.15(ve)-.25 G(_entry).15 E -(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(1\)</a>).15 E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(objects to archi)0 12 Q .3 -.15(ve \214)-.25 H -(les,).15 E(read them from archi)0 24 Q .3 -.15(ve \214)-.25 H(les,).15 -E(and write them to disk.)0 36 Q(\(There are plans to add a f)0 48 Q -(acility to read)-.1 E(<a href="../html1/archi)0 60 Q -.15(ve)-.25 G -(_entry).15 E(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(1\)</a>).15 E -(objects from disk as well.\))0 72 Q 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(The read and write APIs each ha)0 24 -Q .3 -.15(ve f)-.2 H(our layers: a public API).15 E(layer)0 36 Q 2.5 -(,af)-.4 G(ormat layer that understands the archi)-2.5 E .3 -.15 -(ve \214)-.25 H(le format,).15 E 2.5(ac)0 48 S(ompression layer)-2.5 E -2.5(,a)-.4 G(nd an I/O layer)-2.5 E(.)-.55 E -(The I/O layer is completely e)0 60 Q(xposed to clients who can replace) --.15 E(it entirely with their o)0 72 Q(wn functions.)-.25 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(In order to pro)0 24 Q -(vide as much consistenc)-.15 E 2.5(ya)-.15 G 2.5(sp)-2.5 G -(ossible for clients,)-2.5 E(some public functions are virtualized.)0 36 -Q(Ev)0 48 Q(entually)-.15 E 2.5(,i)-.65 G 2.5(ts)-2.5 G -(hould be possible for clients to open)-2.5 E(an archi)0 60 Q .3 -.15 -(ve o)-.25 H 2.5(rd).15 G(isk writer)-2.5 E 2.5(,a)-.4 G -(nd then use a single set of)-2.5 E -(code to select and write entries, re)0 72 Q -.05(ga)-.15 G -(rdless of the tar).05 E(get.)-.18 E 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="READ ARCHITECTURE">)36 12 Q -(READ ARCHITECTURE)36 24 Q(</h3>)36 36 Q -(From the outside, clients use the)0 48 Q(<a href="../html3/archi)0 60 Q --.15(ve)-.25 G(_read.html">archi).15 E -.15(ve)-.25 G(_read\(3\)</a>).15 -E(API to manipulate an)0 72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(</b>).15 E -(object to read entries and bodies from an archi)0 24 Q .3 -.15(ve s) --.25 H(tream.).15 E(Internally)0 36 Q 2.5(,t)-.65 G(he)-2.5 E(<b>archi)0 -48 Q -.15(ve)-.25 G(</b>).15 E(object is cast to an)0 60 Q(<b>archi)0 72 -Q -.15(ve)-.25 G(_read</b>).15 E 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(object, which holds all read-speci\214c data.)0 -12 Q(The API has four layers:)0 24 Q(The lo)0 36 Q -(west layer is the I/O layer)-.25 E(.)-.55 E(This layer can be o)0 48 Q --.15(ve)-.15 G(rridden by clients, b).15 E(ut most clients use)-.2 E -(the packaged I/O callbacks pro)0 60 Q(vided, for e)-.15 E(xample, by) --.15 E(<a href="../html3/archi)0 72 Q -.15(ve)-.25 G(_read_open_memory) -.15 E(.html">archi)-.65 E -.15(ve)-.25 G(_read_open_memory\(3\)</a>,).15 -E 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<a href="../html3/archi)0 24 Q -.15 -(ve)-.25 G(_read_open_fd.html">archi).15 E -.15(ve)-.25 G -(_read_open_fd\(3\)</a>.).15 E -(The compression layer calls the I/O layer to)0 36 Q -(read bytes and decompresses them for the format layer)0 48 Q(.)-.55 E -(The format layer unpacks a stream of uncompressed bytes and)0 60 Q -(creates)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>archi)0 12 Q -.15(ve)-.25 G(_entry</b>).15 E -(objects from the incoming data.)0 24 Q(The API layer tracks o)0 36 Q --.15(ve)-.15 G(rall state).15 E(\(for e)0 48 Q(xample, it pre)-.15 E --.15(ve)-.25 G(nts clients from reading data before reading a header\)) -.15 E(and in)0 60 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(st).1 G -(he format and compression layer operations)-2.5 E(through re)0 72 Q -(gistered function pointers.)-.15 E 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,t)-.4 G -(he API layer dri)-2.5 E -.15(ve)-.25 G 2.5(st).15 G -(he format-detection process:)-2.5 E(When opening the archi)0 24 Q -.15 -(ve)-.25 G 2.5(,i).15 G 2.5(tr)-2.5 G(eads an initial block of data)-2.5 -E(and of)0 36 Q(fers it to each re)-.25 E(gistered compression handler) --.15 E(.)-.55 E -(The one with the highest bid is initialized with the \214rst block.)0 -48 Q(Similarly)0 60 Q 2.5(,t)-.65 G -(he format handlers are polled to see which handler)-2.5 E -(is the best for each archi)0 72 Q -.15(ve)-.25 G(.).15 E 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(Prior to 2.4.0, the format bidders were in)0 -12 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(df).1 G(or each)-2.5 E(entry)0 24 Q -2.5(,b)-.65 G(ut this design hindered error reco)-2.7 E -.15(ve)-.15 G -(ry).15 E(.\))-.65 E(<h4 id="I/O Layer and Client Callbacks">)36 36 Q -(I/O Layer and Client Callbacks)36 48 Q(</h4>)36 60 Q -(The read API goes to some lengths to be nice to clients.)0 72 Q 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(As a result, there are fe)0 12 Q 2.5(wr)-.25 G -(estrictions on the beha)-2.5 E(vior of)-.2 E(the client callbacks.)0 24 -Q(<p>)36 36 Q(The client read callback is e)0 48 Q(xpected to pro)-.15 E -(vide a block)-.15 E(of data on each call.)0 60 Q 2.5(Az)0 72 S -(ero-length return does indicate end of \214le, b)-2.5 E(ut otherwise) --.2 E 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(blocks may be as small as one byte or as lar)0 -12 Q(ge as the entire \214le.)-.18 E(In particular)0 24 Q 2.5(,b)-.4 G -(locks may be of dif)-2.5 E(ferent sizes.)-.25 E(<p>)36 36 Q -(The client skip callback returns the number of bytes actually)0 48 Q -(skipped, which may be much smaller than the skip requested.)0 60 Q -(The only requirement is that the skip not be lar)0 72 Q(ger)-.18 E(.) --.55 E 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,c)-.4 G -(lients are allo)-2.5 E(wed to return zero for an)-.25 E(y)-.15 E -(skip that the)0 24 Q 2.5(yd)-.15 G(on')-2.5 E 2.5(tw)-.18 G -(ant to handle.)-2.6 E(The skip callback must ne)0 36 Q -.15(ve)-.25 G -2.5(rb).15 G 2.5(ei)-2.5 G -1.9 -.4(nv o)-2.5 H -.1(ke).4 G 2.5(dw).1 G -(ith a ne)-2.5 E -.05(ga)-.15 G(ti).05 E .3 -.15(ve v)-.25 H(alue.)-.1 E -(<p>)36 48 Q -.25(Ke)0 60 S -(ep in mind that not all clients are reading from disk:).25 E -(clients reading from netw)0 72 Q(orks may pro)-.1 E(vide dif)-.15 E -(ferent-sized)-.25 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(blocks on e)0 12 Q -.15(ve)-.25 G -(ry request and cannot skip at all;).15 E(adv)0 24 Q -(anced clients may use)-.25 E -(<a href="../html2/mmap.html">mmap\(2\)</a>)0 36 Q -(to read the entire \214le into memory at once and return the)0 48 Q -(entire \214le to libarchi)0 60 Q .3 -.15(ve a)-.25 H 2.5(sas).15 G -(ingle block;)-2.5 E(other clients may be)0 72 Q -(gin asynchronous I/O operations for the)-.15 E 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ne)0 12 Q(xt block on each request.)-.15 E -(<h4 id="Decompresssion Layer">)36 24 Q(Decompresssion Layer)36 36 Q -(</h4>)36 48 Q(The decompression layer not only handles decompression,)0 -60 Q(it also b)0 72 Q(uf)-.2 E -(fers data so that the format handlers see a)-.25 E 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(much nicer I/O model.)0 12 Q -(The decompression API is a tw)0 24 Q 2.5(os)-.1 G -(tage peek/consume model.)-2.5 E 2.5(Ar)0 36 S -(ead_ahead request speci\214es a minimum read amount;)-2.5 E -(the decompression layer must pro)0 48 Q(vide a pointer to at least)-.15 -E(that much data.)0 60 Q(If more data is immediately a)0 72 Q -.25(va) --.2 G(ilable, it should return more:).25 E 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(the format layer handles b)0 12 Q -(ulk data reads by asking for a minimum)-.2 E(of one byte and then cop)0 -24 Q(ying as much data as is a)-.1 E -.25(va)-.2 G(ilable.).25 E(<p>)36 -36 Q 2.5(As)0 48 S(ubsequent call to the)-2.5 E -(<b>consume</b>\(<code></code>\))0 60 Q(function adv)0 72 Q -(ances the read pointer)-.25 E(.)-.55 E 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that data returned from a)0 12 Q -(<b>read_ahead</b>\(<code></code>\))0 24 Q -(call is guaranteed to remain in place until)0 36 Q(the ne)0 48 Q -(xt call to)-.15 E(<b>read_ahead</b>\(<code></code>\).)0 60 Q(Interv)0 -72 Q(ening calls to)-.15 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>consume</b>\(<code></code>\))0 12 Q -(should not cause the data to mo)0 24 Q -.15(ve)-.15 G(.).15 E(<p>)36 36 -Q(Skip requests must al)0 48 Q -.1(wa)-.1 G(ys be handled e).1 E(xactly) --.15 E(.)-.65 E(Decompression handlers that cannot seek forw)0 60 Q -(ard should)-.1 E(not re)0 72 Q(gister a skip handler;)-.15 E 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(the API layer \214lls in a generic skip handler\ - that reads and discards data.)0 12 Q(<p>)36 24 Q 2.5(Ad)0 36 S -(ecompression handler has a speci\214c lifec)-2.5 E(ycle:)-.15 E -(<dl compact>)0 48 Q(<dt>Re)0 60 Q(gistration/Con\214guration<dd>)-.15 E -(When the client in)0 72 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(st).1 G -(he public support function,)-2.5 E 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(the decompression handler in)0 12 Q -.2(vo)-.4 G --.1(ke).2 G 2.5(st).1 G(he internal)-2.5 E(<b>__archi)0 24 Q -.15(ve) --.25 G(_read_re).15 E(gister_compression</b>\(<code></code>\))-.15 E -(function to pro)0 36 Q(vide bid and initialization functions.)-.15 E -(This function returns)0 48 Q(<b></b><b>NULL</b>)0 60 Q -(on error or else a pointer to a)0 72 Q 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>struct</b><b> decompressor_t</b>.)0 12 -Q(This structure contains a)0 24 Q(<i></i><i>v)0 36 Q -(oid</i><i> *</i><i> con\214g</i>)-.2 E -(slot that can be used for storing an)0 48 Q 2.5(yc)-.15 G -(ustomization information.)-2.5 E(<dt>Bid<dd>)0 60 Q -(The bid function is in)0 72 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G -(ith a pointer and size of a block of data.)-2.5 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The decompressor can access its con\214g data)0 -12 Q(through the)0 24 Q(<i></i><i>decompressor</i>)0 36 Q -(element of the)0 48 Q(<b></b><b>archi)0 60 Q -.15(ve)-.25 G(_read</b>) -.15 E(object.)0 72 Q 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The bid function is otherwise stateless.)0 12 Q -(In particular)0 24 Q 2.5(,i)-.4 G 2.5(tm)-2.5 G(ust not perform an)-2.5 -E 2.5(yI)-.15 G(/O operations.)-2.5 E(<p>)36 36 Q(The v)0 48 Q -(alue returned by the bid function indicates its suitability)-.25 E -(for handling this data stream.)0 60 Q 2.5(Ab)0 72 S -(id of zero will ensure that this decompressor is ne)-2.5 E -.15(ve)-.25 -G 2.5(ri).15 G -1.9 -.4(nv o)-2.5 H -.1(ke).4 G(d.).1 E 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Return zero if magic number checks f)0 12 Q -(ail.)-.1 E(Otherwise, your initial implementation should return the nu\ -mber of bits)0 24 Q(actually check)0 36 Q(ed.)-.1 E -.15(Fo)0 48 S 2.5 -(re).15 G(xample, if you v)-2.65 E(erify tw)-.15 E 2.5(of)-.1 G -(ull bytes and three bits of another)-2.5 E(byte, bid 19.)0 60 Q -(Note that the initial block may be v)0 72 Q(ery short;)-.15 E 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(be careful to only inspect the data you are gi)0 -12 Q -.15(ve)-.25 G(n.).15 E(\(The current decompressors require tw)0 24 -Q 2.5(ob)-.1 G(ytes for correct bidding.\))-2.5 E(<dt>Initialize<dd>)0 -36 Q(The winning bidder will ha)0 48 Q .3 -.15(ve i)-.2 H -(ts init function called.).15 E -(This function should initialize the remaining slots of the)0 60 Q -(<i></i><i>struct</i><i> decompressor_t</i>)0 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(object pointed to by the)0 12 Q -(<i></i><i>decompressor</i>)0 24 Q(element of the)0 36 Q -(<i></i><i>archi)0 48 Q -.15(ve)-.25 G(_read</i>).15 E(object.)0 60 Q -(In particular)0 72 Q 2.5(,i)-.4 G 2.5(ts)-2.5 G(hould allocate an)-2.5 -E 2.5(yw)-.15 G(orking data it needs)-2.6 E 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(in the)0 12 Q(<i></i><i>data</i>)0 24 Q -(slot of that structure.)0 36 Q -(The init function is called with the block of data that)0 48 Q -.1(wa)0 -60 S 2.5(su).1 G(sed for tasting.)-2.5 E -(At this point, the decompressor is responsible for all I/O)0 72 Q 0 Cg -EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(requests to the client callbacks.)0 12 Q -(The decompressor is free to read more data as and when)0 24 Q -(necessary)0 36 Q(.)-.65 E(<dt>Satisfy I/O requests<dd>)0 48 Q -(The format handler will in)0 60 Q -.2(vo)-.4 G .2 -.1(ke t).2 H(he).1 E -(<i></i><i>read_ahead</i>,)0 72 Q 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>consume</i>,)0 12 Q(and)0 24 Q -(<i></i><i>skip</i>)0 36 Q(functions as needed.)0 48 Q(<dt>Finish<dd>)0 -60 Q(The \214nish method is called only once when the archi)0 72 Q .3 --.15(ve i)-.25 H 2.5(sc).15 G(losed.)-2.5 E 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(It should release an)0 12 Q -(ything stored in the)-.15 E(<i></i><i>data</i>)0 24 Q(and)0 36 Q -(<i></i><i>con\214g</i>)0 48 Q(slots of the)0 60 Q -(<i></i><i>decompressor</i>)0 72 Q 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(object.)0 12 Q(It should not in)0 24 Q -.2(vo) --.4 G .2 -.1(ke t).2 H(he client close callback.).1 E(</dl>)0 36 Q -(<h4 id="F)36 48 Q(ormat Layer">)-.15 E -.15(Fo)36 60 S(rmat Layer).15 E -(</h4>)36 72 Q 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The read formats ha)0 12 Q .3 -.15(ve a s)-.2 H -(imilar lifec).15 E(ycle to the decompression handlers:)-.15 E -(<dl compact>)0 24 Q(<dt>Re)0 36 Q(gistration<dd>)-.15 E -(Allocate your pri)0 48 Q -.25(va)-.25 G -(te data and initialize your pointers.).25 E(<dt>Bid<dd>)0 60 Q -.15(Fo) -0 72 S(rmats bid by in).15 E -.2(vo)-.4 G(king the).2 E 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>read_ahead</b>\(<code></code>\))0 12 Q -(decompression method b)0 24 Q(ut not calling the)-.2 E -(<b>consume</b>\(<code></code>\))0 36 Q(method.)0 48 Q(This allo)0 60 Q -(ws each bidder to look ahead in the input stream.)-.25 E -(Bidders should not look further ahead than necessary)0 72 Q 2.5(,a)-.65 -G 2.5(sl)-2.5 G(ong)-2.5 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(look aheads put pressure on the decompression layer to b)0 12 Q(uf)-.2 -E(fer)-.25 E(lots of data.)0 24 Q(Most formats only require a fe)0 36 Q -2.5(wh)-.25 G(undred bytes of look ahead;)-2.5 E(look aheads of a fe)0 -48 Q 2.5(wk)-.25 G(ilobytes are reasonable.)-2.5 E -(\(The ISO9660 reader sometimes looks ahead by 48k, which)0 60 Q -(should be considered an upper limit.\))0 72 Q 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt>Read header<dd>)0 12 Q -(The header read is usually the most comple)0 24 Q 2.5(xp)-.15 G -(art of an)-2.5 E 2.5(yf)-.15 G(ormat.)-2.5 E(There are a fe)0 36 Q 2.5 -(ws)-.25 G(trate)-2.5 E(gies w)-.15 E(orth mentioning:)-.1 E -.15(Fo)0 -48 S 2.5(rf).15 G -(ormats such as tar or cpio, reading and parsing the header is)-2.5 E -(straightforw)0 60 Q(ard since headers alternate with data.)-.1 E -.15 -(Fo)0 72 S 2.5(rf).15 G(ormats that store all header data at the be)-2.5 -E(ginning of the \214le,)-.15 E 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(the \214rst header read request may ha)0 12 Q .3 --.15(ve t)-.2 H 2.5(or).15 G(ead all headers into)-2.5 E -(memory and store that data, sorted by the location of the \214le)0 24 Q -(data.)0 36 Q(Subsequent header read requests will skip forw)0 48 Q -(ard to the)-.1 E(be)0 60 Q -(ginning of the \214le data and return the corresponding header)-.15 E -(.)-.55 E(<dt>Read Data<dd>)0 72 Q 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The read data interf)0 12 Q -(ace supports sparse \214les; this requires that)-.1 E -(each call return a block of data specifying the \214le of)0 24 Q -(fset and)-.25 E(size.)0 36 Q -(This may require you to carefully track the location so that you)0 48 Q -(can return accurate \214le of)0 60 Q(fsets for each read.)-.25 E -(Remember that the decompressor will return as much data as it has.)0 72 -Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Generally)0 12 Q 2.5(,y)-.65 G(ou will w)-2.5 E -(ant to request one byte,)-.1 E -.15(ex)0 24 S(amine the return v).15 E -(alue to see ho)-.25 E 2.5(wm)-.25 G(uch data is a)-2.5 E -.25(va)-.2 G -(ilable, and).25 E(possibly trim that to the amount you can use.)0 36 Q --1.1(Yo)0 48 S 2.5(us)1.1 G(hould in)-2.5 E -.2(vo)-.4 G .2 -.1(ke c).2 -H(onsume for each block just before you return it.).1 E -(<dt>Skip All Data<dd>)0 60 Q(The skip data call should skip o)0 72 Q --.15(ve)-.15 G 2.5(ra).15 G(ll \214le data and trailing padding.)-2.5 E -0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(This is called automatically by the API layer just before each)0 12 Q -(header read.)0 24 Q -(It is also called in response to the client calling the public)0 36 Q -(<b>data_skip</b>\(<code></code>\))0 48 Q(function.)0 60 Q -(<dt>Cleanup<dd>)0 72 Q 0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(On cleanup, the format should release all of its allocated memory)0 12 -Q(.)-.65 E(</dl>)0 24 Q(<h4 id="API Layer">)36 36 Q(API Layer)36 48 Q -(</h4>)36 60 Q(XXX to do XXX)0 72 Q 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="WRITE ARCHITECTURE">)36 12 Q -(WRITE ARCHITECTURE)36 24 Q(</h3>)36 36 Q -(The write API has a similar set of four layers:)0 48 Q(an API layer)0 -60 Q 2.5(,af)-.4 G(ormat layer)-2.5 E 2.5(,ac)-.4 G(ompression layer) --2.5 E 2.5(,a)-.4 G(nd an I/O layer)-2.5 E(.)-.55 E(The re)0 72 Q -(gistration here is much simpler because only)-.15 E 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(one format and one compression can be re)0 12 Q -(gistered at a time.)-.15 E(<h4 id="I/O Layer and Client Callbacks">)36 -24 Q(I/O Layer and Client Callbacks)36 36 Q(</h4>)36 48 Q(XXX T)0 60 Q -2.5(ob)-.8 G 2.5(ew)-2.5 G(ritten XXX)-2.5 E -(<h4 id="Compression Layer">)36 72 Q 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Compression Layer)36 12 Q(</h4>)36 24 Q(XXX T)0 -36 Q 2.5(ob)-.8 G 2.5(ew)-2.5 G(ritten XXX)-2.5 E(<h4 id="F)36 48 Q -(ormat Layer">)-.15 E -.15(Fo)36 60 S(rmat Layer).15 E(</h4>)36 72 Q 0 -Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(XXX T)0 12 Q 2.5(ob)-.8 G 2.5(ew)-2.5 G -(ritten XXX)-2.5 E(<h4 id="API Layer">)36 24 Q(API Layer)36 36 Q(</h4>) -36 48 Q(XXX T)0 60 Q 2.5(ob)-.8 G 2.5(ew)-2.5 G(ritten XXX)-2.5 E -(<h3 id="WRITE_DISK ARCHITECTURE">)36 72 Q 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(WRITE_DISK ARCHITECTURE)36 12 Q(</h3>)36 24 Q -(The write_disk API is intended to look just lik)0 36 Q 2.5(et)-.1 G -(he write API)-2.5 E(to clients.)0 48 Q -(Since it does not handle multiple formats or compression, it)0 60 Q -(is not layered internally)0 72 Q(.)-.65 E 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="GENERAL SER)36 12 Q(VICES">)-.8 E -(GENERAL SER)36 24 Q(VICES)-.8 E(</h3>)36 36 Q(The)0 48 Q(<b>archi)0 60 -Q -.15(ve)-.25 G(_read</b>,).15 E(<b>archi)0 72 Q -.15(ve)-.25 G -(_write</b>,).15 E 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b>archi)0 24 Q -.15(ve)-.25 G -(_write_disk</b>).15 E(objects all contain an initial)0 36 Q(<b>archi)0 -48 Q -.15(ve)-.25 G(</b>).15 E(object which pro)0 60 Q -(vides common support for a set of standard services.)-.15 E -(\(Recall that ANSI/ISO C90 guarantees that you can cast freely between) -0 72 Q 0 Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(ap)0 12 S -(ointer to a structure and a pointer to the \214rst element of that)-2.5 -E(structure.\))0 24 Q(The)0 36 Q(<b>archi)0 48 Q -.15(ve)-.25 G(</b>).15 -E(object has a magic v)0 60 Q(alue that indicates which API this object) --.25 E(is associated with,)0 72 Q 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(slots for storing error information,)0 12 Q -(and function pointers for virtualized API functions.)0 24 Q -(<h3 id="MISCELLANEOUS NO)36 36 Q(TES">)-.4 E(MISCELLANEOUS NO)36 48 Q -(TES)-.4 E(</h3>)36 60 Q(Connecting e)0 72 Q(xisting archi)-.15 E -(ving libraries into libarchi)-.25 E .3 -.15(ve i)-.25 H 2.5(sg).15 G -(enerally)-2.5 E 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(quite dif)0 12 Q(\214cult.)-.25 E(In particular) -0 24 Q 2.5(,m)-.4 G(an)-2.5 E 2.5(ye)-.15 G -(xisting libraries strongly assume that you)-2.65 E -(are reading from a \214le; the)0 36 Q 2.5(ys)-.15 G(eek forw)-2.5 E -(ards and backw)-.1 E(ards as necessary)-.1 E(to locate v)0 48 Q -(arious pieces of information.)-.25 E(In contrast, libarchi)0 60 Q .3 --.15(ve n)-.25 H -2.15 -.25(ev e).15 H 2.5(rs).25 G(eeks backw)-2.5 E -(ards in its input, which)-.1 E(sometimes requires v)0 72 Q(ery dif)-.15 -E(ferent approaches.)-.25 E 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -.15(Fo)0 24 S 2.5(re).15 G -(xample, libarchi)-2.65 E -.15(ve)-.25 G 1.1 -.55('s I).15 H -(SO9660 support operates v).55 E(ery dif)-.15 E(ferently)-.25 E -(from most ISO9660 readers.)0 36 Q(The libarchi)0 48 Q .3 -.15(ve s)-.25 -H(upport utilizes a w).15 E(ork-queue design that)-.1 E -.1(ke)0 60 S -(eps a list of kno).1 E -(wn entries sorted by their location in the input.)-.25 E(Whene)0 72 Q --.15(ve)-.25 G 2.5(rl).15 G(ibarchi)-2.5 E -.15(ve)-.25 G 1.1 -.55('s I) -.15 H(SO9660 implementation is ask).55 E(ed for the ne)-.1 E(xt)-.15 E 0 -Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(header)0 12 Q 2.5(,c)-.4 G -(hecks this list to \214nd the ne)-2.5 E(xt item on the disk.)-.15 E -(Directories are parsed when the)0 24 Q 2.5(ya)-.15 G -(re encountered and ne)-2.5 E(w)-.25 E(items are added to the list.)0 36 -Q(This design relies hea)0 48 Q -(vily on the ISO9660 image being optimized so that)-.2 E(directories al) -0 60 Q -.1(wa)-.1 G(ys occur earlier on the disk than the \214les the).1 -E(y)-.15 E(describe.)0 72 Q 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(Depending on the speci\214c format,\ - such approaches may not be possible.)0 24 Q -(The ZIP format speci\214cation, for e)0 36 Q(xample, allo)-.15 E -(ws archi)-.25 E -.15(ve)-.25 G(rs to store).15 E -.1(ke)0 48 S 2.5(yi) --.05 G(nformation only at the end of the \214le.)-2.5 E(In theory)0 60 Q -2.5(,i)-.65 G 2.5(ti)-2.5 G 2.5(sp)-2.5 G(ossible to create ZIP archi) --2.5 E -.15(ve)-.25 G 2.5(st).15 G(hat cannot)-2.5 E -(be read without seeking.)0 72 Q 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(Fo)0 12 S(rtunately).15 E 2.5(,s)-.65 G -(uch archi)-2.5 E -.15(ve)-.25 G 2.5(sa).15 G(re v)-2.5 E -(ery rare, and libarchi)-.15 E .3 -.15(ve c)-.25 H(an read).15 E -(most ZIP archi)0 24 Q -.15(ve)-.25 G(s, though it cannot al).15 E -.1 -(wa)-.1 G(ys e).1 E(xtract as much information)-.15 E -(as a dedicated ZIP program.)0 36 Q(<h3 id="SEE ALSO">)36 48 Q(SEE ALSO) -36 60 Q(</h3>)36 72 Q 0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html3/archi)0 12 Q -.15(ve)-.25 G -(.html">archi).15 E -.15(ve)-.25 G(\(3\)</a>,).15 E -(<a href="../html3/archi)0 24 Q -.15(ve)-.25 G(_entry).15 E -(.html">archi)-.65 E -.15(ve)-.25 G(_entry\(3\)</a>,).15 E -(<a href="../html3/archi)0 36 Q -.15(ve)-.25 G(_read.html">archi).15 E --.15(ve)-.25 G(_read\(3\)</a>,).15 E(<a href="../html3/archi)0 48 Q -.15 -(ve)-.25 G(_write.html">archi).15 E -.15(ve)-.25 G(_write\(3\)</a>,).15 -E(<a href="../html3/archi)0 60 Q -.15(ve)-.25 G(_write_disk.html">archi) -.15 E -.15(ve)-.25 G(_write_disk\(3\)</a>).15 E(<h3 id="HIST)36 72 Q(OR) --.18 E(Y">)-.65 E 0 Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(HIST)36 12 Q(OR)-.18 E(Y)-.65 E(</h3>)36 24 Q -(The)0 36 Q(<b>libarchi)0 48 Q -.15(ve)-.25 G(</b>).15 E -(library \214rst appeared in)0 60 Q(FreeBSD5.3.)0 72 Q 0 Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="A)36 12 Q(UTHORS">)-.55 E -.55(AU)36 24 -S(THORS).55 E(</h3>)36 36 Q(<p>)36 48 Q(The)0 60 Q(<b>libarchi)0 72 Q --.15(ve)-.25 G(</b>).15 E 0 Cg EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(library w)0 12 Q(as written by)-.1 E -.35(Ti)0 -24 S 2.5(mK).35 G(ientzle <kientzle@acm.or)-2.5 E(g>.)-.18 E -(<h3 id="B)36 36 Q(UGS">)-.1 E -.1(BU)36 48 S(GS).1 E(</h3>)36 60 Q -(</body>)0 72 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:31 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">LIBARCHIVE(3) FreeBSD Library Functions +Manual LIBARCHIVE(3)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>libarchive_internals</b> +— description of libarchive internal interfaces</p> + + +<p style="margin-top: 1em" valign="top"><b>OVERVIEW</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +provides a flexible interface for reading and writing +streaming archive files such as tar and cpio. Internally, it +follows a modular layered design that should make it easy to +add new archive and compression formats.</p> + +<p style="margin-top: 1em" valign="top"><b>GENERAL +ARCHITECTURE</b></p> + +<p style="margin-left:8%;">Externally, libarchive exposes +most operations through an opaque, object-style interface. +The archive_entry(1) objects store information about a +single filesystem object. The rest of the library provides +facilities to write archive_entry(1) objects to archive +files, read them from archive files, and write them to disk. +(There are plans to add a facility to read archive_entry(1) +objects from disk as well.)</p> + +<p style="margin-left:8%; margin-top: 1em">The read and +write APIs each have four layers: a public API layer, a +format layer that understands the archive file format, a +compression layer, and an I/O layer. The I/O layer is +completely exposed to clients who can replace it entirely +with their own functions.</p> + +<p style="margin-left:8%; margin-top: 1em">In order to +provide as much consistency as possible for clients, some +public functions are virtualized. Eventually, it should be +possible for clients to open an archive or disk writer, and +then use a single set of code to select and write entries, +regardless of the target.</p> + +<p style="margin-top: 1em" valign="top"><b>READ +ARCHITECTURE</b></p> + +<p style="margin-left:8%;">From the outside, clients use +the archive_read(3) API to manipulate an <b>archive</b> +object to read entries and bodies from an archive stream. +Internally, the <b>archive</b> object is cast to an +<b>archive_read</b> object, which holds all read-specific +data. The API has four layers: The lowest layer is the I/O +layer. This layer can be overridden by clients, but most +clients use the packaged I/O callbacks provided, for +example, by archive_read_open_memory(3), and +archive_read_open_fd(3). The compression layer calls the I/O +layer to read bytes and decompresses them for the format +layer. The format layer unpacks a stream of uncompressed +bytes and creates <b>archive_entry</b> objects from the +incoming data. The API layer tracks overall state (for +example, it prevents clients from reading data before +reading a header) and invokes the format and compression +layer operations through registered function pointers. In +particular, the API layer drives the format-detection +process: When opening the archive, it reads an initial block +of data and offers it to each registered compression +handler. The one with the highest bid is initialized with +the first block. Similarly, the format handlers are polled +to see which handler is the best for each archive. (Prior to +2.4.0, the format bidders were invoked for each entry, but +this design hindered error recovery.)</p> + +<p style="margin-left:8%; margin-top: 1em"><b>I/O Layer and +Client Callbacks</b> <br> +The read API goes to some lengths to be nice to clients. As +a result, there are few restrictions on the behavior of the +client callbacks.</p> + +<p style="margin-left:8%; margin-top: 1em">The client read +callback is expected to provide a block of data on each +call. A zero-length return does indicate end of file, but +otherwise blocks may be as small as one byte or as large as +the entire file. In particular, blocks may be of different +sizes.</p> + +<p style="margin-left:8%; margin-top: 1em">The client skip +callback returns the number of bytes actually skipped, which +may be much smaller than the skip requested. The only +requirement is that the skip not be larger. In particular, +clients are allowed to return zero for any skip that they +don’t want to handle. The skip callback must never be +invoked with a negative value.</p> + +<p style="margin-left:8%; margin-top: 1em">Keep in mind +that not all clients are reading from disk: clients reading +from networks may provide different-sized blocks on every +request and cannot skip at all; advanced clients may use +mmap(2) to read the entire file into memory at once and +return the entire file to libarchive as a single block; +other clients may begin asynchronous I/O operations for the +next block on each request.</p> + + +<p style="margin-left:8%; margin-top: 1em"><b>Decompresssion +Layer</b> <br> +The decompression layer not only handles decompression, it +also buffers data so that the format handlers see a much +nicer I/O model. The decompression API is a two stage +peek/consume model. A read_ahead request specifies a minimum +read amount; the decompression layer must provide a pointer +to at least that much data. If more data is immediately +available, it should return more: the format layer handles +bulk data reads by asking for a minimum of one byte and then +copying as much data as is available.</p> + +<p style="margin-left:8%; margin-top: 1em">A subsequent +call to the <b>consume</b>() function advances the read +pointer. Note that data returned from a <b>read_ahead</b>() +call is guaranteed to remain in place until the next call to +<b>read_ahead</b>(). Intervening calls to <b>consume</b>() +should not cause the data to move.</p> + +<p style="margin-left:8%; margin-top: 1em">Skip requests +must always be handled exactly. Decompression handlers that +cannot seek forward should not register a skip handler; the +API layer fills in a generic skip handler that reads and +discards data.</p> + +<p style="margin-left:8%; margin-top: 1em">A decompression +handler has a specific lifecycle:</p> + +<p valign="top">Registration/Configuration</p> + +<p style="margin-left:20%;">When the client invokes the +public support function, the decompression handler invokes +the internal <b>__archive_read_register_compression</b>() +function to provide bid and initialization functions. This +function returns <b>NULL</b> on error or else a pointer to a +<b>struct decompressor_t</b>. This structure contains a +<i>void * config</i> slot that can be used for storing any +customization information.</p> + +<p valign="top">Bid</p> + +<p style="margin-left:20%; margin-top: 1em">The bid +function is invoked with a pointer and size of a block of +data. The decompressor can access its config data through +the <i>decompressor</i> element of the <b>archive_read</b> +object. The bid function is otherwise stateless. In +particular, it must not perform any I/O operations.</p> + +<p style="margin-left:20%; margin-top: 1em">The value +returned by the bid function indicates its suitability for +handling this data stream. A bid of zero will ensure that +this decompressor is never invoked. Return zero if magic +number checks fail. Otherwise, your initial implementation +should return the number of bits actually checked. For +example, if you verify two full bytes and three bits of +another byte, bid 19. Note that the initial block may be +very short; be careful to only inspect the data you are +given. (The current decompressors require two bytes for +correct bidding.)</p> + +<p valign="top">Initialize</p> + +<p style="margin-left:20%;">The winning bidder will have +its init function called. This function should initialize +the remaining slots of the <i>struct decompressor_t</i> +object pointed to by the <i>decompressor</i> element of the +<i>archive_read</i> object. In particular, it should +allocate any working data it needs in the <i>data</i> slot +of that structure. The init function is called with the +block of data that was used for tasting. At this point, the +decompressor is responsible for all I/O requests to the +client callbacks. The decompressor is free to read more data +as and when necessary.</p> + +<p valign="top">Satisfy I/O requests</p> + +<p style="margin-left:20%;">The format handler will invoke +the <i>read_ahead</i>, <i>consume</i>, and <i>skip</i> +functions as needed.</p> + +<p valign="top">Finish</p> + +<p style="margin-left:20%; margin-top: 1em">The finish +method is called only once when the archive is closed. It +should release anything stored in the <i>data</i> and +<i>config</i> slots of the <i>decompressor</i> object. It +should not invoke the client close callback.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Format +Layer</b> <br> +The read formats have a similar lifecycle to the +decompression handlers:</p> + +<p valign="top">Registration</p> + +<p style="margin-left:20%;">Allocate your private data and +initialize your pointers.</p> + +<p valign="top">Bid</p> + +<p style="margin-left:20%; margin-top: 1em">Formats bid by +invoking the <b>read_ahead</b>() decompression method but +not calling the <b>consume</b>() method. This allows each +bidder to look ahead in the input stream. Bidders should not +look further ahead than necessary, as long look aheads put +pressure on the decompression layer to buffer lots of data. +Most formats only require a few hundred bytes of look ahead; +look aheads of a few kilobytes are reasonable. (The ISO9660 +reader sometimes looks ahead by 48k, which should be +considered an upper limit.)</p> + +<p valign="top">Read header</p> + +<p style="margin-left:20%;">The header read is usually the +most complex part of any format. There are a few strategies +worth mentioning: For formats such as tar or cpio, reading +and parsing the header is straightforward since headers +alternate with data. For formats that store all header data +at the beginning of the file, the first header read request +may have to read all headers into memory and store that +data, sorted by the location of the file data. Subsequent +header read requests will skip forward to the beginning of +the file data and return the corresponding header.</p> + +<p valign="top">Read Data</p> + +<p style="margin-left:20%;">The read data interface +supports sparse files; this requires that each call return a +block of data specifying the file offset and size. This may +require you to carefully track the location so that you can +return accurate file offsets for each read. Remember that +the decompressor will return as much data as it has. +Generally, you will want to request one byte, examine the +return value to see how much data is available, and possibly +trim that to the amount you can use. You should invoke +consume for each block just before you return it.</p> + +<p valign="top">Skip All Data</p> + +<p style="margin-left:20%;">The skip data call should skip +over all file data and trailing padding. This is called +automatically by the API layer just before each header read. +It is also called in response to the client calling the +public <b>data_skip</b>() function.</p> + +<p valign="top">Cleanup</p> + +<p style="margin-left:20%;">On cleanup, the format should +release all of its allocated memory.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>API Layer</b> +<br> +XXX to do XXX</p> + +<p style="margin-top: 1em" valign="top"><b>WRITE +ARCHITECTURE</b></p> + +<p style="margin-left:8%;">The write API has a similar set +of four layers: an API layer, a format layer, a compression +layer, and an I/O layer. The registration here is much +simpler because only one format and one compression can be +registered at a time.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>I/O Layer and +Client Callbacks</b> <br> +XXX To be written XXX</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Compression +Layer</b> <br> +XXX To be written XXX</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Format +Layer</b> <br> +XXX To be written XXX</p> + +<p style="margin-left:8%; margin-top: 1em"><b>API Layer</b> +<br> +XXX To be written XXX</p> + +<p style="margin-top: 1em" valign="top"><b>WRITE_DISK +ARCHITECTURE</b></p> + +<p style="margin-left:8%;">The write_disk API is intended +to look just like the write API to clients. Since it does +not handle multiple formats or compression, it is not +layered internally.</p> + +<p style="margin-top: 1em" valign="top"><b>GENERAL +SERVICES</b></p> + +<p style="margin-left:8%;">The <b>archive_read</b>, +<b>archive_write</b>, and <b>archive_write_disk</b> objects +all contain an initial <b>archive</b> object which provides +common support for a set of standard services. (Recall that +ANSI/ISO C90 guarantees that you can cast freely between a +pointer to a structure and a pointer to the first element of +that structure.) The <b>archive</b> object has a magic value +that indicates which API this object is associated with, +slots for storing error information, and function pointers +for virtualized API functions.</p> + +<p style="margin-top: 1em" valign="top"><b>MISCELLANEOUS +NOTES</b></p> + +<p style="margin-left:8%;">Connecting existing archiving +libraries into libarchive is generally quite difficult. In +particular, many existing libraries strongly assume that you +are reading from a file; they seek forwards and backwards as +necessary to locate various pieces of information. In +contrast, libarchive never seeks backwards in its input, +which sometimes requires very different approaches.</p> + +<p style="margin-left:8%; margin-top: 1em">For example, +libarchive’s ISO9660 support operates very differently +from most ISO9660 readers. The libarchive support utilizes a +work-queue design that keeps a list of known entries sorted +by their location in the input. Whenever libarchive’s +ISO9660 implementation is asked for the next header, checks +this list to find the next item on the disk. Directories are +parsed when they are encountered and new items are added to +the list. This design relies heavily on the ISO9660 image +being optimized so that directories always occur earlier on +the disk than the files they describe.</p> + +<p style="margin-left:8%; margin-top: 1em">Depending on the +specific format, such approaches may not be possible. The +ZIP format specification, for example, allows archivers to +store key information only at the end of the file. In +theory, it is possible to create ZIP archives that cannot be +read without seeking. Fortunately, such archives are very +rare, and libarchive can read most ZIP archives, though it +cannot always extract as much information as a dedicated ZIP +program.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">archive(3), archive_entry(3), +archive_read(3), archive_write(3), archive_write_disk(3)</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +first appeared in FreeBSD 5.3.</p> + +<p style="margin-top: 1em" valign="top"><b>AUTHORS</b></p> + +<p style="margin-left:8%;">The <b>libarchive</b> library +was written by Tim Kientzle +⟨kientzle@acm.org⟩.</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">FreeBSD 9.0 April 16, +2007 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/mtree.5.html b/archivers/libarchive/files/doc/html/mtree.5.html index 76ea8e06084..2e8f4748b66 100644 --- a/archivers/libarchive/files/doc/html/mtree.5.html +++ b/archivers/libarchive/files/doc/html/mtree.5.html @@ -1,622 +1,339 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:17 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 46 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(August 20, 2007 MTREE 5)74.5 48 Q(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>mtree</b>)0 48 Q 2.5(-f)0 60 S -(ormat of mtree dir hierarch)-2.5 E 2.5<798c>-.05 G(les)-2.5 E -(<h3 id="DESCRIPTION">)36 72 Q 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(The)0 36 Q -(<b>mtree</b>)0 48 Q(format is a te)0 60 Q -(xtual format that describes a collection of \214lesystem objects.)-.15 -E(Such \214les are typically used to create or v)0 72 Q -(erify directory hierarchies.)-.15 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h4 id="General F)36 12 Q(ormat">)-.15 E -(General F)36 24 Q(ormat)-.15 E(</h4>)36 36 Q(An)0 48 Q(<b>mtree</b>)0 -60 Q(\214le consists of a series of lines, each pro)0 72 Q -(viding information)-.15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(about a single \214lesystem object.)0 12 Q -(Leading whitespace is al)0 24 Q -.1(wa)-.1 G(ys ignored.).1 E(<p>)36 36 -Q(When encoding \214le or pathnames, an)0 48 Q 2.5(yb)-.15 G -(ackslash character or)-2.5 E -(character outside of the 95 printable ASCII characters must be)0 60 Q -(encoded as a a backslash follo)0 72 Q(wed by three)-.25 E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(octal digits.)0 12 Q -(When reading mtree \214les, an)0 24 Q 2.5(ya)-.15 G -(ppearance of a backslash)-2.5 E(follo)0 36 Q -(wed by three octal digits should be con)-.25 E -.15(ve)-.4 G -(rted into the).15 E(corresponding character)0 48 Q(.)-.55 E(<p>)36 60 Q -(Each line is interpreted independently as one of the follo)0 72 Q -(wing types:)-.25 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q(<p><dt>Signature<dd>)0 24 Q -(The \214rst line of an)0 36 Q 2.5(ym)-.15 G(tree \214le must be)-2.5 E -(gin with)-.15 E -.74(``)0 48 S(#mtree').74 E('.)-.74 E -(If a \214le contains an)0 60 Q 2.5(yf)-.15 G -(ull path entries, the \214rst line should)-2.5 E(be)0 72 Q(gin with) --.15 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(#mtree v2.0').74 E(',)-.74 E -(otherwise, the \214rst line should be)0 24 Q(gin with)-.15 E -.74(``)0 -36 S(#mtree v1.0').74 E('.)-.74 E(<p><dt>Blank<dd>)0 48 Q -(Blank lines are ignored.)0 60 Q(<p><dt>Comment<dd>)0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Lines be)0 12 Q(ginning with)-.15 E -(<b></b><b>#</b>)0 24 Q(are ignored.)0 36 Q(<p><dt>Special<dd>)0 48 Q -(Lines be)0 60 Q(ginning with)-.15 E(<b></b><b>/</b>)0 72 Q 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(are special commands that in\215uence)0 12 Q -(the interpretation of later lines.)0 24 Q(<p><dt>Relati)0 36 Q -.15(ve) --.25 G(<dd>).15 E(If the \214rst whitespace-delimited w)0 48 Q -(ord has no)-.1 E(<b></b><b>/</b>)0 60 Q(characters,)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(it is the name of a \214le in the current directory)0 12 Q(.)-.65 E(An) -0 24 Q 2.5(yr)-.15 G(elati)-2.5 E .3 -.15(ve e)-.25 H -(ntry that describes a directory changes the).15 E(current directory)0 -36 Q(.)-.65 E(<p><dt>dot-dot<dd>)0 48 Q(As a special case, a relati)0 60 -Q .3 -.15(ve e)-.25 H(ntry with the \214lename).15 E -(<code></code><code>..</code>)0 72 Q 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(changes the current directory to the parent directory)0 12 Q(.)-.65 E -(Options on dot-dot entries are al)0 24 Q -.1(wa)-.1 G(ys ignored.).1 E -(<p><dt>Full<dd>)0 36 Q(If the \214rst whitespace-delimited w)0 48 Q -(ord has a)-.1 E(<b></b><b>/</b>)0 60 Q(character after)0 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(the \214rst character)0 12 Q 2.5(,i)-.4 G 2.5 -(ti)-2.5 G 2.5(st)-2.5 G(he pathname of a \214le relati)-2.5 E .3 -.15 -(ve t)-.25 H 2.5(ot).15 G(he)-2.5 E(starting directory)0 24 Q(.)-.65 E -(There can be multiple full entries describing the same \214le.)0 36 Q -(</dl>)0 48 Q(<p>)36 60 Q(Some tools that process)0 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>mtree</b>)0 12 Q -(\214les may require that multiple lines describing the same \214le)0 24 -Q(occur consecuti)0 36 Q -.15(ve)-.25 G(ly).15 E(.)-.65 E -(It is not permitted for the same \214le to be mentioned using)0 48 Q -(both a relati)0 60 Q .3 -.15(ve a)-.25 H -(nd a full \214le speci\214cation.).15 E(<h4 id="Special commands">)36 -72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Special commands)36 12 Q(</h4>)36 24 Q -1 -.8 -(Tw o)0 36 T(special commands are currently de\214ned:)3.3 E -(<dl compact>)0 48 Q(<p><dt><b></b><b>/set</b><dd>)0 60 Q -(This command de\214nes def)0 72 Q(ault v)-.1 E(alues for one or more k) --.25 E -.15(ey)-.1 G -.1(wo).15 G(rds.).1 E 0 Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(It is follo)0 12 Q -(wed on the same line by one or more whitespace-separated)-.25 E -.1(ke) -0 24 S(yw)-.05 E(ord de\214nitions.)-.1 E -(These de\214nitions apply to all follo)0 36 Q -(wing \214les that do not specify)-.25 E 2.5(av)0 48 S(alue for that k) --2.75 E -.15(ey)-.1 G -.1(wo).15 G(rd.).1 E -(<p><dt><b></b><b>/unset</b><dd>)0 60 Q(This command remo)0 72 Q -.15 -(ve)-.15 G 2.5(sa).15 G .3 -.15(ny d)-2.5 H(ef).15 E(ault v)-.1 E -(alue set by a pre)-.25 E(vious)-.25 E 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>/set</b>)0 12 Q(command.)0 24 Q -(It is follo)0 36 Q(wed on the same line by one or more k)-.25 E -.15 -(ey)-.1 G -.1(wo).15 G(rds).1 E(separated by whitespace.)0 48 Q(</dl>)0 -60 Q(<h4 id="K)36 72 Q -.15(ey)-.25 G -.1(wo).15 G(rds">).1 E 0 Cg EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -2.15 -.25(Ke y)36 12 T -.1(wo).25 G(rds).1 E -(</h4>)36 24 Q(After the \214lename, a full or relati)0 36 Q .3 -.15 -(ve e)-.25 H(ntry consists of zero).15 E(or more whitespace-separated k) -0 48 Q -.15(ey)-.1 G -.1(wo).15 G(rd de\214nitions.).1 E -(Each such de\214nition consists of a k)0 60 Q .3 -.15(ey f)-.1 H -(rom the follo).15 E(wing)-.25 E(list immediately follo)0 72 Q -(wed by an '=' sign)-.25 E 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and a v)0 12 Q(alue.)-.25 E(Softw)0 24 Q -(are programs reading mtree \214les should w)-.1 E(arn about)-.1 E -(unrecognized k)0 36 Q -.15(ey)-.1 G -.1(wo).15 G(rds.).1 E(<p>)36 48 Q -(Currently supported k)0 60 Q -.15(ey)-.1 G -.1(wo).15 G -(rds are as follo).1 E(ws:)-.25 E(<dl compact>)0 72 Q 0 Cg EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>cksum</b><dd>)0 12 Q -(The checksum of the \214le using the def)0 24 Q -(ault algorithm speci\214ed by)-.1 E(the)0 36 Q -(<a href="../html1/cksum.html">cksum\(1\)</a>)0 48 Q(utility)0 60 Q(.) --.65 E(<p><dt><b></b><b>contents</b><dd>)0 72 Q 0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(The full pathname of a \214le that holds the contents of this \214le.)0 -12 Q(<p><dt><b></b><b>\215ags</b><dd>)0 24 Q -(The \214le \215ags as a symbolic name.)0 36 Q(See)0 48 Q -(<a href="../html1/ch\215ags.html">ch\215ags\(1\)</a>)0 60 Q -(for information on these names.)0 72 Q 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(If no \215ags are to be set the string)0 12 Q --.74(``)0 24 S(none').74 E(')-.74 E(may be used to o)0 36 Q -.15(ve)-.15 -G(rride the current def).15 E(ault.)-.1 E(<p><dt><b></b><b>gid</b><dd>)0 -48 Q(The \214le group as a numeric v)0 60 Q(alue.)-.25 E -(<p><dt><b></b><b>gname</b><dd>)0 72 Q 0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The \214le group as a symbolic name.)0 12 Q -(<p><dt><b></b><b>ignore</b><dd>)0 24 Q(Ignore an)0 36 Q 2.5<798c>-.15 G -(le hierarch)-2.5 E 2.5(yb)-.05 G(elo)-2.5 E 2.5(wt)-.25 G(his \214le.) --2.5 E(<p><dt><b></b><b>link</b><dd>)0 48 Q(The tar)0 60 Q -(get of the symbolic link when type=link.)-.18 E -(<p><dt><b></b><b>md5</b><dd>)0 72 Q 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The MD5 message digest of the \214le.)0 12 Q -(<p><dt><b></b><b>md5digest</b><dd>)0 24 Q 2.5(As)0 36 S(ynon)-2.5 E -(ym for)-.15 E(<b></b><b>md5</b>.)0 48 Q(<p><dt><b></b><b>mode</b><dd>)0 -60 Q(The current \214le')0 72 Q 2.5(sp)-.55 G -(ermissions as a numeric \(octal\) or symbolic)-2.5 E 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.25(va)0 12 S(lue.).25 E -(<p><dt><b></b><b>nlink</b><dd>)0 24 Q -(The number of hard links the \214le is e)0 36 Q(xpected to ha)-.15 E --.15(ve)-.2 G(.).15 E(<p><dt><b></b><b>nochange</b><dd>)0 48 Q(Mak)0 60 -Q 2.5(es)-.1 G(ure this \214le or directory e)-2.5 E(xists b)-.15 E -(ut otherwise ignore all attrib)-.2 E(utes.)-.2 E -(<p><dt><b></b><b>ripemd160digest</b><dd>)0 72 Q 0 Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q -(<font size="-1"></font><font size="-1">RIPEMD160</font>)0 24 Q -(message digest of the \214le.)0 36 Q(<p><dt><b></b><b>rmd160</b><dd>)0 -48 Q 2.5(As)0 60 S(ynon)-2.5 E(ym for)-.15 E -(<b></b><b>ripemd160digest</b>.)0 72 Q 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>rmd160digest</b><dd>)0 12 Q 2.5 -(As)0 24 S(ynon)-2.5 E(ym for)-.15 E(<b></b><b>ripemd160digest</b>.)0 36 -Q(<p><dt><b></b><b>sha1</b><dd>)0 48 Q(The)0 60 Q -(<font size="-1"></font><font size="-1">FIPS</font>)0 72 Q 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(160-1)0 12 Q(\(`)0 24 Q -(`<font size="-1"></font><font size="-1">SHA-1</font>')-.74 E('\))-.74 E -(message digest of the \214le.)0 36 Q -(<p><dt><b></b><b>sha1digest</b><dd>)0 48 Q 2.5(As)0 60 S(ynon)-2.5 E -(ym for)-.15 E(<b></b><b>sha1</b>.)0 72 Q 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>sha256</b><dd>)0 12 Q(The)0 24 -Q(<font size="-1"></font><font size="-1">FIPS</font>)0 36 Q(180-2)0 48 Q -(\(`)0 60 Q(`<font size="-1"></font><font size="-1">SHA-256</font>')-.74 -E('\))-.74 E(message digest of the \214le.)0 72 Q 0 Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>sha256digest</b><dd>)0 12 Q 2.5 -(As)0 24 S(ynon)-2.5 E(ym for)-.15 E(<b></b><b>sha256</b>.)0 36 Q -(<p><dt><b></b><b>size</b><dd>)0 48 Q -(The size, in bytes, of the \214le.)0 60 Q -(<p><dt><b></b><b>time</b><dd>)0 72 Q 0 Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The last modi\214cation time of the \214le.)0 12 -Q(<p><dt><b></b><b>type</b><dd>)0 24 Q -(The type of the \214le; may be set to an)0 36 Q 2.5(yo)-.15 G -(ne of the follo)-2.5 E(wing:)-.25 E(<p>)36 48 Q(<dl compact>)0 60 Q -(<dt><b></b><b>block</b><dd>)0 72 Q 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(block special de)0 12 Q(vice)-.25 E -(<dt><b></b><b>char</b><dd>)0 24 Q(character special de)0 36 Q(vice)-.25 -E(<dt><b></b><b>dir</b><dd>)0 48 Q(directory)0 60 Q -(<dt><b></b><b>\214fo</b><dd>)0 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214fo)0 12 Q(<dt><b></b><b>\214le</b><dd>)0 24 -Q(re)0 36 Q(gular \214le)-.15 E(<dt><b></b><b>link</b><dd>)0 48 Q -(symbolic link)0 60 Q(<dt><b></b><b>sock)0 72 Q(et</b><dd>)-.1 E 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(sock)0 12 Q(et)-.1 E(</dl>)0 24 Q -(<p><dt><b></b><b>uid</b><dd>)0 36 Q(The \214le o)0 48 Q -(wner as a numeric v)-.25 E(alue.)-.25 E(<p><dt><b></b><b>uname</b><dd>) -0 60 Q(The \214le o)0 72 Q(wner as a symbolic name.)-.25 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p>)36 24 Q(<h3 id="SEE ALSO">)36 -36 Q(SEE ALSO)36 48 Q(</h3>)36 60 Q -(<a href="../html1/cksum.html">cksum\(1\)</a>,)0 72 Q 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<a href="../html1/\214nd.html">\214nd\(1\)</a>,) -0 12 Q(<a href="../html8/mtree.html">mtree\(8\)</a>)0 24 Q(<h3 id="B)36 -36 Q(UGS">)-.1 E -.1(BU)36 48 S(GS).1 E(</h3>)36 60 Q(The)0 72 Q 0 Cg EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(FreeBSD)0 12 Q -(implementation of mtree does not currently support)0 24 Q(the)0 36 Q -(<b>mtree</b>)0 48 Q(2.0)0 60 Q(format.)0 72 Q 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The requirement for a)0 12 Q -.74(``)0 24 S -(#mtree').74 E(')-.74 E(signature line is ne)0 36 Q 2.5(wa)-.25 G -(nd not yet widely implemented.)-2.5 E(<h3 id="HIST)36 48 Q(OR)-.18 E -(Y">)-.65 E(HIST)36 60 Q(OR)-.18 E(Y)-.65 E(</h3>)36 72 Q 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<b>mtree</b>)0 24 Q -(utility appeared in)0 36 Q(4.3BSDReno.)0 48 Q(The)0 60 Q -(<font size="-1"></font><font size="-1">MD5</font>)0 72 Q 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(digest capability w)0 12 Q(as added in)-.1 E -(FreeBSD2.1,)0 24 Q -(in response to the widespread use of programs which can spoof)0 36 Q -(<a href="../html1/cksum.html">cksum\(1\)</a>.)0 48 Q(The)0 60 Q -(<font size="-1"></font><font size="-1">SHA-1</font>)0 72 Q 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q -(<font size="-1"></font><font size="-1">RIPEMD160</font>)0 24 Q -(digests were added in)0 36 Q(FreeBSD4.0,)0 48 Q(as ne)0 60 Q 2.5(wa) --.25 G(ttacks ha)-2.5 E .3 -.15(ve d)-.2 H(emonstrated weaknesses in).15 -E(<font size="-1"></font><font size="-1">MD5</font>.)0 72 Q 0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q -(<font size="-1"></font><font size="-1">SHA-256</font>)0 24 Q(digest w)0 -36 Q(as added in)-.1 E(FreeBSD6.0.)0 48 Q(Support for \214le \215ags w)0 -60 Q(as added in)-.1 E(FreeBSD4.0,)0 72 Q 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and mostly comes from)0 12 Q(NetBSD.)0 24 Q(The) -0 36 Q -.74(``)0 48 S(full').74 E(')-.74 E(entry format w)0 60 Q -(as added by)-.1 E(NetBSD.)0 72 Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</body>)0 12 Q(</html>)0 24 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:32 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">MTREE(5) FreeBSD File Formats Manual +MTREE(5)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>mtree</b> — format of +mtree dir hierarchy files</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">The <b>mtree</b> format is a +textual format that describes a collection of filesystem +objects. Such files are typically used to create or verify +directory hierarchies.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>General +Format</b> <br> +An <b>mtree</b> file consists of a series of lines, each +providing information about a single filesystem object. +Leading whitespace is always ignored.</p> + +<p style="margin-left:8%; margin-top: 1em">When encoding +file or pathnames, any backslash character or character +outside of the 95 printable ASCII characters must be encoded +as a a backslash followed by three octal digits. When +reading mtree files, any appearance of a backslash followed +by three octal digits should be converted into the +corresponding character.</p> + +<p style="margin-left:8%; margin-top: 1em">Each line is +interpreted independently as one of the following types:</p> + +<p style="margin-top: 1em" valign="top">Signature</p> + +<p style="margin-left:26%; margin-top: 1em">The first line +of any mtree file must begin with +‘‘#mtree’’. If a file contains any +full path entries, the first line should begin with +‘‘#mtree v2.0’’, otherwise, the +first line should begin with ‘‘#mtree +v1.0’’.</p> + +<p style="margin-top: 1em" valign="top">Blank</p> + +<p style="margin-left:26%; margin-top: 1em">Blank lines are +ignored.</p> + +<p style="margin-top: 1em" valign="top">Comment</p> + +<p style="margin-left:26%; margin-top: 1em">Lines beginning +with <b>#</b> are ignored.</p> + +<p style="margin-top: 1em" valign="top">Special</p> + +<p style="margin-left:26%; margin-top: 1em">Lines beginning +with <b>/</b> are special commands that influence the +interpretation of later lines.</p> + +<p style="margin-top: 1em" valign="top">Relative</p> + +<p style="margin-left:26%; margin-top: 1em">If the first +whitespace-delimited word has no <b>/</b> characters, it is +the name of a file in the current directory. Any relative +entry that describes a directory changes the current +directory.</p> + +<p style="margin-top: 1em" valign="top">dot-dot</p> + +<p style="margin-left:26%; margin-top: 1em">As a special +case, a relative entry with the filename <i>..</i> changes +the current directory to the parent directory. Options on +dot-dot entries are always ignored.</p> + +<p style="margin-top: 1em" valign="top">Full</p> + +<p style="margin-left:26%; margin-top: 1em">If the first +whitespace-delimited word has a <b>/</b> character after the +first character, it is the pathname of a file relative to +the starting directory. There can be multiple full entries +describing the same file.</p> + +<p style="margin-left:8%; margin-top: 1em">Some tools that +process <b>mtree</b> files may require that multiple lines +describing the same file occur consecutively. It is not +permitted for the same file to be mentioned using both a +relative and a full file specification.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Special +commands</b> <br> +Two special commands are currently defined:</p> + +<p style="margin-top: 1em" valign="top"><b>/set</b></p> + +<p style="margin-left:26%; margin-top: 1em">This command +defines default values for one or more keywords. It is +followed on the same line by one or more +whitespace-separated keyword definitions. These definitions +apply to all following files that do not specify a value for +that keyword.</p> + +<p style="margin-top: 1em" valign="top"><b>/unset</b></p> + +<p style="margin-left:26%; margin-top: 1em">This command +removes any default value set by a previous <b>/set</b> +command. It is followed on the same line by one or more +keywords separated by whitespace.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Keywords</b> +<br> +After the filename, a full or relative entry consists of +zero or more whitespace-separated keyword definitions. Each +such definition consists of a key from the following list +immediately followed by an ’=’ sign and a value. +Software programs reading mtree files should warn about +unrecognized keywords.</p> + +<p style="margin-left:8%; margin-top: 1em">Currently +supported keywords are as follows:</p> + +<p style="margin-top: 1em" valign="top"><b>cksum</b></p> + +<p style="margin-left:26%; margin-top: 1em">The checksum of +the file using the default algorithm specified by the +cksum(1) utility.</p> + + +<p style="margin-top: 1em" valign="top"><b>contents</b></p> + +<p style="margin-left:26%; margin-top: 1em">The full +pathname of a file that holds the contents of this file.</p> + +<p style="margin-top: 1em" valign="top"><b>flags</b></p> + +<p style="margin-left:26%; margin-top: 1em">The file flags +as a symbolic name. See chflags(1) for information on these +names. If no flags are to be set the string +‘‘none’’ may be used to override the +current default.</p> + +<p style="margin-top: 1em" valign="top"><b>gid</b></p> + +<p style="margin-left:26%; margin-top: 1em">The file group +as a numeric value.</p> + +<p style="margin-top: 1em" valign="top"><b>gname</b></p> + +<p style="margin-left:26%; margin-top: 1em">The file group +as a symbolic name.</p> + +<p style="margin-top: 1em" valign="top"><b>ignore</b></p> + +<p style="margin-left:26%; margin-top: 1em">Ignore any file +hierarchy below this file.</p> + +<p style="margin-top: 1em" valign="top"><b>link</b></p> + +<p style="margin-left:26%; margin-top: 1em">The target of +the symbolic link when type=link.</p> + +<p style="margin-top: 1em" valign="top"><b>md5</b></p> + +<p style="margin-left:26%; margin-top: 1em">The MD5 message +digest of the file.</p> + + +<p style="margin-top: 1em" valign="top"><b>md5digest</b></p> + +<p style="margin-left:26%; margin-top: 1em">A synonym for +<b>md5</b>.</p> + +<p style="margin-top: 1em" valign="top"><b>mode</b></p> + +<p style="margin-left:26%; margin-top: 1em">The current +file’s permissions as a numeric (octal) or symbolic +value.</p> + +<p style="margin-top: 1em" valign="top"><b>nlink</b></p> + +<p style="margin-left:26%; margin-top: 1em">The number of +hard links the file is expected to have.</p> + + +<p style="margin-top: 1em" valign="top"><b>nochange</b></p> + +<p style="margin-left:26%; margin-top: 1em">Make sure this +file or directory exists but otherwise ignore all +attributes.</p> + + +<p style="margin-top: 1em" valign="top"><b>ripemd160digest</b></p> + +<p style="margin-left:26%;">The RIPEMD160 message digest of +the file.</p> + +<p style="margin-top: 1em" valign="top"><b>rmd160</b></p> + +<p style="margin-left:26%; margin-top: 1em">A synonym for +<b>ripemd160digest</b>.</p> + + +<p style="margin-top: 1em" valign="top"><b>rmd160digest</b></p> + +<p style="margin-left:26%;">A synonym for +<b>ripemd160digest</b>.</p> + +<p style="margin-top: 1em" valign="top"><b>sha1</b></p> + +<p style="margin-left:26%; margin-top: 1em">The FIPS 160-1 +(‘‘SHA-1’’) message digest of the +file.</p> + + +<p style="margin-top: 1em" valign="top"><b>sha1digest</b></p> + +<p style="margin-left:26%; margin-top: 1em">A synonym for +<b>sha1</b>.</p> + +<p style="margin-top: 1em" valign="top"><b>sha256</b></p> + +<p style="margin-left:26%; margin-top: 1em">The FIPS 180-2 +(‘‘SHA-256’’) message digest of the +file.</p> + + +<p style="margin-top: 1em" valign="top"><b>sha256digest</b></p> + +<p style="margin-left:26%;">A synonym for +<b>sha256</b>.</p> + +<p style="margin-top: 1em" valign="top"><b>size</b></p> + +<p style="margin-left:26%; margin-top: 1em">The size, in +bytes, of the file.</p> + +<p style="margin-top: 1em" valign="top"><b>time</b></p> + +<p style="margin-left:26%; margin-top: 1em">The last +modification time of the file.</p> + +<p style="margin-top: 1em" valign="top"><b>type</b></p> + +<p style="margin-left:26%; margin-top: 1em">The type of the +file; may be set to any one of the following:</p> + +<p style="margin-top: 1em" valign="top"><b>block</b></p> + +<p style="margin-left:45%; margin-top: 1em">block special +device</p> + +<p valign="top"><b>char</b></p> + +<p style="margin-left:45%; margin-top: 1em">character +special device</p> + +<p valign="top"><b>dir</b></p> + +<p style="margin-left:45%; margin-top: 1em">directory</p> + +<p valign="top"><b>fifo</b></p> + +<p style="margin-left:45%; margin-top: 1em">fifo</p> + +<p valign="top"><b>file</b></p> + +<p style="margin-left:45%; margin-top: 1em">regular +file</p> + +<p valign="top"><b>link</b></p> + +<p style="margin-left:45%; margin-top: 1em">symbolic +link</p> + +<p valign="top"><b>socket</b></p> + +<p style="margin-left:45%; margin-top: 1em">socket</p> + +<p style="margin-top: 1em" valign="top"><b>uid</b></p> + +<p style="margin-left:26%; margin-top: 1em">The file owner +as a numeric value.</p> + +<p style="margin-top: 1em" valign="top"><b>uname</b></p> + +<p style="margin-left:26%; margin-top: 1em">The file owner +as a symbolic name.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">cksum(1), find(1), mtree(8)</p> + +<p style="margin-top: 1em" valign="top"><b>BUGS</b></p> + +<p style="margin-left:8%;">The FreeBSD implementation of +mtree does not currently support the <b>mtree</b> 2.0 +format. The requirement for a +‘‘#mtree’’ signature line is new and +not yet widely implemented.</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">The <b>mtree</b> utility +appeared in 4.3BSD−Reno. The MD5 digest capability was +added in FreeBSD 2.1, in response to the widespread use +of programs which can spoof cksum(1). The SHA-1 and +RIPEMD160 digests were added in FreeBSD 4.0, as new +attacks have demonstrated weaknesses in MD5. The SHA-256 +digest was added in FreeBSD 6.0. Support for file flags +was added in FreeBSD 4.0, and mostly comes from NetBSD. +The ‘‘full’’ entry format was added +by NetBSD.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +August 20, 2007 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/html/tar.5.html b/archivers/libarchive/files/doc/html/tar.5.html index 3e243eb9e1c..ee16a228c39 100644 --- a/archivers/libarchive/files/doc/html/tar.5.html +++ b/archivers/libarchive/files/doc/html/tar.5.html @@ -1,1657 +1,1400 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:17 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 146 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(December 27, 2009 tar 5)74.5 48 Q(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>tar</b>)0 48 Q 2.5(-f)0 60 S -(ormat of tape archi)-2.5 E .3 -.15(ve \214)-.25 H(les).15 E -(<h3 id="DESCRIPTION">)36 72 Q 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(The)0 36 Q -(<b>tar</b>)0 48 Q(archi)0 60 Q .3 -.15(ve f)-.25 H(ormat collects an) -.15 E 2.5(yn)-.15 G(umber of \214les, directories, and other)-2.5 E -(\214le system objects \(symbolic links, de)0 72 Q -(vice nodes, etc.\) into a single)-.25 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(stream of bytes.)0 12 Q(The format w)0 24 Q -(as originally designed to be used with)-.1 E(tape dri)0 36 Q -.15(ve) --.25 G 2.5(st).15 G(hat operate with \214x)-2.5 E(ed-size blocks, b)-.15 -E(ut is widely used as)-.2 E 2.5(ag)0 48 S(eneral packaging mechanism.) --2.5 E(<h4 id="General F)36 60 Q(ormat">)-.15 E(General F)36 72 Q(ormat) --.15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(A)0 24 Q(<b>tar</b>)0 36 Q(archi)0 -48 Q .3 -.15(ve c)-.25 H(onsists of a series of 512-byte records.).15 E -(Each \214le system object requires a header record which stores basic \ -metadata)0 60 Q(\(pathname, o)0 72 Q(wner)-.25 E 2.5(,p)-.4 G -(ermissions, etc.\) and zero or more records containing an)-2.5 E(y)-.15 -E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214le data.)0 12 Q(The end of the archi)0 24 Q -.3 -.15(ve i)-.25 H 2.5(si).15 G(ndicated by tw)-2.5 E 2.5(or)-.1 G -(ecords consisting)-2.5 E(entirely of zero bytes.)0 36 Q(<p>)36 48 Q --.15(Fo)0 60 S 2.5(rc).15 G(ompatibility with tape dri)-2.5 E -.15(ve) --.25 G 2.5(st).15 G(hat use \214x)-2.5 E(ed block sizes,)-.15 E -(programs that read or write tar \214les al)0 72 Q -.1(wa)-.1 G -(ys read or write a \214x).1 E(ed)-.15 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(number of records with each I/O operation.)0 12 -Q(These)0 24 Q -.74(``)0 36 S(blocks').74 E(')-.74 E(are al)0 48 Q -.1 -(wa)-.1 G(ys a multiple of the record size.).1 E -(The maximum block size supported by early)0 60 Q(implementations w)0 72 -Q(as 10240 bytes or 20 records.)-.1 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This is still the def)0 12 Q -(ault for most implementations)-.1 E -(although block sizes of 1MiB \(2048 records\) or lar)0 24 Q(ger are) --.18 E(commonly used with modern high-speed tape dri)0 36 Q -.15(ve)-.25 -G(s.).15 E(\(Note: the terms)0 48 Q -.74(``)0 60 S(block').74 E(')-.74 E -(and)0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(record').74 E(')-.74 E -(here are not entirely standard; this document follo)0 24 Q(ws the)-.25 -E(con)0 36 Q -.15(ve)-.4 G -(ntion established by John Gilmore in documenting).15 E(<b>pdtar</b>.\)) -0 48 Q(<h4 id="Old-Style Archi)36 60 Q .3 -.15(ve Fo)-.25 H(rmat">).15 E -(Old-Style Archi)36 72 Q .3 -.15(ve Fo)-.25 H(rmat).15 E 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(The original tar archi)0 24 Q .3 --.15(ve f)-.25 H(ormat has been e).15 E(xtended man)-.15 E 2.5(yt)-.15 G -(imes to)-2.5 E(include additional information that v)0 36 Q -(arious implementors found)-.25 E(necessary)0 48 Q(.)-.65 E -(This section describes the v)0 60 Q -(ariant implemented by the tar command)-.25 E(included in)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.11(Ve)0 12 S(rsion 7 <code>A)1.11 E -(T&T UNIX</code>,)-1.11 E(which seems to be the earliest widely-used v)0 -24 Q(ersion of the tar program.)-.15 E(<p>)36 36 Q -(The header record for an old-style)0 48 Q(<b>tar</b>)0 60 Q(archi)0 72 -Q .3 -.15(ve c)-.25 H(onsists of the follo).15 E(wing:)-.25 E 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>) -0 36 Q(struct header_old_tar {)0 48 Q(char name[100];)36 60 Q -(char mode[8];)36 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char uid[8];)36 12 Q(char gid[8];)36 24 Q -(char size[12];)36 36 Q(char mtime[12];)36 48 Q(char checksum[8];)36 60 -Q(char link\215ag[1];)36 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char linkname[100];)36 12 Q(char pad[255];)36 24 -Q(};)0 36 Q(</pre>)0 48 Q(</code>)0 60 Q(</dl>)0 72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(All unused bytes in the header record are \214lled with nulls.)0 12 Q -(<dl compact>)0 24 Q(<p><dt><i></i><i>name</i><dd>)0 36 Q -.15(Pa)0 48 S -(thname, stored as a null-terminated string.).15 E -(Early tar implementations only stored re)0 60 Q -(gular \214les \(including)-.15 E(hardlinks to those \214les\).)0 72 Q 0 -Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(One common early con)0 12 Q -.15(ve)-.4 G -(ntion used a trailing "/" character to indicate).15 E 2.5(ad)0 24 S -(irectory name, allo)-2.5 E(wing directory permissions and o)-.25 E -(wner information)-.25 E(to be archi)0 36 Q -.15(ve)-.25 G 2.5(da).15 G -(nd restored.)-2.5 E(<p><dt><i></i><i>mode</i><dd>)0 48 Q -(File mode, stored as an octal number in ASCII.)0 60 Q -(<p><dt><i></i><i>uid</i><i></i>,<i> gid</i><dd>)0 72 Q 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(User id and group id of o)0 12 Q(wner)-.25 E 2.5 -(,a)-.4 G 2.5(so)-2.5 G(ctal numbers in ASCII.)-2.5 E -(<p><dt><i></i><i>size</i><dd>)0 24 Q -(Size of \214le, as octal number in ASCII.)0 36 Q -.15(Fo)0 48 S 2.5(rr) -.15 G -.15(eg)-2.5 G(ular \214les only).15 E 2.5(,t)-.65 G -(his indicates the amount of data)-2.5 E(that follo)0 60 Q -(ws the header)-.25 E(.)-.55 E(In particular)0 72 Q 2.5(,t)-.4 G -(his \214eld w)-2.5 E(as ignored by early tar implementations)-.1 E 0 Cg -EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(when e)0 12 Q(xtracting hardlinks.)-.15 E -(Modern writers should al)0 24 Q -.1(wa)-.1 G -(ys store a zero length for hardlink entries.).1 E -(<p><dt><i></i><i>mtime</i><dd>)0 36 Q -(Modi\214cation time of \214le, as an octal number in ASCII.)0 48 Q -(This indicates the number of seconds since the start of the epoch,)0 60 -Q(00:00:00 UTC January 1, 1970.)0 72 Q 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that ne)0 12 Q -.05(ga)-.15 G(ti).05 E .3 --.15(ve v)-.25 H(alues should be a)-.1 E -.2(vo)-.2 G(ided).2 E -(here, as the)0 24 Q 2.5(ya)-.15 G(re handled inconsistently)-2.5 E(.) --.65 E(<p><dt><i></i><i>checksum</i><dd>)0 36 Q -(Header checksum, stored as an octal number in ASCII.)0 48 Q 1.6 -.8 -(To c)0 60 T -(ompute the checksum, set the checksum \214eld to all spaces,).8 E -(then sum all bytes in the header using unsigned arithmetic.)0 72 Q 0 Cg -EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(This \214eld should be stored as six octal digits follo)0 12 Q -(wed by a null and a space)-.25 E(character)0 24 Q(.)-.55 E -(Note that man)0 36 Q 2.5(ye)-.15 G -(arly implementations of tar used signed arithmetic)-2.5 E -(for the checksum \214eld, which can cause interoperability problems)0 -48 Q(when transferring archi)0 60 Q -.15(ve)-.25 G 2.5(sb).15 G -(etween systems.)-2.5 E(Modern rob)0 72 Q -(ust readers compute the checksum both w)-.2 E(ays and accept the)-.1 E -0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(header if either computation matches.)0 12 Q -(<p><dt><i></i><i>link\215ag</i><i></i>,<i> linkname</i><dd>)0 24 Q -(In order to preserv)0 36 Q 2.5(eh)-.15 G(ardlinks and conserv)-2.5 E -2.5(et)-.15 G(ape, a \214le)-2.5 E -(with multiple links is only written to the archi)0 48 Q .3 -.15(ve t) --.25 H(he \214rst).15 E(time it is encountered.)0 60 Q(The ne)0 72 Q -(xt time it is encountered, the)-.15 E 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>link\215ag</i>)0 12 Q -(is set to an ASCII)0 24 Q(`1')0 36 Q(and the)0 48 Q -(<i></i><i>linkname</i>)0 60 Q -(\214eld holds the \214rst name under which this \214le appears.)0 72 Q -0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(Note that re)0 12 Q(gular \214les ha)-.15 E .3 --.15(ve a n)-.2 H(ull v).15 E(alue in the)-.25 E -(<i></i><i>link\215ag</i>)0 24 Q(\214eld.\))0 36 Q(</dl>)0 48 Q(<p>)36 -60 Q(Early tar implementations v)0 72 Q(aried in ho)-.25 E 2.5(wt)-.25 G -(he)-2.5 E 2.5(yt)-.15 G(erminated these \214elds.)-2.5 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The tar command in)0 12 Q -1.11(Ve)0 24 S -(rsion 7 <code>A)1.11 E(T&T UNIX</code>)-1.11 E(used the follo)0 36 Q -(wing con)-.25 E -.15(ve)-.4 G -(ntions \(this is also documented in early BSD manpages\):).15 E -(the pathname must be null-terminated;)0 48 Q -(the mode, uid, and gid \214elds must end in a space and a null byte;)0 -60 Q(the size and mtime \214elds must end in a space;)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(the checksum is terminated by a null and a space.)0 12 Q(Early impleme\ -ntations \214lled the numeric \214elds with leading spaces.)0 24 Q -(This seems to ha)0 36 Q .3 -.15(ve b)-.2 H -(een common practice until the).15 E(IEEE Std 1003.1-1988 \(`)2.5 48 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(standard w)0 60 Q -(as released.)-.1 E -.15(Fo)0 72 S 2.5(rb).15 G(est portability)-2.5 E -2.5(,m)-.65 G(odern implementations should \214ll the numeric)-2.5 E 0 -Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214elds with leading zeros.)0 12 Q -(<h4 id="Pre-POSIX Archi)36 24 Q -.15(ve)-.25 G(s">).15 E -(Pre-POSIX Archi)36 36 Q -.15(ve)-.25 G(s).15 E(</h4>)36 48 Q -(An early draft of)0 60 Q(IEEE Std 1003.1-1988 \(`)2.5 72 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(serv)0 12 Q(ed as the basis for John Gilmore') --.15 E(s)-.55 E(<b>pdtar</b>)0 24 Q(program and man)0 36 Q 2.5(ys)-.15 G -(ystem implementations from the late 1980s)-2.5 E(and early 1990s.)0 48 -Q(These archi)0 60 Q -.15(ve)-.25 G 2.5(sg).15 G(enerally follo)-2.5 E -2.5(wt)-.25 G(he POSIX ustar)-2.5 E(format described belo)0 72 Q 2.5(ww) --.25 G(ith the follo)-2.5 E(wing v)-.25 E(ariations:)-.25 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<ul>)0 12 Q(<li>)0 24 Q(The magic v)0 36 Q -(alue is)-.25 E -.74(``)0 48 S(ustar ').74 E(')-.74 E(\(note the follo)0 -60 Q(wing space\).)-.25 E(The v)0 72 Q -(ersion \214eld contains a space character follo)-.15 E(wed by a null.) --.25 E 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q -(The numeric \214elds are generally \214lled with leading spaces)0 24 Q -(\(not leading zeros as recommended in the \214nal standard\).)0 36 Q -(<li>)0 48 Q -(The pre\214x \214eld is often not used, limiting pathnames to)0 60 Q -(the 100 characters of old-style archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0 -Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</ul>)0 12 Q(<h4 id="POSIX ustar Archi)36 24 Q --.15(ve)-.25 G(s">).15 E(POSIX ustar Archi)36 36 Q -.15(ve)-.25 G(s).15 -E(</h4>)36 48 Q(IEEE Std 1003.1-1988 \(`)2.5 60 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E -(de\214ned a standard tar \214le format to be read and written)0 72 Q 0 -Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(by compliant implementations of)0 12 Q -(<a href="../html1/tar)0 24 Q(.html">tar\(1\)</a>.)-.55 E -(This format is often called the)0 36 Q -.74(``)0 48 S(ustar').74 E(') --.74 E(format, after the magic v)0 60 Q(alue used)-.25 E(in the header)0 -72 Q(.)-.55 E 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(The name is an acron)0 12 Q(ym for)-.15 E -.74 -(``)0 24 S(Unix Standard T).74 E(AR')-.93 E('.\))-.74 E(It e)0 36 Q -(xtends the historic format with ne)-.15 E 2.5<778c>-.25 G(elds:)-2.5 E -(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct header_posix_ustar {)0 12 Q -(char name[100];)36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q -(char gid[8];)36 60 Q(char size[12];)36 72 Q 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24 -Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q -(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q -(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E -(char pre\214x[155];)36 60 Q(char pad[12];)36 72 Q 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(};)0 12 Q(</pre>)0 24 Q(</code>)0 36 Q(</dl>)0 -48 Q(<dl compact>)0 60 Q(<p><dt><i></i><i>type\215ag</i><dd>)0 72 Q 0 Cg -EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.8(Ty)0 12 S(pe of entry).8 E(.)-.65 E(POSIX e) -0 24 Q(xtended the earlier)-.15 E(<i></i><i>link\215ag</i>)0 36 Q -(\214eld with se)0 48 Q -.15(ve)-.25 G(ral ne).15 E 2.5(wt)-.25 G(ype v) --2.5 E(alues:)-.25 E(<dl compact>)0 60 Q(<dt>`)0 72 Q(`0')-.74 E('<dd>) --.74 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Re)0 12 Q(gular \214le.)-.15 E -(NUL should be treated as a synon)0 24 Q -(ym, for compatibility purposes.)-.15 E(<dt>`)0 36 Q(`1')-.74 E('<dd>) --.74 E(Hard link.)0 48 Q(<dt>`)0 60 Q(`2')-.74 E('<dd>)-.74 E -(Symbolic link.)0 72 Q 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt>`)0 12 Q(`3')-.74 E('<dd>)-.74 E -(Character de)0 24 Q(vice node.)-.25 E(<dt>`)0 36 Q(`4')-.74 E('<dd>) --.74 E(Block de)0 48 Q(vice node.)-.25 E(<dt>`)0 60 Q(`5')-.74 E('<dd>) --.74 E(Directory)0 72 Q(.)-.65 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt>`)0 12 Q(`6')-.74 E('<dd>)-.74 E(FIFO node.) -0 24 Q(<dt>`)0 36 Q(`7')-.74 E('<dd>)-.74 E(Reserv)0 48 Q(ed.)-.15 E -(<dt>Other<dd>)0 60 Q 2.5(AP)0 72 S -(OSIX-compliant implementation must treat an)-2.5 E 2.5(yu)-.15 G -(nrecognized type\215ag v)-2.5 E(alue)-.25 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(as a re)0 12 Q(gular \214le.)-.15 E -(In particular)0 24 Q 2.5(,w)-.4 G -(riters should ensure that all entries)-2.5 E(ha)0 36 Q .3 -.15(ve a v) --.2 H(alid \214lename so that the)-.1 E 2.5(yc)-.15 G -(an be restored by readers that do not)-2.5 E -(support the corresponding e)0 48 Q(xtension.)-.15 E -(Uppercase letters "A" through "Z" are reserv)0 60 Q(ed for custom e) --.15 E(xtensions.)-.15 E(Note that sock)0 72 Q -(ets and whiteout entries are not archi)-.1 E -.25(va)-.25 G(ble.).25 E -0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(It is w)0 24 Q -(orth noting that the)-.1 E(<i></i><i>size</i>)0 36 Q -(\214eld, in particular)0 48 Q 2.5(,h)-.4 G(as dif)-2.5 E -(ferent meanings depending on the type.)-.25 E -.15(Fo)0 60 S 2.5(rr).15 -G -.15(eg)-2.5 G -(ular \214les, of course, it indicates the amount of data).15 E(follo)0 -72 Q(wing the header)-.25 E(.)-.55 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(Fo)0 12 S 2.5(rd).15 G -(irectories, it may be used to indicate the total size of all)-2.5 E -(\214les in the directory)0 24 Q 2.5(,f)-.65 G -(or use by operating systems that pre-allocate)-2.5 E(directory space.)0 -36 Q -.15(Fo)0 48 S 2.5(ra).15 G -(ll other types, it should be set to zero by writers and ignored)-2.5 E -(by readers.)0 60 Q(<p><dt><i></i><i>magic</i><dd>)0 72 Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Contains the magic v)0 12 Q(alue)-.25 E -.74(``) -0 24 S(ustar').74 E(')-.74 E(follo)0 36 Q -(wed by a NUL byte to indicate that this is a POSIX standard archi)-.25 -E -.15(ve)-.25 G(.).15 E -(Full compliance requires the uname and gname \214elds be properly set.) -0 48 Q(<p><dt><i></i><i>v)0 60 Q(ersion</i><dd>)-.15 E -1.11(Ve)0 72 S -(rsion.)1.11 E 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This should be)0 12 Q -.74(``)0 24 S(00').74 E -(')-.74 E(\(tw)0 36 Q 2.5(oc)-.1 G -(opies of the ASCII digit zero\) for POSIX standard archi)-2.5 E -.15 -(ve)-.25 G(s.).15 E(<p><dt><i></i><i>uname</i><i></i>,<i> gname</i><dd>) -0 48 Q(User and group names, as null-terminated ASCII strings.)0 60 Q -(These should be used in preference to the uid/gid v)0 72 Q(alues)-.25 E -0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(when the)0 12 Q 2.5(ya)-.15 G -(re set and the corresponding names e)-2.5 E(xist on)-.15 E(the system.) -0 24 Q(<p><dt><i></i><i>de)0 36 Q(vmajor</i><i></i>,<i> de)-.25 E -(vminor</i><dd>)-.25 E(Major and minor numbers for character de)0 48 Q -(vice or block de)-.25 E(vice entry)-.25 E(.)-.65 E -(<p><dt><i></i><i>name</i><i></i>,<i> pre\214x</i><dd>)0 60 Q -(If the pathname is too long to \214t in the 100 bytes pro)0 72 Q -(vided by the standard)-.15 E 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(format, it can be split at an)0 12 Q(y)-.15 E -(<code></code><code>/</code>)0 24 Q -(character with the \214rst portion going into the pre\214x \214eld.)0 -36 Q(If the pre\214x \214eld is not empty)0 48 Q 2.5(,t)-.65 G -(he reader will prepend)-2.5 E(the pre\214x v)0 60 Q(alue and a)-.25 E -(<code></code><code>/</code>)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(character to the re)0 12 Q -(gular name \214eld to obtain the full pathname.)-.15 E -(The standard does not require a trailing)0 24 Q -(<code></code><code>/</code>)0 36 Q -(character on directory names, though most implementations still)0 48 Q -(include this for compatibility reasons.)0 60 Q(</dl>)0 72 Q 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -(Note that all unused bytes must be set to)0 24 Q -(<code></code><code>NUL</code>.)0 36 Q(<p>)36 48 Q -(Field termination is speci\214ed slightly dif)0 60 Q(ferently by POSIX) --.25 E(than by pre)0 72 Q(vious implementations.)-.25 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<i></i><i>magic</i>,)0 24 Q -(<i></i><i>uname</i>,)0 36 Q(and)0 48 Q(<i></i><i>gname</i>)0 60 Q -(\214elds must ha)0 72 Q .3 -.15(ve a t)-.2 H(railing).15 E 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>NUL</code>.)0 12 Q(The)0 24 Q -(<i></i><i>pathname</i>,)0 36 Q(<i></i><i>linkname</i>,)0 48 Q(and)0 60 -Q(<i></i><i>pre\214x</i>)0 72 Q 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214elds must ha)0 12 Q .3 -.15(ve a t)-.2 H -(railing).15 E(<code></code><code>NUL</code>)0 24 Q(unless the)0 36 Q -2.5<798c>-.15 G(ll the entire \214eld.)-2.5 E(\(In particular)0 48 Q 2.5 -(,i)-.4 G 2.5(ti)-2.5 G 2.5(sp)-2.5 G -(ossible to store a 256-character pathname if it)-2.5 E(happens to ha)0 -60 Q .3 -.15(ve a)-.2 H(<code></code><code>/</code>)0 72 Q 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(as the 156th character)0 12 Q(.\))-.55 E(POSIX \ -requires numeric \214elds to be zero-padded in the front, and requires)0 -24 Q(them to be terminated with either space or)0 36 Q -(<code></code><code>NUL</code>)0 48 Q(characters.)0 60 Q(<p>)36 72 Q 0 -Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Currently)0 12 Q 2.5(,m)-.65 G -(ost tar implementations comply with the ustar)-2.5 E -(format, occasionally e)0 24 Q(xtending it by adding ne)-.15 E 2.5<778c> --.25 G(elds to the)-2.5 E(blank area at the end of the header record.)0 -36 Q(<h4 id="P)36 48 Q(ax Interchange F)-.15 E(ormat">)-.15 E -.15(Pa)36 -60 S 2.5(xI).15 G(nterchange F)-2.5 E(ormat)-.15 E(</h4>)36 72 Q 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(There are man)0 12 Q 2.5(ya)-.15 G(ttrib)-2.5 E -(utes that cannot be portably stored in a)-.2 E(POSIX ustar archi)0 24 Q --.15(ve)-.25 G(.).15 E(IEEE Std 1003.1-2001 \(`)2.5 36 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(de\214ned a)0 48 Q --.74(``)0 60 S(pax interchange format').74 E(')-.74 E(that uses tw)0 72 -Q 2.5(on)-.1 G .5 -.25(ew t)-2.5 H(ypes of entries to hold te).25 E -(xt-formatted)-.15 E 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(metadata that applies to follo)0 12 Q -(wing entries.)-.25 E(Note that a pax interchange format archi)0 24 Q .3 --.15(ve i)-.25 H 2.5(sau).15 G(star archi)-2.5 E .3 -.15(ve i)-.25 H 2.5 -(ne).15 G -.15(ve)-2.75 G(ry).15 E(respect.)0 36 Q(The ne)0 48 Q 2.5(wd) --.25 G(ata is stored in ustar)-2.5 E(-compatible archi)-.2 E .3 -.15 -(ve e)-.25 H(ntries that use the).15 E -.74(``)0 60 S(x').74 E(')-.74 E -(or)0 72 Q 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(g').74 E(')-.74 E(type\215ag.)0 -24 Q(In particular)0 36 Q 2.5(,o)-.4 G -(lder implementations that do not fully support these)-2.5 E -.15(ex)0 -48 S(tensions will e).15 E(xtract the metadata into re)-.15 E -(gular \214les, where the)-.15 E(metadata can be e)0 60 Q -(xamined as necessary)-.15 E(.)-.65 E(<p>)36 72 Q 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(An entry in a pax interchange format archi)0 12 -Q .3 -.15(ve c)-.25 H(onsists of one or).15 E(tw)0 24 Q 2.5(os)-.1 G -(tandard ustar entries, each with its o)-2.5 E(wn header and data.)-.25 -E(The \214rst optional entry stores the e)0 36 Q(xtended attrib)-.15 E -(utes)-.2 E(for the follo)0 48 Q(wing entry)-.25 E(.)-.65 E(This option\ -al \214rst entry has an "x" type\215ag and a size \214eld that)0 60 Q -(indicates the total size of the e)0 72 Q(xtended attrib)-.15 E(utes.) --.2 E 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The e)0 12 Q(xtended attrib)-.15 E -(utes themselv)-.2 E(es are stored as a series of te)-.15 E(xt-format) --.15 E(lines encoded in the portable UTF-8 encoding.)0 24 Q -(Each line consists of a decimal number)0 36 Q 2.5(,as)-.4 G(pace, a k) --2.5 E .3 -.15(ey s)-.1 H(tring, an equals).15 E(sign, a v)0 48 Q -(alue string, and a ne)-.25 E 2.5(wl)-.25 G(ine.)-2.5 E(The decimal num\ -ber indicates the length of the entire line, including the)0 60 Q -(initial length \214eld and the trailing ne)0 72 Q(wline.)-.25 E 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(An e)0 12 Q(xample of such a \214eld is:)-.15 E -(<br>)0 24 Q( )0 36 Q -(<code></code><code>25</code><code> ctime=1084839148.1212\\n</code>)0 48 -Q(<br>)0 60 Q -2.15 -.25(Ke y)0 72 T 2.5(si).25 G 2.5(na)-2.5 G(ll lo) --2.5 E(wercase are standard k)-.25 E -.15(ey)-.1 G(s.).15 E 0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.11(Ve)0 12 S(ndors can add their o)1.11 E -(wn k)-.25 E -.15(ey)-.1 G 2.5(sb).15 G 2.5(yp)-2.5 G -(re\214xing them with an all uppercase)-2.5 E -.15(ve)0 24 S -(ndor name and a period.).15 E(Note that, unlik)0 36 Q 2.5(et)-.1 G -(he historic header)-2.5 E 2.5(,n)-.4 G(umeric v)-2.5 E -(alues are stored using)-.25 E(decimal, not octal.)0 48 Q 2.5(Ad)0 60 S -(escription of some common k)-2.5 E -.15(ey)-.1 G 2.5(sf).15 G(ollo)-2.5 -E(ws:)-.25 E(<dl compact>)0 72 Q 0 Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>atime</b><b></b>,<b> ctime</b>\ -<b></b>,<b> mtime</b><dd>)0 12 Q -(File access, inode change, and modi\214cation times.)0 24 Q -(These \214elds can be ne)0 36 Q -.05(ga)-.15 G(ti).05 E .3 -.15(ve o) --.25 H 2.5(ri).15 G(nclude a decimal point and a fractional v)-2.5 E -(alue.)-.25 E(<p><dt><b></b><b>uname</b><b></b>,<b> uid</b><b></b>,<b> \ -gname</b><b></b>,<b> gid</b><dd>)0 48 Q -(User name, group name, and numeric UID and GID v)0 60 Q(alues.)-.25 E -(The user name and group name stored here are encoded in UTF8)0 72 Q 0 -Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and can thus include non-ASCII characters.)0 12 -Q(The UID and GID \214elds can be of arbitrary length.)0 24 Q -(<p><dt><b></b><b>linkpath</b><dd>)0 36 Q(The full path of the link)0 48 -Q(ed-to \214le.)-.1 E(Note that this is encoded in UTF8 and can thus in\ -clude non-ASCII characters.)0 60 Q(<p><dt><b></b><b>path</b><dd>)0 72 Q -0 Cg EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The full pathname of the entry)0 12 Q(.)-.65 E(\ -Note that this is encoded in UTF8 and can thus include non-ASCII charac\ -ters.)0 24 Q(<p><dt><b></b><b>realtime.*</b><b></b>,<b> security)0 36 Q -(.*</b><dd>)-.65 E(These k)0 48 Q -.15(ey)-.1 G 2.5(sa).15 G(re reserv) --2.5 E(ed and may be used for future standardization.)-.15 E -(<p><dt><b></b><b>size</b><dd>)0 60 Q(The size of the \214le.)0 72 Q 0 -Cg EP -%%Page: 67 67 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Note that there is no length limit on this \214eld, allo)0 12 Q -(wing conforming)-.25 E(archi)0 24 Q -.15(ve)-.25 G 2.5(st).15 G 2.5(os) --2.5 G(tore \214les much lar)-2.5 E(ger than the historic 8GB limit.) --.18 E(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(*</b><dd>)1.29 E --1.11(Ve)0 48 S(ndor)1.11 E(-speci\214c attrib)-.2 E(utes used by Joer) --.2 E 2.5(gS)-.18 G(chilling')-2.5 E(s)-.55 E(<b>star</b>)0 60 Q -(implementation.)0 72 Q 0 Cg EP -%%Page: 68 68 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G -(acl.access</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(acl.def)1.29 E -(ault</b><dd>)-.1 E(Stores the access and def)0 24 Q(ault A)-.1 E -(CLs as te)-.4 E(xtual strings in a format)-.15 E(that is an e)0 36 Q -(xtension of the format speci\214ed by POSIX.1e draft 17.)-.15 E -(In particular)0 48 Q 2.5(,e)-.4 G -(ach user or group access speci\214cation can include a fourth)-2.5 E -(colon-separated \214eld with the numeric UID or GID.)0 60 Q(This allo)0 -72 Q(ws A)-.25 E(CLs to be restored on systems that may not ha)-.4 E .3 --.15(ve c)-.2 H(omplete).15 E 0 Cg EP -%%Page: 69 69 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(user or group information a)0 12 Q -.25(va)-.2 G -(ilable \(such as when NIS/YP or LD).25 E(AP services)-.4 E -(are temporarily una)0 24 Q -.25(va)-.2 G(ilable\).).25 E -(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(de)1.29 E -(vminor</b><b></b>,<b> SCHIL)-.25 E -1.29(Y.)-1 G(de)1.29 E -(vmajor</b><dd>)-.25 E(The full minor and major numbers for de)0 48 Q -(vice nodes.)-.25 E(<p><dt><b></b><b>SCHIL)0 60 Q -1.29(Y.)-1 G -.25 -<668d>1.29 G(ags</b><dd>).25 E(The \214le \215ags.)0 72 Q 0 Cg EP -%%Page: 70 70 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G -(realsize</b><dd>)1.29 E(The full size of the \214le on disk.)0 24 Q -(XXX e)0 36 Q(xplain? XXX)-.15 E(<p><dt><b></b><b>SCHIL)0 48 Q -1.29(Y.) --1 G(de)1.29 E -.65(v,)-.25 G(</b><b></b><b> SCHIL).65 E -1.29(Y.)-1 G -(ino</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(nlinks</b><dd>)1.29 E -(The de)0 60 Q(vice number)-.25 E 2.5(,i)-.4 G(node number)-2.5 E 2.5 -(,a)-.4 G(nd link count for the entry)-2.5 E(.)-.65 E(In particular)0 72 -Q 2.5(,n)-.4 G(ote that a pax interchange format archi)-2.5 E .3 -.15 -(ve u)-.25 H(sing Joer).15 E(g)-.18 E 0 Cg EP -%%Page: 71 71 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Schilling')0 12 Q(s)-.55 E(<b></b><b>SCHIL)0 24 -Q -1.29(Y.)-1 G(*</b>)1.29 E -.15(ex)0 36 S -(tensions can store all of the data from).15 E -(<i></i><i>struct</i><i> stat</i>.)0 48 Q(<p><dt><b></b><b>LIB)0 60 Q -(ARCHIVE.xattr)-.35 E(.</b><i></i><i>namespace</i><i></i>.<i>k)-.55 E --.15(ey)-.1 G(</i><dd>).15 E(Libarchi)0 72 Q .3 -.15(ve s)-.25 H -(tores POSIX.1e-style e).15 E(xtended attrib)-.15 E(utes using)-.2 E 0 -Cg EP -%%Page: 72 72 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.1(ke)0 12 S(ys of this form.)-.05 E(The)0 24 Q -(<i></i><i>k)0 36 Q -.15(ey)-.1 G(</i>).15 E -.25(va)0 48 S -(lue is URL-encoded:).25 E(All non-ASCII characters and the tw)0 60 Q -2.5(os)-.1 G(pecial characters)-2.5 E -.74(``)0 72 S(=').74 E(')-.74 E 0 -Cg EP -%%Page: 73 73 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q -.74(``)0 24 S(%').74 E(')-.74 E -(are encoded as)0 36 Q -.74(``)0 48 S(%').74 E(')-.74 E(follo)0 60 Q -(wed by tw)-.25 E 2.5(ou)-.1 G(ppercase he)-2.5 E(xadecimal digits.)-.15 -E(The v)0 72 Q(alue of this k)-.25 E .3 -.15(ey i)-.1 H 2.5(st).15 G -(he e)-2.5 E(xtended attrib)-.15 E(ute v)-.2 E(alue)-.25 E 0 Cg EP -%%Page: 74 74 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(encoded in base 64.)0 12 Q -(XXX Detail the base-64 format here XXX)0 24 Q -(<p><dt><b></b><b>VENDOR.*</b><dd>)0 36 Q(XXX document other v)0 48 Q -(endor)-.15 E(-speci\214c e)-.2 E(xtensions XXX)-.15 E(</dl>)0 60 Q(<p>) -36 72 Q 0 Cg EP -%%Page: 75 75 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(An)0 12 Q 2.5(yv)-.15 G(alues stored in an e) --2.75 E(xtended attrib)-.15 E(ute o)-.2 E -.15(ve)-.15 G -(rride the corresponding).15 E -.25(va)0 24 S(lues in the re).25 E -(gular tar header)-.15 E(.)-.55 E -(Note that compliant readers should ignore the re)0 36 Q -(gular \214elds when the)-.15 E(y)-.15 E(are o)0 48 Q -.15(ve)-.15 G -(rridden.).15 E(This is important, as e)0 60 Q(xisting archi)-.15 E -.15 -(ve)-.25 G(rs are kno).15 E(wn to store non-compliant)-.25 E -.25(va)0 -72 S(lues in the standard header \214elds in this situation.).25 E 0 Cg -EP -%%Page: 76 76 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(There are no limits on length for an)0 12 Q 2.5 -(yo)-.15 G 2.5(ft)-2.5 G(hese \214elds.)-2.5 E(In particular)0 24 Q 2.5 -(,n)-.4 G(umeric \214elds can be arbitrarily lar)-2.5 E(ge.)-.18 E -(All te)0 36 Q(xt \214elds are encoded in UTF8.)-.15 E -(Compliant writers should store only portable 7-bit ASCII characters in) -0 48 Q(the standard ustar header and use e)0 60 Q(xtended)-.15 E(attrib) -0 72 Q(utes whene)-.2 E -.15(ve)-.25 G 2.5(rat).15 G -.15(ex)-2.5 G 2.5 -(tv).15 G(alue contains non-ASCII characters.)-2.75 E 0 Cg EP -%%Page: 77 77 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(In addition to the)0 24 Q -(<b></b><b>x</b>)0 36 Q(entry described abo)0 48 Q -.15(ve)-.15 G 2.5 -(,t).15 G(he pax interchange format)-2.5 E(also supports a)0 60 Q -(<b></b><b>g</b>)0 72 Q 0 Cg EP -%%Page: 78 78 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(entry)0 12 Q(.)-.65 E(The)0 24 Q -(<b></b><b>g</b>)0 36 Q(entry is identical in format, b)0 48 Q -(ut speci\214es attrib)-.2 E(utes that serv)-.2 E 2.5(ea)-.15 G(s)-2.5 E -(def)0 60 Q(aults for all subsequent archi)-.1 E .3 -.15(ve e)-.25 H -(ntries.).15 E(The)0 72 Q 0 Cg EP -%%Page: 79 79 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>g</b>)0 12 Q -(entry is not widely used.)0 24 Q(<p>)36 36 Q(Besides the ne)0 48 Q(w) --.25 E(<b></b><b>x</b>)0 60 Q(and)0 72 Q 0 Cg EP -%%Page: 80 80 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>g</b>)0 12 Q -(entries, the pax interchange format has a fe)0 24 Q 2.5(wo)-.25 G -(ther minor v)-2.5 E(ariations)-.25 E(from the earlier ustar format.)0 -36 Q(The most troubling one is that hardlinks are permitted to ha)0 48 Q --.15(ve)-.2 G(data follo)0 60 Q(wing them.)-.25 E(This allo)0 72 Q -(ws readers to restore an)-.25 E 2.5(yh)-.15 G -(ardlink to a \214le without)-2.5 E 0 Cg EP -%%Page: 81 81 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ha)0 12 Q(ving to re)-.2 E(wind the archi)-.25 E -.3 -.15(ve t)-.25 H 2.5<6f8c>.15 G(nd an earlier entry)-2.5 E(.)-.65 E -(Ho)0 24 Q(we)-.25 E -.15(ve)-.25 G .8 -.4(r, i).15 H 2.5(tc).4 G -(reates complications for rob)-2.5 E(ust readers, as it is no longer)-.2 -E(clear whether or not the)0 36 Q 2.5(ys)-.15 G -(hould ignore the size \214eld for hardlink entries.)-2.5 E -(<h4 id="GNU T)36 48 Q(ar Archi)-.8 E -.15(ve)-.25 G(s">).15 E(GNU T)36 -60 Q(ar Archi)-.8 E -.15(ve)-.25 G(s).15 E(</h4>)36 72 Q 0 Cg EP -%%Page: 82 82 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(The GNU tar program started with a pre-POSIX format similar to that)0 -12 Q(described earlier and has e)0 24 Q(xtended it using se)-.15 E -.15 -(ve)-.25 G(ral dif).15 E(ferent mechanisms:)-.25 E(It added ne)0 36 Q -2.5<778c>-.25 G(elds to the empty space in the header \(some of which w) --2.5 E(as later)-.1 E(used by POSIX for con\215icting purposes\);)0 48 Q -(it allo)0 60 Q(wed the header to be continued o)-.25 E -.15(ve)-.15 G -2.5(rm).15 G(ultiple records;)-2.5 E(and it de\214ned ne)0 72 Q 2.5(we) --.25 G(ntries that modify follo)-2.5 E(wing entries)-.25 E 0 Cg EP -%%Page: 83 83 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(similar in principle to the)0 12 Q -(<b></b><b>x</b>)0 24 Q(entry described abo)0 36 Q -.15(ve)-.15 G 2.5 -(,b).15 G(ut each GNU special entry is single-purpose,)-2.7 E(unlik)0 48 -Q 2.5(et)-.1 G(he general-purpose)-2.5 E(<b></b><b>x</b>)0 60 Q -(entry\).)0 72 Q 0 Cg EP -%%Page: 84 84 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(As a result, GNU tar archi)0 12 Q -.15(ve)-.25 G -2.5(sa).15 G(re not POSIX compatible, although)-2.5 E -(more lenient POSIX-compliant readers can successfully e)0 24 Q -(xtract most)-.15 E(GNU tar archi)0 36 Q -.15(ve)-.25 G(s.).15 E -(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP -%%Page: 85 85 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct header_gnu_tar {)0 12 Q(char name[100];) -36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q(char gid[8];)36 60 Q -(char size[12];)36 72 Q 0 Cg EP -%%Page: 86 86 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24 -Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q -(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP -%%Page: 87 87 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q -(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E -(char atime[12];)36 60 Q(char ctime[12];)36 72 Q 0 Cg EP -%%Page: 88 88 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char of)36 12 Q(fset[12];)-.25 E -(char longnames[4];)36 24 Q(char unused[1];)36 36 Q(struct {)36 48 Q -(char of)72 60 Q(fset[12];)-.25 E(char numbytes[12];)72 72 Q 0 Cg EP -%%Page: 89 89 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(}s)36 12 S(parse[4];)-2.5 E(char ise)36 24 Q -(xtended[1];)-.15 E(char realsize[12];)36 36 Q(char pad[17];)36 48 Q(};) -0 60 Q(</pre>)0 72 Q 0 Cg EP -%%Page: 90 90 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</code>)0 12 Q(</dl>)0 24 Q(<dl compact>)0 36 Q -(<p><dt><i></i><i>type\215ag</i><dd>)0 48 Q(GNU tar uses the follo)0 60 -Q(wing special entry types, in addition to)-.25 E -(those de\214ned by POSIX:)0 72 Q 0 Cg EP -%%Page: 91 91 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q(<p><dt>7<dd>)0 24 Q -(GNU tar treats type "7" records identically to type "0" records,)0 36 Q --.15(ex)0 48 S(cept on one obscure R).15 E -.18(TO)-.6 G 2.5(Sw).18 G -(here the)-2.5 E 2.5(ya)-.15 G(re used to indicate the)-2.5 E -(pre-allocation of a contiguous \214le on disk.)0 60 Q(<p><dt>D<dd>)0 72 -Q 0 Cg EP -%%Page: 92 92 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This indicates a directory entry)0 12 Q(.)-.65 E -(Unlik)0 24 Q 2.5(et)-.1 G(he POSIX-standard "5")-2.5 E -(type\215ag, the header is follo)0 36 Q -(wed by data records listing the names)-.25 E -(of \214les in this directory)0 48 Q(.)-.65 E -(Each name is preceded by an ASCII "Y")0 60 Q -(if the \214le is stored in this archi)0 72 Q .3 -.15(ve o)-.25 H 2.5 -(r").15 G(N" if the \214le is not)-2.5 E 0 Cg EP -%%Page: 93 93 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(stored in this archi)0 12 Q -.15(ve)-.25 G(.).15 -E(Each name is terminated with a null, and)0 24 Q(an e)0 36 Q -(xtra null marks the end of the name list.)-.15 E(The purpose of this)0 -48 Q(entry is to support incremental backups; a program restoring from)0 -60 Q(such an archi)0 72 Q .3 -.15(ve m)-.25 H -(ay wish to delete \214les on disk that did not e).15 E(xist)-.15 E 0 Cg -EP -%%Page: 94 94 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(in the directory when the archi)0 12 Q .3 -.15 -(ve w)-.25 H(as made.).05 E(<p>)36 24 Q(Note that the "D" type\215ag sp\ -eci\214cally violates POSIX, which requires)0 36 Q -(that unrecognized type\215ags be restored as normal \214les.)0 48 Q -(In this case, restoring the "D" entry as a \214le could interfere)0 60 -Q(with subsequent creation of the lik)0 72 Q(e-named directory)-.1 E(.) --.65 E 0 Cg EP -%%Page: 95 95 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt>K<dd>)0 12 Q -(The data for this entry is a long linkname for the follo)0 24 Q -(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>L<dd>)0 36 Q -(The data for this entry is a long pathname for the follo)0 48 Q -(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>M<dd>)0 60 Q -(This is a continuation of the last \214le on the pre)0 72 Q(vious v) --.25 E(olume.)-.2 E 0 Cg EP -%%Page: 96 96 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(GNU multi-v)0 12 Q(olume archi)-.2 E -.15(ve) --.25 G 2.5(sg).15 G(uarantee that each v)-2.5 E(olume be)-.2 E -(gins with a v)-.15 E(alid)-.25 E(entry header)0 24 Q(.)-.55 E 1.6 -.8 -(To e)0 36 T(nsure this, a \214le may be split, with part stored at the\ - end of one v).8 E(olume,)-.2 E(and part stored at the be)0 48 Q -(ginning of the ne)-.15 E(xt v)-.15 E(olume.)-.2 E -(The "M" type\215ag indicates that this entry continues an e)0 60 Q -(xisting \214le.)-.15 E -(Such entries can only occur as the \214rst or second entry)0 72 Q 0 Cg -EP -%%Page: 97 97 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(in an archi)0 12 Q .3 -.15(ve \()-.25 H -(the latter only if the \214rst entry is a v).15 E(olume label\).)-.2 E -(The)0 24 Q(<i></i><i>size</i>)0 36 Q -(\214eld speci\214es the size of this entry)0 48 Q(.)-.65 E(The)0 60 Q -(<i></i><i>of)0 72 Q(fset</i>)-.25 E 0 Cg EP -%%Page: 98 98 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214eld at bytes 369-380 speci\214es the of)0 12 -Q(fset where this \214le fragment)-.25 E(be)0 24 Q(gins.)-.15 E(The)0 36 -Q(<i></i><i>realsize</i>)0 48 Q -(\214eld speci\214es the total size of the \214le \(which must equal)0 -60 Q(<i></i><i>size</i>)0 72 Q 0 Cg EP -%%Page: 99 99 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(plus)0 12 Q(<i></i><i>of)0 24 Q(fset</i>\).)-.25 -E(When e)0 36 Q -(xtracting, GNU tar checks that the header \214le name is the one it is) --.15 E -.15(ex)0 48 S(pecting, that the header of).15 E -(fset is in the correct sequence, and that)-.25 E(the sum of of)0 60 Q -(fset and size is equal to realsize.)-.25 E(<p><dt>N<dd>)0 72 Q 0 Cg EP -%%Page: 100 100 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.8(Ty)0 12 S -(pe "N" records are no longer generated by GNU tar).8 E(.)-.55 E(The)0 -24 Q 2.5(yc)-.15 G(ontained a)-2.5 E -(list of \214les to be renamed or symlink)0 36 Q(ed after e)-.1 E -(xtraction; this w)-.15 E(as)-.1 E -(originally used to support long names.)0 48 Q -(The contents of this record)0 60 Q(are a te)0 72 Q -(xt description of the operations to be done, in the form)-.15 E 0 Cg EP -%%Page: 101 101 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(Rename %s to %s\\n').74 E(')-.74 -E(or)0 24 Q -.74(``)0 36 S(Symlink %s to %s\\n').74 E(';)-.74 E -(in either case, both)0 48 Q -(\214lenames are escaped using K&R C syntax.)0 60 Q -(Due to security concerns, "N" records are no)0 72 Q 2.5(wg)-.25 G -(enerally ignored)-2.5 E 0 Cg EP -%%Page: 102 102 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(when reading archi)0 12 Q -.15(ve)-.25 G(s.).15 -E(<p><dt>S<dd>)0 24 Q(This is a)0 36 Q -.74(``)0 48 S(sparse').74 E(') --.74 E(re)0 60 Q(gular \214le.)-.15 E -(Sparse \214les are stored as a series of fragments.)0 72 Q 0 Cg EP -%%Page: 103 103 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The header contains a list of fragment of)0 12 Q -(fset/length pairs.)-.25 E -(If more than four such entries are required, the header is)0 24 Q -.15 -(ex)0 36 S(tended as necessary with).15 E -.74(``)0 48 S -.15(ex).74 G -(tra').15 E(')-.74 E(header e)0 60 Q -(xtensions \(an older format that is no longer used\), or)-.15 E -.74 -(``)0 72 S(sparse').74 E(')-.74 E 0 Cg EP -%%Page: 104 104 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(ex)0 12 S(tensions.).15 E(<p><dt>V<dd>)0 24 -Q(The)0 36 Q(<i></i><i>name</i>)0 48 Q -(\214eld should be interpreted as a tape/v)0 60 Q(olume header name.)-.2 -E(This entry should generally be ignored on e)0 72 Q(xtraction.)-.15 E 0 -Cg EP -%%Page: 105 105 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p><dt><i></i><i>magic</i><dd>)0 24 -Q(The magic \214eld holds the \214v)0 36 Q 2.5(ec)-.15 G(haracters)-2.5 -E -.74(``)0 48 S(ustar').74 E(')-.74 E(follo)0 60 Q(wed by a space.)-.25 -E(Note that POSIX ustar archi)0 72 Q -.15(ve)-.25 G 2.5(sh).15 G -2.25 --.2(av e)-2.5 H 2.5(at)2.7 G(railing null.)-2.5 E 0 Cg EP -%%Page: 106 106 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><i></i><i>v)0 12 Q(ersion</i><dd>)-.15 E -(The v)0 24 Q(ersion \214eld holds a space character follo)-.15 E -(wed by a null.)-.25 E(Note that POSIX ustar archi)0 36 Q -.15(ve)-.25 G -2.5(su).15 G(se tw)-2.5 E 2.5(oc)-.1 G(opies of the ASCII digit)-2.5 E --.74(``)0 48 S(0').74 E('.)-.74 E -(<p><dt><i></i><i>atime</i><i></i>,<i> ctime</i><dd>)0 60 Q -(The time the \214le w)0 72 Q(as last accessed and the time of)-.1 E 0 -Cg EP -%%Page: 107 107 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(last change of \214le information, stored in octal as with)0 12 Q -(<i></i><i>mtime</i>.)0 24 Q(<p><dt><i></i><i>longnames</i><dd>)0 36 Q -(This \214eld is apparently no longer used.)0 48 Q -(<p><dt>Sparse<i></i><i> of)0 60 Q -(fset</i><i> /</i><i></i><i> numbytes</i><dd>)-.25 E -(Each such structure speci\214es a single fragment of a sparse)0 72 Q 0 -Cg EP -%%Page: 108 108 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214le.)0 12 Q(The tw)0 24 Q 2.5<6f8c>-.1 G -(elds store v)-2.5 E(alues as octal numbers.)-.25 E -(The fragments are each padded to a multiple of 512 bytes)0 36 Q -(in the archi)0 48 Q -.15(ve)-.25 G(.).15 E(On e)0 60 Q -(xtraction, the list of fragments is collected from the)-.15 E -(header \(including an)0 72 Q 2.5(ye)-.15 G -(xtension headers\), and the data)-2.65 E 0 Cg EP -%%Page: 109 109 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(is then read and written to the \214le at appropriate of)0 12 Q(fsets.) --.25 E(<p><dt><i></i><i>ise)0 24 Q(xtended</i><dd>)-.15 E -(If this is set to non-zero, the header will be follo)0 36 Q -(wed by additional)-.25 E -.74(``)0 48 S(sparse header').74 E(')-.74 E -(records.)0 60 Q(Each such record contains information about as man)0 72 -Q 2.5(ya)-.15 G 2.5(s2)-2.5 G 2.5(1a)-2.5 G(dditional)-2.5 E 0 Cg EP -%%Page: 110 110 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(sparse blocks as sho)0 12 Q(wn here:)-.25 E -(<dl compact><dt><dd>)0 24 Q(<code>)0 36 Q(<pre>)0 48 Q -(struct gnu_sparse_header {)0 60 Q(struct {)36 72 Q 0 Cg EP -%%Page: 111 111 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char of)72 12 Q(fset[12];)-.25 E -(char numbytes[12];)72 24 Q 2.5(}s)36 36 S(parse[21];)-2.5 E 7.5 -(char ise)36 48 R(xtended[1];)-.15 E 7.5(char padding[7];)36 60 R(};)0 -72 Q 0 Cg EP -%%Page: 112 112 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</pre>)0 12 Q(</code>)0 24 Q(</dl>)0 36 Q -(<p><dt><i></i><i>realsize</i><dd>)0 48 Q 2.5(Ab)0 60 S -(inary representation of the \214le')-2.5 E 2.5(sc)-.55 G -(omplete size, with a much lar)-2.5 E(ger range)-.18 E -(than the POSIX \214le size.)0 72 Q 0 Cg EP -%%Page: 113 113 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,w)-.4 G(ith)-2.5 E -(<b></b><b>M</b>)0 24 Q -(type \214les, the current entry is only a portion of the \214le.)0 36 Q -(In that case, the POSIX size \214eld will indicate the size of this)0 -48 Q(entry; the)0 60 Q(<i></i><i>realsize</i>)0 72 Q 0 Cg EP -%%Page: 114 114 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(\214eld will indicate the total size of the \214le.)0 12 Q(</dl>)0 24 Q -(<h4 id="GNU tar pax archi)36 36 Q -.15(ve)-.25 G(s">).15 E -(GNU tar pax archi)36 48 Q -.15(ve)-.25 G(s).15 E(</h4>)36 60 Q -(GNU tar 1.14 \(XXX check this XXX\) and later will write)0 72 Q 0 Cg EP -%%Page: 115 115 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(pax interchange format archi)0 12 Q -.15(ve)-.25 -G 2.5(sw).15 G(hen you specify the)-2.5 E(<b>\255</b><b>-posix</b>)0 24 -Q(\215ag.)0 36 Q(This format uses custom k)0 48 Q -.15(ey)-.1 G -.1(wo) -.15 G(rds to store sparse \214le information.).1 E(There ha)0 60 Q .3 --.15(ve b)-.2 H(een three iterations of this support, referred to).15 E -(as)0 72 Q 0 Cg EP -%%Page: 116 116 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(0.0').74 E(',)-.74 E -.74(``)0 24 -S(0.1').74 E(',)-.74 E(and)0 36 Q -.74(``)0 48 S(1.0').74 E('.)-.74 E -(<dl compact>)0 60 Q -(<p><dt><b></b><b>GNU.sparse.numblocks</b><b></b>,<b> GNU.sparse.of)0 72 -Q(fset</b><b></b>,<b> GNU.sparse.numbytes</b><b></b>,<b> GNU.sparse.siz\ -e</b><dd>)-.25 E 0 Cg EP -%%Page: 117 117 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q -.74(``)0 24 S(0.0').74 E(')-.74 E -(format used an initial)0 36 Q(<b></b><b>GNU.sparse.numblocks</b>)0 48 Q -(attrib)0 60 Q -(ute to indicate the number of blocks in the \214le, a pair of)-.2 E -(<b></b><b>GNU.sparse.of)0 72 Q(fset</b>)-.25 E 0 Cg EP -%%Page: 118 118 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b></b><b>GNU.sparse.numbytes</b>)0 -24 Q(to indicate the of)0 36 Q(fset and size of each block,)-.25 E -(and a single)0 48 Q(<b></b><b>GNU.sparse.size</b>)0 60 Q -(to indicate the full size of the \214le.)0 72 Q 0 Cg EP -%%Page: 119 119 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(This is not the same as the size in the tar header because the)0 12 Q -(latter v)0 24 Q(alue does not include the size of an)-.25 E 2.5(yh)-.15 -G(oles.)-2.5 E(This format required that the order of attrib)0 36 Q -(utes be preserv)-.2 E(ed and)-.15 E -(relied on readers accepting multiple appearances of the same attrib)0 -48 Q(ute)-.2 E(names, which is not of)0 60 Q -(\214cially permitted by the standards.)-.25 E -(<p><dt><b></b><b>GNU.sparse.map</b><dd>)0 72 Q 0 Cg EP -%%Page: 120 120 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q -.74(``)0 24 S(0.1').74 E(')-.74 E -(format used a single attrib)0 36 Q(ute that stored a comma-separated) --.2 E(list of decimal numbers.)0 48 Q -(Each pair of numbers indicated the of)0 60 Q(fset and size, respecti) --.25 E -.15(ve)-.25 G(ly).15 E(,)-.65 E(of a block of data.)0 72 Q 0 Cg -EP -%%Page: 121 121 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This does not w)0 12 Q(ork well if the archi)-.1 -E .3 -.15(ve i)-.25 H 2.5(se).15 G(xtracted by an archi)-2.65 E -.15(ve) --.25 G(r).15 E(that does not recognize this e)0 24 Q -(xtension, since man)-.15 E 2.5(yp)-.15 G(ax implementations)-2.5 E -(simply discard unrecognized attrib)0 36 Q(utes.)-.2 E(<p><dt><b></b><b\ ->GNU.sparse.major</b><b></b>,<b> GNU.sparse.minor</b><b></b>,<b> GNU.sp\ -arse.name</b><b></b>,<b> GNU.sparse.realsize</b><dd>)0 48 Q(The)0 60 Q --.74(``)0 72 S(1.0').74 E(')-.74 E 0 Cg EP -%%Page: 122 122 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(format stores the sparse block map in one or more 512-byte blocks)0 12 -Q(prepended to the \214le data in the entry body)0 24 Q(.)-.65 E -(The pax attrib)0 36 Q(utes indicate the e)-.2 E(xistence of this map) --.15 E(\(via the)0 48 Q(<b></b><b>GNU.sparse.major</b>)0 60 Q(and)0 72 Q -0 Cg EP -%%Page: 123 123 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>GNU.sparse.minor</b>)0 12 Q -(\214elds\))0 24 Q(and the full size of the \214le.)0 36 Q(The)0 48 Q -(<b></b><b>GNU.sparse.name</b>)0 60 Q -(holds the true name of the \214le.)0 72 Q 0 Cg EP -%%Page: 124 124 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 1.6 -.8(To a)0 12 T -.2(vo).6 G -(id confusion, the name stored in the re).2 E(gular tar header)-.15 E -(is a modi\214ed name so that e)0 24 Q -(xtraction errors will be apparent)-.15 E(to users.)0 36 Q(</dl>)0 48 Q -(<h4 id="Solaris T)36 60 Q(ar">)-.8 E(Solaris T)36 72 Q(ar)-.8 E 0 Cg EP -%%Page: 125 125 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(XXX More Details Needed XXX)0 24 Q -(<p>)36 36 Q(Solaris tar \(be)0 48 Q -(ginning with SunOS XXX 5.7 ?? XXX\) supports an)-.15 E -.74(``)0 60 S --.15(ex).74 G(tended').15 E(')-.74 E -(format that is fundamentally similar to pax interchange format,)0 72 Q -0 Cg EP -%%Page: 126 126 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(with the follo)0 12 Q(wing dif)-.25 E(ferences:) --.25 E(<ul>)0 24 Q(<li>)0 36 Q(Extended attrib)0 48 Q -(utes are stored in an entry whose type is)-.2 E(<b></b><b>X</b>,)0 60 Q -(not)0 72 Q 0 Cg EP -%%Page: 127 127 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>x</b>,)0 12 Q -(as used by pax interchange format.)0 24 Q -(The detailed format of this entry appears to be the same)0 36 Q -(as detailed abo)0 48 Q .3 -.15(ve f)-.15 H(or the).15 E -(<b></b><b>x</b>)0 60 Q(entry)0 72 Q(.)-.65 E 0 Cg EP -%%Page: 128 128 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q(An additional)0 24 Q -(<b></b><b>A</b>)0 36 Q(entry is used to store an A)0 48 Q -(CL for the follo)-.4 E(wing re)-.25 E(gular entry)-.15 E(.)-.65 E -(The body of this entry contains a se)0 60 Q -.15(ve)-.25 G -(n-digit octal number).15 E(follo)0 72 Q(wed by a zero byte, follo)-.25 -E(wed by the)-.25 E 0 Cg EP -%%Page: 129 129 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(te)0 12 Q(xtual A)-.15 E(CL description.)-.4 E -(The octal v)0 24 Q(alue is the number of A)-.25 E(CL entries)-.4 E -(plus a constant that indicates the A)0 36 Q(CL type: 01000000)-.4 E -(for POSIX.1e A)0 48 Q(CLs and 03000000 for NFSv4 A)-.4 E(CLs.)-.4 E -(</ul>)0 60 Q(<h4 id="AIX T)36 72 Q(ar">)-.8 E 0 Cg EP -%%Page: 130 130 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(AIX T)36 12 Q(ar)-.8 E(</h4>)36 24 Q -(XXX More details needed XXX)0 36 Q(<h4 id="Mac OS X T)36 48 Q(ar">)-.8 -E(Mac OS X T)36 60 Q(ar)-.8 E(</h4>)36 72 Q 0 Cg EP -%%Page: 131 131 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The tar distrib)0 12 Q(uted with Apple')-.2 E -2.5(sM)-.55 G(ac OS X stores most re)-2.5 E(gular \214les)-.15 E(as tw)0 -24 Q 2.5(os)-.1 G(eparate entries in the tar archi)-2.5 E -.15(ve)-.25 G -(.).15 E(The tw)0 36 Q 2.5(oe)-.1 G(ntries ha)-2.5 E .3 -.15(ve t)-.2 H -(he same name e).15 E(xcept that the \214rst)-.15 E(one has)0 48 Q -.74 -(``)0 60 S(._').74 E(')-.74 E(added to the be)0 72 Q -(ginning of the name.)-.15 E 0 Cg EP -%%Page: 132 132 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This \214rst entry stores the)0 12 Q -.74(``)0 -24 S(resource fork').74 E(')-.74 E(with additional attrib)0 36 Q -(utes for the \214le.)-.2 E(The Mac OS X)0 48 Q(<b>Cop)0 60 Q -(yFile</b>\(<code></code>\))-.1 E -(API is used to separate a \214le on disk into separate)0 72 Q 0 Cg EP -%%Page: 133 133 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(resource and data streams and to reassemble those separate)0 12 Q -(streams when the \214le is restored to disk.)0 24 Q -(<h4 id="Other Extensions">)36 36 Q(Other Extensions)36 48 Q(</h4>)36 60 -Q(One ob)0 72 Q(vious e)-.15 E -(xtension to increase the size of \214les is to)-.15 E 0 Cg EP -%%Page: 134 134 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(eliminate the terminating characters from the v) -0 12 Q(arious)-.25 E(numeric \214elds.)0 24 Q -.15(Fo)0 36 S 2.5(re).15 -G(xample, the standard only allo)-2.65 E(ws the size \214eld to contain) --.25 E(11 octal digits, reserving the twelfth byte for a trailing)0 48 Q -(NUL character)0 60 Q(.)-.55 E(Allo)0 72 Q(wing 12 octal digits allo) --.25 E(ws \214le sizes up to 64 GB.)-.25 E 0 Cg EP -%%Page: 135 135 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(Another e)0 24 Q -(xtension, utilized by GNU tar)-.15 E 2.5(,s)-.4 G(tar)-2.5 E 2.5(,a)-.4 -G(nd other ne)-2.5 E(wer)-.25 E(<b>tar</b>)0 36 Q(implementations, perm\ -its binary numbers in the standard numeric \214elds.)0 48 Q -(This is \215agged by setting the high bit of the \214rst byte.)0 60 Q -(This permits 95-bit v)0 72 Q(alues for the length and time \214elds) --.25 E 0 Cg EP -%%Page: 136 136 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and 63-bit v)0 12 Q -(alues for the uid, gid, and de)-.25 E(vice numbers.)-.25 E -(GNU tar supports this e)0 24 Q(xtension for the)-.15 E -(length, mtime, ctime, and atime \214elds.)0 36 Q(Joer)0 48 Q 2.5(gS) --.18 G(chilling')-2.5 E 2.5(ss)-.55 G(tar program supports this e)-2.5 E -(xtension for)-.15 E(all numeric \214elds.)0 60 Q(Note that this e)0 72 -Q(xtension is lar)-.15 E(gely obsoleted by the e)-.18 E(xtended attrib) --.15 E(ute)-.2 E 0 Cg EP -%%Page: 137 137 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(record pro)0 12 Q -(vided by the pax interchange format.)-.15 E(<p>)36 24 Q -(Another early GNU e)0 36 Q(xtension allo)-.15 E(wed base-64 v)-.25 E -(alues rather than octal.)-.25 E(This e)0 48 Q(xtension w)-.15 E -(as short-li)-.1 E -.15(ve)-.25 G 2.5(da).15 G -(nd is no longer supported by an)-2.5 E(y)-.15 E(implementation.)0 60 Q -(<h3 id="SEE ALSO">)36 72 Q 0 Cg EP -%%Page: 138 138 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(SEE ALSO)36 12 Q(</h3>)36 24 Q -(<a href="../html1/ar)0 36 Q(.html">ar\(1\)</a>,)-.55 E -(<a href="../html1/pax.html">pax\(1\)</a>,)0 48 Q(<a href="../html1/tar) -0 60 Q(.html">tar\(1\)</a>)-.55 E(<h3 id="ST)36 72 Q(AND)-.93 E(ARDS">) --.4 E 0 Cg EP -%%Page: 139 139 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ST)36 12 Q(AND)-.93 E(ARDS)-.4 E(</h3>)36 24 Q -(The)0 36 Q(<b>tar</b>)0 48 Q -(utility is no longer a part of POSIX or the Single Unix Standard.)0 60 -Q(It last appeared in)0 72 Q 0 Cg EP -%%Page: 140 140 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.11(Ve)2.5 12 S -(rsion 2 of the Single UNIX Speci\214cation \(`)1.11 E(`SUSv2')-.74 E -('\) .)-.74 E(It has been supplanted in subsequent standards by)0 24 Q -(<a href="../html1/pax.html">pax\(1\)</a>.)0 36 Q -(The ustar format is currently part of the speci\214cation for the)0 48 -Q(<a href="../html1/pax.html">pax\(1\)</a>)0 60 Q(utility)0 72 Q(.)-.65 -E 0 Cg EP -%%Page: 141 141 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The pax interchange \214le format is ne)0 12 Q -2.5(ww)-.25 G(ith)-2.5 E(IEEE Std 1003.1-2001 \(`)2.5 24 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\) .)-.74 E(<h3 id="HIST)36 36 -Q(OR)-.18 E(Y">)-.65 E(HIST)36 48 Q(OR)-.18 E(Y)-.65 E(</h3>)36 60 Q(A)0 -72 Q 0 Cg EP -%%Page: 142 142 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>tar</b>)0 12 Q(command appeared in Se)0 24 Q --.15(ve)-.25 G(nth Edition Unix, which w).15 E(as released in January) --.1 E 2.5(,1)-.65 G(979.)-2.5 E(It replaced the)0 36 Q(<b>tp</b>)0 48 Q -(program from F)0 60 Q(ourth Edition Unix which in turn replaced the) --.15 E(<b>tap</b>)0 72 Q 0 Cg EP -%%Page: 143 143 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(program from First Edition Unix.)0 12 Q -(John Gilmore')0 24 Q(s)-.55 E(<b>pdtar</b>)0 36 Q -(public-domain implementation \(circa 1987\) w)0 48 Q -(as highly in\215uential)-.1 E(and formed the basis of)0 60 Q -(<b>GNU</b><b>tar</b>)0 72 Q 0 Cg EP -%%Page: 144 144 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(circa 1988\).)0 12 Q(Joer)0 24 Q 2.5(gS)-.18 G -(hilling')-2.5 E(s)-.55 E(<b>star</b>)0 36 Q(archi)0 48 Q -.15(ve)-.25 G -2.5(ri).15 G 2.5(sa)-2.5 G(nother open-source \(GPL\) archi)-2.5 E -.15 -(ve)-.25 G 2.5(r\().15 G(originally de)-2.5 E -.15(ve)-.25 G(loped).15 E -(circa 1985\) which features complete support for pax interchange)0 60 Q -(format.)0 72 Q 0 Cg EP -%%Page: 145 145 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(This documentation w)0 24 Q -(as written as part of the)-.1 E(<b>libarchi)0 36 Q -.15(ve)-.25 G(</b>) -.15 E(and)0 48 Q(<b>bsdtar</b>)0 60 Q(project by)0 72 Q 0 Cg EP -%%Page: 146 146 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.35(Ti)0 12 S 2.5(mK).35 G -(ientzle <kientzle@FreeBSD.or)-2.5 E(g><br>.)-.18 E(</body>)0 24 Q -(</html>)0 36 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:35 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">tar(5) FreeBSD File Formats Manual +tar(5)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>tar</b> — format of +tape archive files</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">The <b>tar</b> archive format +collects any number of files, directories, and other file +system objects (symbolic links, device nodes, etc.) into a +single stream of bytes. The format was originally designed +to be used with tape drives that operate with fixed-size +blocks, but is widely used as a general packaging +mechanism.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>General +Format</b> <br> +A <b>tar</b> archive consists of a series of 512-byte +records. Each file system object requires a header record +which stores basic metadata (pathname, owner, permissions, +etc.) and zero or more records containing any file data. The +end of the archive is indicated by two records consisting +entirely of zero bytes.</p> + +<p style="margin-left:8%; margin-top: 1em">For +compatibility with tape drives that use fixed block sizes, +programs that read or write tar files always read or write a +fixed number of records with each I/O operation. These +‘‘blocks’’ are always a multiple of +the record size. The maximum block size supported by early +implementations was 10240 bytes or 20 records. This is still +the default for most implementations although block sizes of +1MiB (2048 records) or larger are commonly used with modern +high-speed tape drives. (Note: the terms +‘‘block’’ and +‘‘record’’ here are not entirely +standard; this document follows the convention established +by John Gilmore in documenting <b>pdtar</b>.)</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Old-Style +Archive Format</b> <br> +The original tar archive format has been extended many times +to include additional information that various implementors +found necessary. This section describes the variant +implemented by the tar command included in Version 7 +AT&T UNIX, which seems to be the earliest widely-used +version of the tar program.</p> + +<p style="margin-left:8%; margin-top: 1em">The header +record for an old-style <b>tar</b> archive consists of the +following:</p> + +<p style="margin-left:17%; margin-top: 1em">struct +header_old_tar {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char name[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mode[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char size[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mtime[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char checksum[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkflag[1];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkname[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char pad[255];</p></td> +<td width="58%"> +</td> +</table> + +<p style="margin-left:17%;">};</p> + +<p style="margin-left:8%;">All unused bytes in the header +record are filled with nulls.</p> + +<p style="margin-top: 1em" valign="top"><i>name</i></p> + +<p style="margin-left:20%; margin-top: 1em">Pathname, +stored as a null-terminated string. Early tar +implementations only stored regular files (including +hardlinks to those files). One common early convention used +a trailing "/" character to indicate a directory +name, allowing directory permissions and owner information +to be archived and restored.</p> + +<p style="margin-top: 1em" valign="top"><i>mode</i></p> + +<p style="margin-left:20%; margin-top: 1em">File mode, +stored as an octal number in ASCII.</p> + +<p style="margin-top: 1em" valign="top"><i>uid</i>, +<i>gid</i></p> + +<p style="margin-left:20%;">User id and group id of owner, +as octal numbers in ASCII.</p> + +<p style="margin-top: 1em" valign="top"><i>size</i></p> + +<p style="margin-left:20%; margin-top: 1em">Size of file, +as octal number in ASCII. For regular files only, this +indicates the amount of data that follows the header. In +particular, this field was ignored by early tar +implementations when extracting hardlinks. Modern writers +should always store a zero length for hardlink entries.</p> + +<p style="margin-top: 1em" valign="top"><i>mtime</i></p> + +<p style="margin-left:20%; margin-top: 1em">Modification +time of file, as an octal number in ASCII. This indicates +the number of seconds since the start of the epoch, 00:00:00 +UTC January 1, 1970. Note that negative values should be +avoided here, as they are handled inconsistently.</p> + + +<p style="margin-top: 1em" valign="top"><i>checksum</i></p> + +<p style="margin-left:20%;">Header checksum, stored as an +octal number in ASCII. To compute the checksum, set the +checksum field to all spaces, then sum all bytes in the +header using unsigned arithmetic. This field should be +stored as six octal digits followed by a null and a space +character. Note that many early implementations of tar used +signed arithmetic for the checksum field, which can cause +interoperability problems when transferring archives between +systems. Modern robust readers compute the checksum both +ways and accept the header if either computation +matches.</p> + +<p style="margin-top: 1em" valign="top"><i>linkflag</i>, +<i>linkname</i></p> + +<p style="margin-left:20%;">In order to preserve hardlinks +and conserve tape, a file with multiple links is only +written to the archive the first time it is encountered. The +next time it is encountered, the <i>linkflag</i> is set to +an ASCII ‘1’ and the <i>linkname</i> field holds +the first name under which this file appears. (Note that +regular files have a null value in the <i>linkflag</i> +field.)</p> + +<p style="margin-left:8%; margin-top: 1em">Early tar +implementations varied in how they terminated these fields. +The tar command in Version 7 AT&T UNIX used the +following conventions (this is also documented in early BSD +manpages): the pathname must be null-terminated; the mode, +uid, and gid fields must end in a space and a null byte; the +size and mtime fields must end in a space; the checksum is +terminated by a null and a space. Early implementations +filled the numeric fields with leading spaces. This seems to +have been common practice until the IEEE Std 1003.1-1988 +(‘‘POSIX.1’’) standard was released. +For best portability, modern implementations should fill the +numeric fields with leading zeros.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Pre-POSIX +Archives</b> <br> +An early draft of IEEE Std 1003.1-1988 +(‘‘POSIX.1’’) served as the basis +for John Gilmore’s <b>pdtar</b> program and many +system implementations from the late 1980s and early 1990s. +These archives generally follow the POSIX ustar format +described below with the following variations:</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">The magic value is +‘‘ustar ’’ (note the following +space). The version field contains a space character +followed by a null.</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">The numeric fields are +generally filled with leading spaces (not leading zeros as +recommended in the final standard).</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">The prefix field is often not +used, limiting pathnames to the 100 characters of old-style +archives.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>POSIX ustar +Archives</b> <br> +IEEE Std 1003.1-1988 (‘‘POSIX.1’’) +defined a standard tar file format to be read and written by +compliant implementations of tar(1). This format is often +called the ‘‘ustar’’ format, after +the magic value used in the header. (The name is an acronym +for ‘‘Unix Standard TAR’’.) It +extends the historic format with new fields:</p> + +<p style="margin-left:17%; margin-top: 1em">struct +header_posix_ustar {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char name[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mode[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char size[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mtime[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char checksum[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char typeflag[1];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkname[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char magic[6];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char version[2];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uname[32];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gname[32];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devmajor[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devminor[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char prefix[155];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char pad[12];</p></td> +<td width="58%"> +</td> +</table> + +<p style="margin-left:17%;">};</p> + + +<p style="margin-top: 1em" valign="top"><i>typeflag</i></p> + +<p style="margin-left:20%;">Type of entry. POSIX extended +the earlier <i>linkflag</i> field with several new type +values:</p> + +<p valign="top">‘‘0’’</p> + +<p style="margin-left:32%; margin-top: 1em">Regular file. +NUL should be treated as a synonym, for compatibility +purposes.</p> + +<p valign="top">‘‘1’’</p> + +<p style="margin-left:32%; margin-top: 1em">Hard link.</p> + +<p valign="top">‘‘2’’</p> + +<p style="margin-left:32%; margin-top: 1em">Symbolic +link.</p> + +<p valign="top">‘‘3’’</p> + +<p style="margin-left:32%; margin-top: 1em">Character +device node.</p> + +<p valign="top">‘‘4’’</p> + +<p style="margin-left:32%; margin-top: 1em">Block device +node.</p> + +<p valign="top">‘‘5’’</p> + +<p style="margin-left:32%; margin-top: 1em">Directory.</p> + +<p valign="top">‘‘6’’</p> + +<p style="margin-left:32%; margin-top: 1em">FIFO node.</p> + +<p valign="top">‘‘7’’</p> + +<p style="margin-left:32%; margin-top: 1em">Reserved.</p> + +<p valign="top">Other</p> + +<p style="margin-left:32%; margin-top: 1em">A +POSIX-compliant implementation must treat any unrecognized +typeflag value as a regular file. In particular, writers +should ensure that all entries have a valid filename so that +they can be restored by readers that do not support the +corresponding extension. Uppercase letters "A" +through "Z" are reserved for custom extensions. +Note that sockets and whiteout entries are not +archivable.</p> + +<p style="margin-left:20%;">It is worth noting that the +<i>size</i> field, in particular, has different meanings +depending on the type. For regular files, of course, it +indicates the amount of data following the header. For +directories, it may be used to indicate the total size of +all files in the directory, for use by operating systems +that pre-allocate directory space. For all other types, it +should be set to zero by writers and ignored by readers.</p> + +<p style="margin-top: 1em" valign="top"><i>magic</i></p> + +<p style="margin-left:20%; margin-top: 1em">Contains the +magic value ‘‘ustar’’ followed by a +NUL byte to indicate that this is a POSIX standard archive. +Full compliance requires the uname and gname fields be +properly set.</p> + +<p style="margin-top: 1em" valign="top"><i>version</i></p> + +<p style="margin-left:20%;">Version. This should be +‘‘00’’ (two copies of the ASCII +digit zero) for POSIX standard archives.</p> + +<p style="margin-top: 1em" valign="top"><i>uname</i>, +<i>gname</i></p> + +<p style="margin-left:20%;">User and group names, as +null-terminated ASCII strings. These should be used in +preference to the uid/gid values when they are set and the +corresponding names exist on the system.</p> + +<p style="margin-top: 1em" valign="top"><i>devmajor</i>, +<i>devminor</i></p> + +<p style="margin-left:20%;">Major and minor numbers for +character device or block device entry.</p> + +<p style="margin-top: 1em" valign="top"><i>name</i>, +<i>prefix</i></p> + +<p style="margin-left:20%;">If the pathname is too long to +fit in the 100 bytes provided by the standard format, it can +be split at any <i>/</i> character with the first portion +going into the prefix field. If the prefix field is not +empty, the reader will prepend the prefix value and a +<i>/</i> character to the regular name field to obtain the +full pathname. The standard does not require a trailing +<i>/</i> character on directory names, though most +implementations still include this for compatibility +reasons.</p> + +<p style="margin-left:8%; margin-top: 1em">Note that all +unused bytes must be set to NUL.</p> + +<p style="margin-left:8%; margin-top: 1em">Field +termination is specified slightly differently by POSIX than +by previous implementations. The <i>magic</i>, <i>uname</i>, +and <i>gname</i> fields must have a trailing NUL. The +<i>pathname</i>, <i>linkname</i>, and <i>prefix</i> fields +must have a trailing NUL unless they fill the entire field. +(In particular, it is possible to store a 256-character +pathname if it happens to have a <i>/</i> as the 156th +character.) POSIX requires numeric fields to be zero-padded +in the front, and requires them to be terminated with either +space or NUL characters.</p> + +<p style="margin-left:8%; margin-top: 1em">Currently, most +tar implementations comply with the ustar format, +occasionally extending it by adding new fields to the blank +area at the end of the header record.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Pax +Interchange Format</b> <br> +There are many attributes that cannot be portably stored in +a POSIX ustar archive. IEEE Std 1003.1-2001 +(‘‘POSIX.1’’) defined a +‘‘pax interchange format’’ that uses +two new types of entries to hold text-formatted metadata +that applies to following entries. Note that a pax +interchange format archive is a ustar archive in every +respect. The new data is stored in ustar-compatible archive +entries that use the ‘‘x’’ or +‘‘g’’ typeflag. In particular, older +implementations that do not fully support these extensions +will extract the metadata into regular files, where the +metadata can be examined as necessary.</p> + +<p style="margin-left:8%; margin-top: 1em">An entry in a +pax interchange format archive consists of one or two +standard ustar entries, each with its own header and data. +The first optional entry stores the extended attributes for +the following entry. This optional first entry has an +"x" typeflag and a size field that indicates the +total size of the extended attributes. The extended +attributes themselves are stored as a series of text-format +lines encoded in the portable UTF-8 encoding. Each line +consists of a decimal number, a space, a key string, an +equals sign, a value string, and a new line. The decimal +number indicates the length of the entire line, including +the initial length field and the trailing newline. An +example of such a field is:</p> + +<p style="margin-left:17%;">25 ctime=1084839148.1212\n</p> + +<p style="margin-left:8%;">Keys in all lowercase are +standard keys. Vendors can add their own keys by prefixing +them with an all uppercase vendor name and a period. Note +that, unlike the historic header, numeric values are stored +using decimal, not octal. A description of some common keys +follows:</p> + +<p style="margin-top: 1em" valign="top"><b>atime</b>, +<b>ctime</b>, <b>mtime</b></p> + +<p style="margin-left:20%;">File access, inode change, and +modification times. These fields can be negative or include +a decimal point and a fractional value.</p> + +<p style="margin-top: 1em" valign="top"><b>uname</b>, +<b>uid</b>, <b>gname</b>, <b>gid</b></p> + +<p style="margin-left:20%;">User name, group name, and +numeric UID and GID values. The user name and group name +stored here are encoded in UTF8 and can thus include +non-ASCII characters. The UID and GID fields can be of +arbitrary length.</p> + + +<p style="margin-top: 1em" valign="top"><b>linkpath</b></p> + +<p style="margin-left:20%;">The full path of the linked-to +file. Note that this is encoded in UTF8 and can thus include +non-ASCII characters.</p> + +<p style="margin-top: 1em" valign="top"><b>path</b></p> + +<p style="margin-left:20%; margin-top: 1em">The full +pathname of the entry. Note that this is encoded in UTF8 and +can thus include non-ASCII characters.</p> + +<p style="margin-top: 1em" valign="top"><b>realtime.*</b>, +<b>security.*</b></p> + +<p style="margin-left:20%;">These keys are reserved and may +be used for future standardization.</p> + +<p style="margin-top: 1em" valign="top"><b>size</b></p> + +<p style="margin-left:20%; margin-top: 1em">The size of the +file. Note that there is no length limit on this field, +allowing conforming archives to store files much larger than +the historic 8GB limit.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.*</b></p> + +<p style="margin-left:20%;">Vendor-specific attributes used +by Joerg Schilling’s <b>star</b> implementation.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.acl.access</b>, +<b>SCHILY.acl.default</b></p> + +<p style="margin-left:20%;">Stores the access and default +ACLs as textual strings in a format that is an extension of +the format specified by POSIX.1e draft 17. In particular, +each user or group access specification can include a fourth +colon-separated field with the numeric UID or GID. This +allows ACLs to be restored on systems that may not have +complete user or group information available (such as when +NIS/YP or LDAP services are temporarily unavailable).</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.devminor</b>, +<b>SCHILY.devmajor</b></p> + +<p style="margin-left:20%;">The full minor and major +numbers for device nodes.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.fflags</b></p> + +<p style="margin-left:20%;">The file flags.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.realsize</b></p> + +<p style="margin-left:20%;">The full size of the file on +disk. XXX explain? XXX</p> + +<p style="margin-top: 1em" valign="top"><b>SCHILY.dev, +SCHILY.ino</b>, <b>SCHILY.nlinks</b></p> + +<p style="margin-left:20%;">The device number, inode +number, and link count for the entry. In particular, note +that a pax interchange format archive using Joerg +Schilling’s <b>SCHILY.*</b> extensions can store all +of the data from <i>struct stat</i>.</p> + + +<p style="margin-top: 1em" valign="top"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p> + +<p style="margin-left:20%;">Libarchive stores +POSIX.1e-style extended attributes using keys of this form. +The <i>key</i> value is URL-encoded: All non-ASCII +characters and the two special characters +‘‘=’’ and +‘‘%’’ are encoded as +‘‘%’’ followed by two uppercase +hexadecimal digits. The value of this key is the extended +attribute value encoded in base 64. XXX Detail the base-64 +format here XXX</p> + + +<p style="margin-top: 1em" valign="top"><b>VENDOR.*</b></p> + +<p style="margin-left:20%;">XXX document other +vendor-specific extensions XXX</p> + +<p style="margin-left:8%; margin-top: 1em">Any values +stored in an extended attribute override the corresponding +values in the regular tar header. Note that compliant +readers should ignore the regular fields when they are +overridden. This is important, as existing archivers are +known to store non-compliant values in the standard header +fields in this situation. There are no limits on length for +any of these fields. In particular, numeric fields can be +arbitrarily large. All text fields are encoded in UTF8. +Compliant writers should store only portable 7-bit ASCII +characters in the standard ustar header and use extended +attributes whenever a text value contains non-ASCII +characters.</p> + +<p style="margin-left:8%; margin-top: 1em">In addition to +the <b>x</b> entry described above, the pax interchange +format also supports a <b>g</b> entry. The <b>g</b> entry is +identical in format, but specifies attributes that serve as +defaults for all subsequent archive entries. The <b>g</b> +entry is not widely used.</p> + +<p style="margin-left:8%; margin-top: 1em">Besides the new +<b>x</b> and <b>g</b> entries, the pax interchange format +has a few other minor variations from the earlier ustar +format. The most troubling one is that hardlinks are +permitted to have data following them. This allows readers +to restore any hardlink to a file without having to rewind +the archive to find an earlier entry. However, it creates +complications for robust readers, as it is no longer clear +whether or not they should ignore the size field for +hardlink entries.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>GNU Tar +Archives</b> <br> +The GNU tar program started with a pre-POSIX format similar +to that described earlier and has extended it using several +different mechanisms: It added new fields to the empty space +in the header (some of which was later used by POSIX for +conflicting purposes); it allowed the header to be continued +over multiple records; and it defined new entries that +modify following entries (similar in principle to the +<b>x</b> entry described above, but each GNU special entry +is single-purpose, unlike the general-purpose <b>x</b> +entry). As a result, GNU tar archives are not POSIX +compatible, although more lenient POSIX-compliant readers +can successfully extract most GNU tar archives.</p> + +<p style="margin-left:17%; margin-top: 1em">struct +header_gnu_tar {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char name[100];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mode[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uid[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gid[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char size[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mtime[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char checksum[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char typeflag[1];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkname[100];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char magic[6];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char version[2];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uname[32];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gname[32];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devmajor[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devminor[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char atime[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char ctime[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char offset[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char longnames[4];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char unused[1];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">struct {</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> +</td> +<td width="12%"> + + +<p valign="top">char offset[12];</p></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> +</td> +<td width="12%"> + + +<p valign="top">char numbytes[12];</p></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">} sparse[4];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char isextended[1];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char realsize[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char pad[17];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +</table> + +<p style="margin-left:17%;">};</p> + + +<p style="margin-top: 1em" valign="top"><i>typeflag</i></p> + +<p style="margin-left:20%;">GNU tar uses the following +special entry types, in addition to those defined by +POSIX:</p> + +<p style="margin-top: 1em" valign="top">7</p> + +<p style="margin-left:32%; margin-top: 1em">GNU tar treats +type "7" records identically to type "0" +records, except on one obscure RTOS where they are used to +indicate the pre-allocation of a contiguous file on +disk.</p> + +<p style="margin-top: 1em" valign="top">D</p> + +<p style="margin-left:32%; margin-top: 1em">This indicates +a directory entry. Unlike the POSIX-standard "5" +typeflag, the header is followed by data records listing the +names of files in this directory. Each name is preceded by +an ASCII "Y" if the file is stored in this archive +or "N" if the file is not stored in this archive. +Each name is terminated with a null, and an extra null marks +the end of the name list. The purpose of this entry is to +support incremental backups; a program restoring from such +an archive may wish to delete files on disk that did not +exist in the directory when the archive was made.</p> + +<p style="margin-left:32%; margin-top: 1em">Note that the +"D" typeflag specifically violates POSIX, which +requires that unrecognized typeflags be restored as normal +files. In this case, restoring the "D" entry as a +file could interfere with subsequent creation of the +like-named directory.</p> + +<p style="margin-top: 1em" valign="top">K</p> + +<p style="margin-left:32%; margin-top: 1em">The data for +this entry is a long linkname for the following regular +entry.</p> + +<p style="margin-top: 1em" valign="top">L</p> + +<p style="margin-left:32%; margin-top: 1em">The data for +this entry is a long pathname for the following regular +entry.</p> + +<p style="margin-top: 1em" valign="top">M</p> + +<p style="margin-left:32%; margin-top: 1em">This is a +continuation of the last file on the previous volume. GNU +multi-volume archives guarantee that each volume begins with +a valid entry header. To ensure this, a file may be split, +with part stored at the end of one volume, and part stored +at the beginning of the next volume. The "M" +typeflag indicates that this entry continues an existing +file. Such entries can only occur as the first or second +entry in an archive (the latter only if the first entry is a +volume label). The <i>size</i> field specifies the size of +this entry. The <i>offset</i> field at bytes 369-380 +specifies the offset where this file fragment begins. The +<i>realsize</i> field specifies the total size of the file +(which must equal <i>size</i> plus <i>offset</i>). When +extracting, GNU tar checks that the header file name is the +one it is expecting, that the header offset is in the +correct sequence, and that the sum of offset and size is +equal to realsize.</p> + +<p style="margin-top: 1em" valign="top">N</p> + +<p style="margin-left:32%; margin-top: 1em">Type +"N" records are no longer generated by GNU tar. +They contained a list of files to be renamed or symlinked +after extraction; this was originally used to support long +names. The contents of this record are a text description of +the operations to be done, in the form ‘‘Rename +%s to %s\n’’ or ‘‘Symlink %s to +%s\n’’; in either case, both filenames are +escaped using K&R C syntax. Due to security concerns, +"N" records are now generally ignored when reading +archives.</p> + +<p style="margin-top: 1em" valign="top">S</p> + +<p style="margin-left:32%; margin-top: 1em">This is a +‘‘sparse’’ regular file. Sparse +files are stored as a series of fragments. The header +contains a list of fragment offset/length pairs. If more +than four such entries are required, the header is extended +as necessary with ‘‘extra’’ header +extensions (an older format that is no longer used), or +‘‘sparse’’ extensions.</p> + +<p style="margin-top: 1em" valign="top">V</p> + +<p style="margin-left:32%; margin-top: 1em">The <i>name</i> +field should be interpreted as a tape/volume header name. +This entry should generally be ignored on extraction.</p> + +<p style="margin-top: 1em" valign="top"><i>magic</i></p> + +<p style="margin-left:20%; margin-top: 1em">The magic field +holds the five characters ‘‘ustar’’ +followed by a space. Note that POSIX ustar archives have a +trailing null.</p> + +<p style="margin-top: 1em" valign="top"><i>version</i></p> + +<p style="margin-left:20%;">The version field holds a space +character followed by a null. Note that POSIX ustar archives +use two copies of the ASCII digit +‘‘0’’.</p> + +<p style="margin-top: 1em" valign="top"><i>atime</i>, +<i>ctime</i></p> + +<p style="margin-left:20%;">The time the file was last +accessed and the time of last change of file information, +stored in octal as with <i>mtime</i>.</p> + + +<p style="margin-top: 1em" valign="top"><i>longnames</i></p> + +<p style="margin-left:20%;">This field is apparently no +longer used.</p> + +<p style="margin-top: 1em" valign="top">Sparse <i>offset / +numbytes</i></p> + +<p style="margin-left:20%;">Each such structure specifies a +single fragment of a sparse file. The two fields store +values as octal numbers. The fragments are each padded to a +multiple of 512 bytes in the archive. On extraction, the +list of fragments is collected from the header (including +any extension headers), and the data is then read and +written to the file at appropriate offsets.</p> + + +<p style="margin-top: 1em" valign="top"><i>isextended</i></p> + +<p style="margin-left:20%;">If this is set to non-zero, the +header will be followed by additional ‘‘sparse +header’’ records. Each such record contains +information about as many as 21 additional sparse blocks as +shown here:</p> + +<p style="margin-left:29%; margin-top: 1em">struct +gnu_sparse_header {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">struct {</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> +</td> +<td width="12%"> + + +<p valign="top">char offset[12];</p></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> +</td> +<td width="12%"> + + +<p valign="top">char numbytes[12];</p></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">} sparse[21];</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">char isextended[1];</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">char padding[7];</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +</table> + +<p style="margin-left:29%;">};</p> + + +<p style="margin-top: 1em" valign="top"><i>realsize</i></p> + +<p style="margin-left:20%;">A binary representation of the +file’s complete size, with a much larger range than +the POSIX file size. In particular, with <b>M</b> type +files, the current entry is only a portion of the file. In +that case, the POSIX size field will indicate the size of +this entry; the <i>realsize</i> field will indicate the +total size of the file.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>GNU tar pax +archives</b> <br> +GNU tar 1.14 (XXX check this XXX) and later will write pax +interchange format archives when you specify the +<b>−-posix</b> flag. This format uses custom keywords +to store sparse file information. There have been three +iterations of this support, referred to as +‘‘0.0’’, +‘‘0.1’’, and +‘‘1.0’’.</p> + + +<p style="margin-top: 1em" valign="top"><b>GNU.sparse.numblocks</b>, +<b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>, +<b>GNU.sparse.size</b></p> + +<p style="margin-left:20%;">The +‘‘0.0’’ format used an initial +<b>GNU.sparse.numblocks</b> attribute to indicate the number +of blocks in the file, a pair of <b>GNU.sparse.offset</b> +and <b>GNU.sparse.numbytes</b> to indicate the offset and +size of each block, and a single <b>GNU.sparse.size</b> to +indicate the full size of the file. This is not the same as +the size in the tar header because the latter value does not +include the size of any holes. This format required that the +order of attributes be preserved and relied on readers +accepting multiple appearances of the same attribute names, +which is not officially permitted by the standards.</p> + + +<p style="margin-top: 1em" valign="top"><b>GNU.sparse.map</b></p> + +<p style="margin-left:20%;">The +‘‘0.1’’ format used a single +attribute that stored a comma-separated list of decimal +numbers. Each pair of numbers indicated the offset and size, +respectively, of a block of data. This does not work well if +the archive is extracted by an archiver that does not +recognize this extension, since many pax implementations +simply discard unrecognized attributes.</p> + + +<p style="margin-top: 1em" valign="top"><b>GNU.sparse.major</b>, +<b>GNU.sparse.minor</b>, <b>GNU.sparse.name</b>, +<b>GNU.sparse.realsize</b></p> + +<p style="margin-left:20%;">The +‘‘1.0’’ format stores the sparse +block map in one or more 512-byte blocks prepended to the +file data in the entry body. The pax attributes indicate the +existence of this map (via the <b>GNU.sparse.major</b> and +<b>GNU.sparse.minor</b> fields) and the full size of the +file. The <b>GNU.sparse.name</b> holds the true name of the +file. To avoid confusion, the name stored in the regular tar +header is a modified name so that extraction errors will be +apparent to users.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Solaris +Tar</b> <br> +XXX More Details Needed XXX</p> + +<p style="margin-left:8%; margin-top: 1em">Solaris tar +(beginning with SunOS XXX 5.7 ?? XXX) supports an +‘‘extended’’ format that is +fundamentally similar to pax interchange format, with the +following differences:</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">Extended attributes are stored +in an entry whose type is <b>X</b>, not <b>x</b>, as used by +pax interchange format. The detailed format of this entry +appears to be the same as detailed above for the <b>x</b> +entry.</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">An additional <b>A</b> entry is +used to store an ACL for the following regular entry. The +body of this entry contains a seven-digit octal number +followed by a zero byte, followed by the textual ACL +description. The octal value is the number of ACL entries +plus a constant that indicates the ACL type: 01000000 for +POSIX.1e ACLs and 03000000 for NFSv4 ACLs.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>AIX Tar</b> +<br> +XXX More details needed XXX</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Mac OS X +Tar</b> <br> +The tar distributed with Apple’s Mac OS X stores most +regular files as two separate entries in the tar archive. +The two entries have the same name except that the first one +has ‘‘._’’ added to the beginning of +the name. This first entry stores the ‘‘resource +fork’’ with additional attributes for the file. +The Mac OS X <b>CopyFile</b>() API is used to separate a +file on disk into separate resource and data streams and to +reassemble those separate streams when the file is restored +to disk.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Other +Extensions</b> <br> +One obvious extension to increase the size of files is to +eliminate the terminating characters from the various +numeric fields. For example, the standard only allows the +size field to contain 11 octal digits, reserving the twelfth +byte for a trailing NUL character. Allowing 12 octal digits +allows file sizes up to 64 GB.</p> + +<p style="margin-left:8%; margin-top: 1em">Another +extension, utilized by GNU tar, star, and other newer +<b>tar</b> implementations, permits binary numbers in the +standard numeric fields. This is flagged by setting the high +bit of the first byte. This permits 95-bit values for the +length and time fields and 63-bit values for the uid, gid, +and device numbers. GNU tar supports this extension for the +length, mtime, ctime, and atime fields. Joerg +Schilling’s star program supports this extension for +all numeric fields. Note that this extension is largely +obsoleted by the extended attribute record provided by the +pax interchange format.</p> + +<p style="margin-left:8%; margin-top: 1em">Another early +GNU extension allowed base-64 values rather than octal. This +extension was short-lived and is no longer supported by any +implementation.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">ar(1), pax(1), tar(1)</p> + + +<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p> + +<p style="margin-left:8%;">The <b>tar</b> utility is no +longer a part of POSIX or the Single Unix Standard. It last +appeared in Version 2 of the Single UNIX Specification +(‘‘SUSv2’’). It has been supplanted +in subsequent standards by pax(1). The ustar format is +currently part of the specification for the pax(1) utility. +The pax interchange file format is new with IEEE Std +1003.1-2001 (‘‘POSIX.1’’).</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">A <b>tar</b> command appeared in +Seventh Edition Unix, which was released in January, 1979. +It replaced the <b>tp</b> program from Fourth Edition Unix +which in turn replaced the <b>tap</b> program from First +Edition Unix. John Gilmore’s <b>pdtar</b> +public-domain implementation (circa 1987) was highly +influential and formed the basis of <b>GNU tar</b> (circa +1988). Joerg Shilling’s <b>star</b> archiver is +another open-source (GPL) archiver (originally developed +circa 1985) which features complete support for pax +interchange format.</p> + +<p style="margin-left:8%; margin-top: 1em">This +documentation was written as part of the <b>libarchive</b> +and <b>bsdtar</b> project by Tim Kientzle +⟨kientzle@FreeBSD.org⟩.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +December 27, 2009 FreeBSD 9.0</p> +<hr> +</body> +</html> diff --git a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf Binary files differindex 42909533a0c..eaa2afc654b 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf Binary files differindex ba4872238e6..f05e044e311 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf Binary files differindex f9461b43488..47404f56d5a 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf Binary files differindex d16ce97542f..1632e4f0ed1 100644 --- a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf Binary files differindex 79ae932abd6..79240809cdc 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf Binary files differindex d6c00f2ceda..8a95c34d664 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf Binary files differindex 6f17fb33217..f7ee09ead53 100644 --- a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf +++ b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf diff --git a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf Binary files differindex d3efa608c41..05a776073ff 100644 --- a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf +++ b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf diff --git a/archivers/libarchive/files/doc/pdf/cpio.5.pdf b/archivers/libarchive/files/doc/pdf/cpio.5.pdf Binary files differindex 00c1609289c..1bac1f52a95 100644 --- a/archivers/libarchive/files/doc/pdf/cpio.5.pdf +++ b/archivers/libarchive/files/doc/pdf/cpio.5.pdf diff --git a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf Binary files differindex c910b03ece8..a403be706fe 100644 --- a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf +++ b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf diff --git a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf Binary files differindex 0d0b84e6bc6..30d30bba433 100644 --- a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf +++ b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf Binary files differindex 6e55682a9c6..247aa9ba56e 100644 --- a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf +++ b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/mtree.5.pdf b/archivers/libarchive/files/doc/pdf/mtree.5.pdf Binary files differindex cdc2d3599d7..67584ba42af 100644 --- a/archivers/libarchive/files/doc/pdf/mtree.5.pdf +++ b/archivers/libarchive/files/doc/pdf/mtree.5.pdf diff --git a/archivers/libarchive/files/doc/pdf/tar.5.pdf b/archivers/libarchive/files/doc/pdf/tar.5.pdf Binary files differindex 6b96055e32f..5ff69d37d67 100644 --- a/archivers/libarchive/files/doc/pdf/tar.5.pdf +++ b/archivers/libarchive/files/doc/pdf/tar.5.pdf diff --git a/archivers/libarchive/files/doc/text/archive_entry.3.txt b/archivers/libarchive/files/doc/text/archive_entry.3.txt index 26ad4ab6dba..2c9dc549d94 100644 --- a/archivers/libarchive/files/doc/text/archive_entry.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry.3.txt @@ -1,4 +1,4 @@ -archive_entry(3) NetBSD Library Functions Manual archive_entry(3) +archive_entry(3) FreeBSD Library Functions Manual archive_entry(3) NAME archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, @@ -259,7 +259,7 @@ SYNOPSIS DESCRIPTION These functions create and manipulate data objects that represent entries - within an archive. You can think of a struct archive_entry as a heavy- + within an archive. You can think of a struct archive_entry as a heavy- duty version of struct stat: it includes everything from struct stat plus associated pathname, textual group and user names, etc. These objects are used by libarchive(3) to represent the metadata associated with a @@ -302,7 +302,7 @@ DESCRIPTION There are a few set/get functions that merit additional description: archive_entry_set_link() - This function sets the symlink field if it is already set. Oth- + This function sets the symlink field if it is already set. Oth- erwise, it sets the hardlink field. File Flags @@ -326,7 +326,7 @@ DESCRIPTION Converting a bitmap to a textual string is a platform-specific operation; bits that are not meaningful on the current platform will be ignored. - The canonical text format is a comma-separated list of flag names. The + The canonical text format is a comma-separated list of flag names. The archive_entry_copy_fflags_text() and archive_entry_copy_fflags_text_w() functions parse the provided text and sets the internal bitmap values. This is a platform-specific operation; names that are not meaningful on @@ -342,7 +342,7 @@ DESCRIPTION An ``Access Control List'' (ACL) is a list of permissions that grant access to particular users or groups beyond what would normally be pro- - vided by standard POSIX mode bits. The ACL handling here addresses some + vided by standard POSIX mode bits. The ACL handling here addresses some deficiencies in the POSIX.1e draft 17 ACL specification. In particular, POSIX.1e draft 17 specifies several different formats, but none of those formats include both textual user/group names and numeric UIDs/GIDs. @@ -358,4 +358,4 @@ HISTORY AUTHORS The libarchive library was written by Tim Kientzle <kientzle@acm.org>. -NetBSD 5.0 May 12, 2008 NetBSD 5.0 +FreeBSD 9.0 May 12, 2008 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/archive_read.3.txt b/archivers/libarchive/files/doc/text/archive_read.3.txt index fa81da5bdfd..f86bf837693 100644 --- a/archivers/libarchive/files/doc/text/archive_read.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read.3.txt @@ -1,4 +1,4 @@ -archive_read(3) NetBSD Library Functions Manual archive_read(3) +archive_read(3) FreeBSD Library Functions Manual archive_read(3) NAME archive_read_new, archive_read_set_filter_options, @@ -163,7 +163,7 @@ DESCRIPTION These functions provide a complete API for reading streaming archives. The general process is to first create the struct archive object, set options, initialize the reader, iterate over the archive headers and - associated data, then close the archive and release all resources. The + associated data, then close the archive and release all resources. The following summary describes the functions in approximately the order they would be used: archive_read_new() @@ -239,7 +239,7 @@ DESCRIPTION The currently supported options are: Format iso9660 - joliet Support Joliet extensions. Defaults to enabled, + joliet Support Joliet extensions. Defaults to enabled, use !joliet to disable. archive_read_open() The same as archive_read_open2(), except that the skip callback @@ -258,7 +258,7 @@ DESCRIPTION other devices that require strict I/O blocking. archive_read_open_fd() Like archive_read_open(), except that it accepts a file descrip- - tor and block size rather than a set of function pointers. Note + tor and block size rather than a set of function pointers. Note that the file descriptor will not be automatically closed at end- of-archive. This function is safe for use with tape drives or other blocked devices. @@ -314,7 +314,7 @@ DESCRIPTION invokes archive_write_disk_set_options(3), archive_write_header(3), archive_write_data(3), and archive_write_finish_entry(3) to create the entry on disk and - copy data into it. The flags argument is passed unmodified to + copy data into it. The flags argument is passed unmodified to archive_write_disk_set_options(3). archive_read_extract2() This is another version of archive_read_extract() that allows you @@ -345,9 +345,9 @@ DESCRIPTION libarchive 2.0. Note that the library determines most of the relevant information about - the archive by inspection. In particular, it automatically detects + the archive by inspection. In particular, it automatically detects gzip(1) or bzip2(1) compression and transparently performs the appropri- - ate decompression. It also automatically detects the archive format. + ate decompression. It also automatically detects the archive format. A complete description of the struct archive and struct archive_entry objects can be found in the overview manual page for libarchive(3). @@ -493,4 +493,4 @@ BUGS format of an empty file by inspecting the contents, so this library treats empty files as having a special ``empty'' format. -NetBSD 5.0 April 13, 2009 NetBSD 5.0 +FreeBSD 9.0 April 13, 2009 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/archive_read_disk.3.txt b/archivers/libarchive/files/doc/text/archive_read_disk.3.txt index 147dd76d796..b787d0c1894 100644 --- a/archivers/libarchive/files/doc/text/archive_read_disk.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_disk.3.txt @@ -1,4 +1,4 @@ -archive_read_disk(3) NetBSD Library Functions Manual archive_read_disk(3) +archive_read_disk(3) FreeBSD Library Functions Manual archive_read_disk(3) NAME archive_read_disk_new, archive_read_disk_set_symlink_logical, @@ -84,7 +84,7 @@ DESCRIPTION This convenience function installs a standard set of user and group name lookup functions. These functions use getpwid(3) and getgrid(3) to convert ids to names, defaulting to NULL if the - names cannot be looked up. These functions also implement a sim- + names cannot be looked up. These functions also implement a sim- ple memory cache to reduce the number of calls to getpwid(3) and getgrid(3). @@ -201,4 +201,4 @@ BUGS such methods are implemented, the ``hybrid'' symbolic link mode will make sense. -NetBSD 5.0 March 10, 2009 NetBSD 5.0 +FreeBSD 9.0 March 10, 2009 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/archive_util.3.txt b/archivers/libarchive/files/doc/text/archive_util.3.txt index 0cc4c43248b..e60707e9003 100644 --- a/archivers/libarchive/files/doc/text/archive_util.3.txt +++ b/archivers/libarchive/files/doc/text/archive_util.3.txt @@ -1,4 +1,4 @@ -archive_util(3) NetBSD Library Functions Manual archive_util(3) +archive_util(3) FreeBSD Library Functions Manual archive_util(3) NAME archive_clear_error, archive_compression, archive_compression_name, @@ -47,7 +47,7 @@ DESCRIPTION Clears any error information left over from a previous call. Not generally used in client code. archive_compression() - Returns a numeric code indicating the current compression. This + Returns a numeric code indicating the current compression. This value is set by archive_read_open(). archive_compression_name() Returns a text description of the current compression suitable @@ -80,7 +80,7 @@ DESCRIPTION returned by archive_errno() and archive_error_string(). This function should be used within I/O callbacks to set system-spe- cific error codes and error descriptions. This function accepts - a printf-like format string and arguments. However, you should + a printf-like format string and arguments. However, you should be careful to use only the following printf format specifiers: ``%c'', ``%d'', ``%jd'', ``%jo'', ``%ju'', ``%jx'', ``%ld'', ``%lo'', ``%lu'', ``%lx'', ``%o'', ``%u'', ``%s'', ``%x'', @@ -96,4 +96,4 @@ HISTORY AUTHORS The libarchive library was written by Tim Kientzle <kientzle@acm.org>. -NetBSD 5.0 January 8, 2005 NetBSD 5.0 +FreeBSD 9.0 January 8, 2005 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/archive_write.3.txt b/archivers/libarchive/files/doc/text/archive_write.3.txt index e17c79558ec..ca9c5394848 100644 --- a/archivers/libarchive/files/doc/text/archive_write.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write.3.txt @@ -1,4 +1,4 @@ -archive_write(3) NetBSD Library Functions Manual archive_write(3) +archive_write(3) FreeBSD Library Functions Manual archive_write(3) NAME archive_write_new, archive_write_set_format_cpio, @@ -134,7 +134,7 @@ DESCRIPTION archive_write_get_bytes_per_block() Retrieve the block size to be used for writing. A value of -1 - here indicates that the library should use default values. A + here indicates that the library should use default values. A value of zero indicates that internal blocking is suppressed. archive_write_set_bytes_in_last_block() @@ -159,7 +159,7 @@ DESCRIPTION archive_write_set_format_shar(), archive_write_set_format_shar_binary(), archive_write_set_format_ustar() - Sets the format that will be used for the archive. The library + Sets the format that will be used for the archive. The library can write POSIX octet-oriented cpio format archives, POSIX-stan- dard ``pax interchange'' format archives, traditional ``shar'' archives, enhanced ``binary'' shar archives that store a variety @@ -262,7 +262,7 @@ DESCRIPTION archive_write_open_filename() will adjust the last-block padding depending on the file: it will enable padding when writing to standard output or to a character or block device node, it will - disable padding otherwise. You can override this by manually + disable padding otherwise. You can override this by manually invoking archive_write_set_bytes_in_last_block() before calling archive_write_open(). The archive_write_open_filename() function is safe for use with tape drives or other block-oriented devices. @@ -309,7 +309,7 @@ IMPLEMENTATION CLIENT CALLBACKS To use this library, you will need to define and register callback func- - tions that will be invoked to write data to the resulting archive. These + tions that will be invoked to write data to the resulting archive. These functions are registered by calling archive_write_open(): typedef int archive_open_callback(struct archive *, void @@ -325,7 +325,7 @@ CLIENT CALLBACKS The write callback is invoked whenever the library needs to write raw bytes to the archive. For correct blocking, each call to the write call- - back function should translate into a single write(2) system call. This + back function should translate into a single write(2) system call. This is especially critical when writing archives to tape drives. On success, the write callback should return the number of bytes actually written. On error, the callback should invoke archive_set_error() to register an @@ -466,7 +466,7 @@ AUTHORS BUGS There are many peculiar bugs in historic tar implementations that may - cause certain programs to reject archives written by this library. For + cause certain programs to reject archives written by this library. For example, several historic implementations calculated header checksums incorrectly and will thus reject valid archives; GNU tar does not fully support pax interchange format; some old tar implementations required @@ -483,4 +483,4 @@ BUGS correctly restore device nodes with large device numbers from archives created by this library. -NetBSD 5.0 May 11, 2008 NetBSD 5.0 +FreeBSD 9.0 May 11, 2008 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/archive_write_disk.3.txt b/archivers/libarchive/files/doc/text/archive_write_disk.3.txt index 69eb9de452f..fe8c28e8cdc 100644 --- a/archivers/libarchive/files/doc/text/archive_write_disk.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_disk.3.txt @@ -1,4 +1,4 @@ -archive_write_disk(3) NetBSD Library Functions Manual archive_write_disk(3) +archive_write_disk(3) FreeBSD Library Functions Manual archive_write_disk(3) NAME archive_write_disk_new, archive_write_disk_set_options, @@ -50,11 +50,11 @@ SYNOPSIS DESCRIPTION These functions provide a complete API for creating objects on disk from - struct archive_entry descriptions. They are most naturally used when + struct archive_entry descriptions. They are most naturally used when extracting objects from an archive using the archive_read() interface. The general process is to read struct archive_entry objects from an ar- chive, then write those objects to a struct archive object created using - the archive_write_disk() family functions. This interface is deliber- + the archive_write_disk() family functions. This interface is deliber- ately very similar to the archive_write() interface used to write objects to a streaming archive. @@ -79,7 +79,7 @@ DESCRIPTION ARCHIVE_EXTRACT_PERM Full permissions (including SGID, SUID, and sticky bits) should be restored exactly as specified, without obeying - the current umask. Note that SUID and SGID bits can only + the current umask. Note that SUID and SGID bits can only be restored if the user and group ID of the object on disk are correct. If ARCHIVE_EXTRACT_OWNER is not speci- fied, then SUID and SGID bits will only be restored if @@ -150,7 +150,7 @@ DESCRIPTION This convenience function installs a standard set of user and group lookup functions. These functions use getpwnam(3) and getgrnam(3) to convert names to ids, defaulting to the ids if the - names cannot be looked up. These functions also implement a sim- + names cannot be looked up. These functions also implement a sim- ple memory cache to reduce the number of calls to getpwnam(3) and getgrnam(3). @@ -181,7 +181,7 @@ DESCRIPTION Invokes archive_write_close() if it was not invoked manually, then releases all resources. More information about the struct archive object and the overall design - of the library can be found in the libarchive(3) overview. Many of these + of the library can be found in the libarchive(3) overview. Many of these functions are also documented under archive_write(3). RETURN VALUES @@ -212,7 +212,7 @@ AUTHORS The libarchive library was written by Tim Kientzle <kientzle@acm.org>. BUGS - Directories are actually extracted in two distinct phases. Directories + Directories are actually extracted in two distinct phases. Directories are created during archive_write_header(), but final permissions are not set until archive_write_close(). This separation is necessary to cor- rectly handle borderline cases such as a non-writable directory contain- @@ -225,7 +225,7 @@ BUGS The library attempts to create objects with filenames longer than PATH_MAX by creating prefixes of the full path and changing the current - directory. Currently, this logic is limited in scope; the fixup pass + directory. Currently, this logic is limited in scope; the fixup pass does not work correctly for such objects and the symlink security check option disables the support for very long pathnames. @@ -242,7 +242,7 @@ BUGS SGID and SUID bits are restored only if the correct user and group could be set. If ARCHIVE_EXTRACT_OWNER is not specified, then no attempt is - made to set the ownership. In this case, SGID and SUID bits are restored + made to set the ownership. In this case, SGID and SUID bits are restored only if the user and group of the final object happen to match those specified in the entry. @@ -254,4 +254,4 @@ BUGS There should be a corresponding archive_read_disk interface that walks a directory heirarchy and returns archive entry objects. -NetBSD 5.0 August 5, 2008 NetBSD 5.0 +FreeBSD 9.0 August 5, 2008 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/bsdcpio.1.txt b/archivers/libarchive/files/doc/text/bsdcpio.1.txt index c8362b2eebb..069a48eda37 100644 --- a/archivers/libarchive/files/doc/text/bsdcpio.1.txt +++ b/archivers/libarchive/files/doc/text/bsdcpio.1.txt @@ -1,4 +1,4 @@ -BSDCPIO(1) NetBSD General Commands Manual BSDCPIO(1) +BSDCPIO(1) FreeBSD General Commands Manual BSDCPIO(1) NAME cpio -- copy files to and from archives @@ -14,39 +14,39 @@ DESCRIPTION and can create tar, pax, cpio, ar, and shar archives. The first option to cpio is a mode indicator from the following list: - -i Input. Read an archive from standard input (unless overriden) + -i Input. Read an archive from standard input (unless overriden) and extract the contents to disk or (if the -t option is speci- fied) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted. - -o Output. Read a list of filenames from standard input and produce + -o Output. Read a list of filenames from standard input and produce a new archive on standard output (unless overriden) containing the specified items. - -p Pass-through. Read a list of filenames from standard input and + -p Pass-through. Read a list of filenames from standard input and copy the files to the specified directory. OPTIONS Unless specifically stated otherwise, options are applicable in all oper- ating modes. - -0 Read filenames separated by NUL characters instead of newlines. + -0 Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might con- tain newlines. - -A (o mode only) Append to the specified archive. (Not yet imple- + -A (o mode only) Append to the specified archive. (Not yet imple- mented.) - -a (o and p modes) Reset access times on files after they are read. + -a (o and p modes) Reset access times on files after they are read. - -B (o mode only) Block output to records of 5120 bytes. + -B (o mode only) Block output to records of 5120 bytes. -C size (o mode only) Block output to records of size bytes. - -c (o mode only) Use the old POSIX portable character format. + -c (o mode only) Use the old POSIX portable character format. Equivalent to --format odc. - -d (i and p modes) Create directories as necessary. + -d (i and p modes) Create directories as necessary. -E file (i mode only) Read list of file name patterns from file to list @@ -69,7 +69,7 @@ OPTIONS mat. ustar The POSIX.1 tar format. - The default format is odc. See libarchive_formats(5) for more + The default format is odc. See libarchive_formats(5) for more complete information about the formats currently supported by the underlying libarchive(3) library. @@ -82,35 +82,35 @@ OPTIONS -I file Read archive from file. - -i Input mode. See above for description. + -i Input mode. See above for description. --insecure (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links and path names containing `..' in the name. - -J (o mode only) Compress the file with xz-compatible compression - before writing it. In input mode, this option is ignored; xz + -J (o mode only) Compress the file with xz-compatible compression + before writing it. In input mode, this option is ignored; xz compression is recognized automatically on input. - -j Synonym for -y. + -j Synonym for -y. - -L (o and p modes) All symbolic links will be followed. Normally, + -L (o and p modes) All symbolic links will be followed. Normally, symbolic links are archived and copied as symbolic links. With this option, the target of the link will be archived or copied instead. - -l (p mode only) Create links from the target directory to the orig- + -l (p mode only) Create links from the target directory to the orig- inal files, instead of copying. -lzma (o mode only) Compress the file with lzma-compatible compression - before writing it. In input mode, this option is ignored; lzma + before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input. - -m (i and p modes) Set file modification time on created files to + -m (i and p modes) Set file modification time on created files to match those in the source. - -n (i mode, only with -t) Display numeric uid and gid. By default, + -n (i mode, only with -t) Display numeric uid and gid. By default, cpio displays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. @@ -122,9 +122,9 @@ OPTIONS -O file Write archive to file. - -o Output mode. See above for description. + -o Output mode. See above for description. - -p Pass-through mode. See above for description. + -p Pass-through mode. See above for description. -preserve-owner (i mode only) Restore file ownership. This is the default when @@ -134,44 +134,44 @@ OPTIONS Suppress unnecessary messages. -R [user][:][group] - Set the owner and/or group on files in the output. If group is + Set the owner and/or group on files in the output. If group is specified with no user (for example, -R :wheel) then the group will be set but not the user. If the user is specified with a trailing colon and no group (for example, -R root:) then the group will be set to the user's default group. If the user is specified with no trailing colon, then the user will be set but not the group. In -i and -p modes, this option can only be used - by the super-user. (For compatibility, a period can be used in + by the super-user. (For compatibility, a period can be used in place of the colon.) - -r (All modes.) Rename files interactively. For each file, a + -r (All modes.) Rename files interactively. For each file, a prompt is written to /dev/tty containing the name of the file and a line is read from /dev/tty. If the line read is blank, the file is skipped. If the line contains a single period, the file is processed normally. Otherwise, the line is taken to be the new name of the file. - -t (i mode only) List the contents of the archive to stdout; do not + -t (i mode only) List the contents of the archive to stdout; do not restore the contents to disk. - -u (i and p modes) Unconditionally overwrite existing files. Ordi- + -u (i and p modes) Unconditionally overwrite existing files. Ordi- narily, an older file will not overwrite a newer file on disk. - -v Print the name of each file to stderr as it is processed. With + -v Print the name of each file to stderr as it is processed. With -t, provide a detailed listing of each file. --version Print the program version information and exit. - -y (o mode only) Compress the archive with bzip2-compatible compres- + -y (o mode only) Compress the archive with bzip2-compatible compres- sion before writing it. In input mode, this option is ignored; bzip2 compression is recognized automatically on input. - -Z (o mode only) Compress the archive with compress-compatible com- + -Z (o mode only) Compress the archive with compress-compatible com- pression before writing it. In input mode, this option is ignored; compression is recognized automatically on input. - -z (o mode only) Compress the archive with gzip-compatible compres- + -z (o mode only) Compress the archive with gzip-compatible compres- sion before writing it. In input mode, this option is ignored; gzip compression is recognized automatically on input. @@ -180,7 +180,7 @@ ENVIRONMENT LANG The locale to use. See environ(7) for more information. - TZ The timezone to use when displaying dates. See environ(7) for + TZ The timezone to use when displaying dates. See environ(7) for more information. EXIT STATUS @@ -188,7 +188,7 @@ EXIT STATUS EXAMPLES The cpio command is traditionally used to copy file heirarchies in con- - junction with the find(1) command. The first example here simply copies + junction with the find(1) command. The first example here simply copies all files from src to dest: find src | cpio -pmud dest @@ -242,9 +242,9 @@ BUGS The cpio archive format has several basic limitations: It does not store user and group names, only numbers. As a result, it cannot be reliably used to transfer files between systems with dissimilar user and group - numbering. Older cpio formats limit the user and group numbers to 16 or - 18 bits, which is insufficient for modern systems. The cpio archive for- + numbering. Older cpio formats limit the user and group numbers to 16 or + 18 bits, which is insufficient for modern systems. The cpio archive for- mats cannot support files over 4 gigabytes, except for the ``odc'' vari- ant, which can support files up to 8 gigabytes. -NetBSD 5.0 December 21, 2007 NetBSD 5.0 +FreeBSD 9.0 December 21, 2007 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/bsdtar.1.txt b/archivers/libarchive/files/doc/text/bsdtar.1.txt index cc7eecffac0..282a58afdaa 100644 --- a/archivers/libarchive/files/doc/text/bsdtar.1.txt +++ b/archivers/libarchive/files/doc/text/bsdtar.1.txt @@ -1,4 +1,4 @@ -BSDTAR(1) NetBSD General Commands Manual BSDTAR(1) +BSDTAR(1) FreeBSD General Commands Manual BSDTAR(1) NAME tar -- manipulate tape archives @@ -18,18 +18,18 @@ DESCRIPTION provided for compatibility with historical implementations. See COMPATI- BILITY below for details. - The other synopsis forms show the preferred usage. The first option to + The other synopsis forms show the preferred usage. The first option to tar is a mode indicator from the following list: - -c Create a new archive containing the specified items. - -r Like -c, but new entries are appended to the archive. Note that + -c Create a new archive containing the specified items. + -r Like -c, but new entries are appended to the archive. Note that this only works on uncompressed archives stored in regular files. The -f option is required. - -t List archive contents to stdout. - -u Like -r, but new entries are added only if they have a modifica- + -t List archive contents to stdout. + -u Like -r, but new entries are added only if they have a modifica- tion date newer than the corresponding entry in the archive. Note that this only works on uncompressed archives stored in reg- ular files. The -f option is required. - -x Extract to disk from the archive. If a file with the same name + -x Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. @@ -101,13 +101,13 @@ OPTIONS not specified, the default tape device will be used. (On FreeBSD, the default tape device is /dev/sa0.) - -H (c and r mode only) Symbolic links named on the command line will + -H (c and r mode only) Symbolic links named on the command line will be followed; the target of the link will be archived, not the link itself. - -h (c and r mode only) Synonym for -L. + -h (c and r mode only) Synonym for -L. - -I Synonym for -T. + -I Synonym for -T. --include pattern Process only files or directories that match the specified pat- @@ -120,12 +120,12 @@ OPTIONS creates a new archive new.tar containing only the entries from old.tgz containing the string `foo'. - -j (c mode only) Compress the resulting archive with bzip2(1). In + -j (c mode only) Compress the resulting archive with bzip2(1). In extract or list modes, this option is ignored. Note that, unlike other tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. - -k (x mode only) Do not overwrite existing files. In particular, if + -k (x mode only) Do not overwrite existing files. In particular, if a file appears more than once in an archive, later copies will not overwrite earlier copies. @@ -133,16 +133,16 @@ OPTIONS (x mode only) Do not overwrite existing files that are newer than the versions appearing in the archive being extracted. - -L (c and r mode only) All symbolic links will be followed. Nor- + -L (c and r mode only) All symbolic links will be followed. Nor- mally, symbolic links are archived as such. With this option, the target of the link will be archived instead. - -l This is a synonym for the --check-links option. + -l This is a synonym for the --check-links option. - -m (x mode only) Do not extract modification time. By default, the + -m (x mode only) Do not extract modification time. By default, the modification time is set to the time stored in the archive. - -n (c, r, u modes only) Do not recursively archive the contents of + -n (c, r, u modes only) Do not recursively archive the contents of directories. --newer date @@ -173,19 +173,19 @@ OPTIONS (x mode only) Ignore symbolic user and group names when restoring archives to disk, only numeric uid and gid values will be obeyed. - -O (x, t modes only) In extract (-x) mode, files will be written to + -O (x, t modes only) In extract (-x) mode, files will be written to standard out rather than being extracted to disk. In list (-t) mode, the file listing will be written to stderr rather than the usual stdout. - -o (x mode) Use the user and group of the user running the program + -o (x mode) Use the user and group of the user running the program rather than those specified in the archive. Note that this has no significance unless -p is specified, and the program is being run by the root user. In this case, the file modes and flags from the archive will be restored, but ACLs or owner information in the archive will be discarded. - -o (c, r, u mode) A synonym for --format ustar + -o (c, r, u mode) A synonym for --format ustar --one-file-system (c, r, and u modes) Do not cross mount points. @@ -209,7 +209,7 @@ OPTIONS provided only to modules whose name matches module. The currently supported modules and keys are: iso9660:joliet - Support Joliet extensions. This is enabled by default, + Support Joliet extensions. This is enabled by default, use !joliet or iso9660:!joliet to disable. iso9660:rockridge Support Rock Ridge extensions. This is enabled by @@ -229,7 +229,7 @@ OPTIONS lent to: ``device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname''. mtree:all - Enables all of the above keywords. You can also use + Enables all of the above keywords. You can also use mtree:!all to disable all keywords. mtree:use-set Enable generation of /set lines in the output. @@ -242,14 +242,14 @@ OPTIONS If a provided option is not supported by any module, that is a fatal error. - -P Preserve pathnames. By default, absolute pathnames (those that + -P Preserve pathnames. By default, absolute pathnames (those that begin with a / character) have the leading slash removed both when creating archives and extracting from them. Also, tar will refuse to extract archive entries whose pathnames contain .. or whose target directory would be altered by a symlink. This option suppresses these behaviors. - -p (x mode only) Preserve file permissions. Attempt to restore the + -p (x mode only) Preserve file permissions. Attempt to restore the full permissions, including owner, file modes, file flags and ACLs, if available, for each item extracted from the archive. By default, newly-created files are owned by the user running tar, @@ -264,12 +264,12 @@ OPTIONS each specified pattern or filename has been matched. By default, the archive is always read to the very end, since there can be multiple entries with the same name and, by convention, later - entries overwrite earlier entries. This option is provided as a + entries overwrite earlier entries. This option is provided as a performance optimization. - -S (x mode only) Extract files as sparse files. For every block on + -S (x mode only) Extract files as sparse files. For every block on disk, check first if it contains only NULL bytes and seek over it - otherwise. This works similiar to the conv=sparse option of dd. + otherwise. This works similiar to the conv=sparse option of dd. --strip-components count (x mode only) Remove the specified number of leading path ele- @@ -301,9 +301,9 @@ OPTIONS unless --null is specified. Note that --null also disables the special handling of lines containing ``-C''. - -U (x mode only) Unlink files before creating them. Without this + -U (x mode only) Unlink files before creating them. Without this option, tar overwrites existing files, which preserves existing - hardlinks. With this option, existing hardlinks will be broken, + hardlinks. With this option, existing hardlinks will be broken, as will any symlink that would affect the location of an extracted file. @@ -311,7 +311,7 @@ OPTIONS Pipe the input (in x or t mode) or the output (in c mode) through program instead of using the builtin compression support. - -v Produce verbose output. In create and extract modes, tar will + -v Produce verbose output. In create and extract modes, tar will list each file name as it is read from or written to the archive. In list mode, tar will produce output similar to that of ls(1). Additional -v options will provide additional detail. @@ -319,23 +319,23 @@ OPTIONS --version Print version of tar and libarchive, and exit. - -w Ask for confirmation for every action. + -w Ask for confirmation for every action. -X filename - Read a list of exclusion patterns from the specified file. See + Read a list of exclusion patterns from the specified file. See --exclude for more information about the handling of exclusions. - -y (c mode only) Compress the resulting archive with bzip2(1). In + -y (c mode only) Compress the resulting archive with bzip2(1). In extract or list modes, this option is ignored. Note that, unlike other tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. - -z (c mode only) Compress the resulting archive with gzip(1). In + -z (c mode only) Compress the resulting archive with gzip(1). In extract or list modes, this option is ignored. Note that, unlike other tar implementations, this implementation recognizes gzip compression automatically when reading archives. - -Z (c mode only) Compress the resulting archive with compress(1). + -Z (c mode only) Compress the resulting archive with compress(1). In extract or list modes, this option is ignored. Note that, unlike other tar implementations, this implementation recognizes compress compression automatically when reading archives. @@ -347,7 +347,7 @@ ENVIRONMENT TAPE The default tape device. The -f option overrides this. - TZ The timezone to use when displaying dates. See environ(7) for + TZ The timezone to use when displaying dates. See environ(7) for more information. FILES @@ -380,7 +380,7 @@ EXAMPLES include directory change instructions of the form -Cfoo/baz and archive inclusions of the form @archive-file. For example, the command line tar -c -f new.tar foo1 @old.tgz -C/tmp foo2 - will create a new archive new.tar. tar will read the file foo1 from the + will create a new archive new.tar. tar will read the file foo1 from the current directory and add it to the output archive. It will then read each entry from old.tgz and add those entries to the output archive. Finally, it will switch to the /tmp directory and add foo2 to the output @@ -417,7 +417,7 @@ COMPATIBILITY separate words. The order of the arguments must match the order of the corresponding characters in the bundled command word. For example, tar tbf 32 file.tar - specifies three flags t, b, and f. The b and f flags both require argu- + specifies three flags t, b, and f. The b and f flags both require argu- ments, so there must be two additional items on the command line. The 32 is the argument to the b flag, and file.tar is the argument to the f flag. @@ -442,27 +442,27 @@ SECURITY three ways this can happen. Although tar has mechanisms to protect against each one, savvy users should be aware of the implications: - Archive entries can have absolute pathnames. By default, tar + o Archive entries can have absolute pathnames. By default, tar removes the leading / character from filenames before restoring them to guard against this problem. - Archive entries can have pathnames that include .. components. + o Archive entries can have pathnames that include .. components. By default, tar will not extract files containing .. components in their pathname. - Archive entries can exploit symbolic links to restore files to - other directories. An archive can restore a symbolic link to + o Archive entries can exploit symbolic links to restore files to + other directories. An archive can restore a symbolic link to another directory, then use that link to restore a file into that - directory. To guard against this, tar checks each extracted path + directory. To guard against this, tar checks each extracted path for symlinks. If the final path element is a symlink, it will be removed and replaced with the archive entry. If -U is specified, any intermediate symlink will also be unconditionally removed. If neither -U nor -P is specified, tar will refuse to extract the entry. To protect yourself, you should be wary of any archives that come from - untrusted sources. You should examine the contents of an archive with + untrusted sources. You should examine the contents of an archive with tar -tf filename - before extraction. You should use the -k option to ensure that tar will + before extraction. You should use the -k option to ensure that tar will not overwrite any existing files or the -U option to remove any pre- existing files. You should generally not extract archives while running with super-user privileges. Note that the -P option to tar disables the @@ -477,7 +477,7 @@ SEE ALSO STANDARDS There is no current POSIX standard for the tar command; it appeared in ISO/IEC 9945-1:1996 (``POSIX.1'') but was dropped from IEEE Std - 1003.1-2001 (``POSIX.1''). The options used by this implementation were + 1003.1-2001 (``POSIX.1''). The options used by this implementation were developed by surveying a number of existing tar implementations as well as the old POSIX specification for tar and the current POSIX specifica- tion for pax. @@ -546,4 +546,4 @@ BUGS There are alternative long options for many of the short options that are deliberately not documented. -NetBSD 5.0 Oct 12, 2009 NetBSD 5.0 +FreeBSD 9.0 Oct 12, 2009 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/cpio.5.txt b/archivers/libarchive/files/doc/text/cpio.5.txt index f4802cf2584..1f158fb8a4b 100644 --- a/archivers/libarchive/files/doc/text/cpio.5.txt +++ b/archivers/libarchive/files/doc/text/cpio.5.txt @@ -1,4 +1,4 @@ -CPIO(5) NetBSD File Formats Manual CPIO(5) +CPIO(5) FreeBSD File Formats Manual CPIO(5) NAME cpio -- format of cpio archive files @@ -11,7 +11,7 @@ DESCRIPTION General Format Each file system object in a cpio archive comprises a header record with basic numeric metadata followed by the full pathname of the entry and the - file data. The header record stores a series of integer values that gen- + file data. The header record stores a series of integer values that gen- erally follow the fields in struct stat. (See stat(2) for details.) The variants differ primarily in how they store those integers (binary, octal, or hexadecimal). The header is followed by the pathname of the @@ -98,7 +98,7 @@ DESCRIPTION to four gigabyte file sizes. See mtime above for a description of the storage of four-byte integers. - The pathname immediately follows the fixed header. If the namesize is + The pathname immediately follows the fixed header. If the namesize is odd, an additional NUL byte is added after the pathname. The file data is then appended, padded with NUL bytes to an even length. @@ -113,21 +113,21 @@ DESCRIPTION them as 6-character or 11-character octal values. struct cpio_odc_header { - char c_magic[6]; - char c_dev[6]; - char c_ino[6]; - char c_mode[6]; - char c_uid[6]; - char c_gid[6]; - char c_nlink[6]; - char c_rdev[6]; - char c_mtime[11]; - char c_namesize[6]; - char c_filesize[11]; + char c_magic[6]; + char c_dev[6]; + char c_ino[6]; + char c_mode[6]; + char c_uid[6]; + char c_gid[6]; + char c_nlink[6]; + char c_rdev[6]; + char c_mtime[11]; + char c_namesize[6]; + char c_filesize[11]; }; The fields are identical to those in the old binary format. The name and - file body follow the fixed header. Unlike the old binary format, there + file body follow the fixed header. Unlike the old binary format, there is no additional padding after the pathname or file contents. If the files being archived are themselves entirely ASCII, then the resulting archive will be entirely ASCII, except for the NUL byte that terminates @@ -139,20 +139,20 @@ DESCRIPTION bers. struct cpio_newc_header { - char c_magic[6]; - char c_ino[8]; - char c_mode[8]; - char c_uid[8]; - char c_gid[8]; - char c_nlink[8]; - char c_mtime[8]; - char c_filesize[8]; - char c_devmajor[8]; - char c_devminor[8]; - char c_rdevmajor[8]; - char c_rdevminor[8]; - char c_namesize[8]; - char c_check[8]; + char c_magic[6]; + char c_ino[8]; + char c_mode[8]; + char c_uid[8]; + char c_gid[8]; + char c_nlink[8]; + char c_mtime[8]; + char c_filesize[8]; + char c_devmajor[8]; + char c_devminor[8]; + char c_rdevmajor[8]; + char c_rdevminor[8]; + char c_namesize[8]; + char c_check[8]; }; Except as specified below, the fields here match those specified for the @@ -195,10 +195,10 @@ BUGS cyclic redundancy check. The old binary format is limited to 16 bits for user id, group id, - device, and inode numbers. It is limited to 4 gigabyte file sizes. + device, and inode numbers. It is limited to 4 gigabyte file sizes. The old ASCII format is limited to 18 bits for the user id, group id, - device, and inode numbers. It is limited to 8 gigabyte file sizes. + device, and inode numbers. It is limited to 8 gigabyte file sizes. The new ASCII format is limited to 4 gigabyte file sizes. @@ -223,7 +223,7 @@ STANDARDS HISTORY The original cpio utility was written by Dick Haight while working in - AT&T's Unix Support Group. It appeared in 1977 as part of PWB/UNIX 1.0, + AT&T's Unix Support Group. It appeared in 1977 as part of PWB/UNIX 1.0, the ``Programmer's Work Bench'' derived from Version 6 AT&T UNIX that was used internally at AT&T. Both the old binary and old character formats were in use by 1980, according to the System III source released by SCO @@ -232,4 +232,4 @@ HISTORY appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX -NetBSD 5.0 October 5, 2007 NetBSD 5.0 +FreeBSD 9.0 October 5, 2007 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/libarchive-formats.5.txt b/archivers/libarchive/files/doc/text/libarchive-formats.5.txt index 62df74916e9..dabfe5687b2 100644 --- a/archivers/libarchive/files/doc/text/libarchive-formats.5.txt +++ b/archivers/libarchive/files/doc/text/libarchive-formats.5.txt @@ -1,4 +1,4 @@ -libarchive-formats(5) NetBSD File Formats Manual libarchive-formats(5) +libarchive-formats(5) FreeBSD File Formats Manual libarchive-formats(5) NAME libarchive-formats -- archive formats supported by the libarchive library @@ -41,15 +41,15 @@ DESCRIPTION interchange format archives. Pax interchange format archives are an extension of the older ustar format that adds a separate entry with additional attributes stored as key/value pairs immediately - before each regular entry. The presence of these additional + before each regular entry. The presence of these additional entries is the only difference between pax interchange format and the older ustar format. The extended attributes are of unlimited length and are stored as UTF-8 Unicode strings. Keywords defined in the standard are in all lowercase; vendors are allowed to define custom keys by preceding them with the vendor name in all - uppercase. When writing pax archives, libarchive uses many of + uppercase. When writing pax archives, libarchive uses many of the SCHILY keys defined by Joerg Schilling's ``star'' archiver - and a few LIBARCHIVE keys. The libarchive library can read most + and a few LIBARCHIVE keys. The libarchive library can read most of the SCHILY keys and most of the GNU keys introduced by GNU tar. It silently ignores any keywords that it does not under- stand. @@ -70,16 +70,16 @@ DESCRIPTION ustar The libarchive library can both read and write this format. This format has the following limitations: - Device major and minor numbers are limited to 21 bits. Nodes + o Device major and minor numbers are limited to 21 bits. Nodes with larger numbers will not be added to the archive. - Path names in the archive are limited to 255 bytes. (Shorter + o Path names in the archive are limited to 255 bytes. (Shorter if there is no / character in exactly the right place.) - Symbolic links and hard links are stored in the archive with + o Symbolic links and hard links are stored in the archive with the name of the referenced file. This name is limited to 100 bytes. - Extended attributes, file flags, and other extended security + o Extended attributes, file flags, and other extended security information cannot be stored. - Archive entries are limited to 8 gigabytes in size. + o Archive entries are limited to 8 gigabytes in size. Note that the pax interchange format has none of these restric- tions. @@ -93,7 +93,7 @@ DESCRIPTION Libarchive allows these fields to be written without terminator characters. This extends the allowable range; in particular, ustar archives with this extension can support entries up to 64 - gigabytes in size. Libarchive also recognizes base-256 values in + gigabytes in size. Libarchive also recognizes base-256 values in most numeric fields. This essentially removes all limitations on file size, modification time, and device numbers. @@ -118,7 +118,7 @@ DESCRIPTION binary values of varying byte order and length. binary The libarchive library transparently reads both big-endian and - little-endian variants of the original binary cpio format. This + little-endian variants of the original binary cpio format. This format used 32-bit binary values for file size and mtime, and 16-bit binary values for the other fields. @@ -143,7 +143,7 @@ DESCRIPTION of AT&T in 1981. This makes cpio older than tar, although cpio was not included in Version 7 AT&T Unix. As a result, the tar command became much better known in universities and research groups that used Version - 7. The combination of the find and cpio utilities provided very precise + 7. The combination of the find and cpio utilities provided very precise control over file selection. Unfortunately, the format has many limita- tions that make it unsuitable for widespread use. Only the POSIX format permits files over 4GB, and its 18-bit limit for most other fields makes @@ -167,7 +167,7 @@ DESCRIPTION shardump This format is similar to shar but encodes files using uuencode(1) so that the result will be a plain text file regard- - less of the file contents. It also includes additional shell + less of the file contents. It also includes additional shell commands that attempt to reproduce as many file attributes as possible, including owner, mode, and flags. The additional com- mands used to restore file attributes make shardump archives less @@ -204,7 +204,7 @@ DESCRIPTION primarily in their handling of filenames longer than 15 characters: the GNU/SVR4 variant writes a filename table at the beginning of the archive; the BSD format stores each long filename in an extension area adjacent to - the entry. Libarchive can read both extensions, including archives that + the entry. Libarchive can read both extensions, including archives that may include both types of long filenames. Programs using libarchive can write GNU/SVR4 format if they provide a filename table to be written into the archive before any of the entries. Any entries whose names are not @@ -216,12 +216,12 @@ DESCRIPTION Libarchive can read and write files in mtree(5) format. This format is not a true archive format, but rather a textual description of a file hierarchy in which each line specifies the name of a file and provides - specific metadata about that file. Libarchive can read all of the key- + specific metadata about that file. Libarchive can read all of the key- words supported by both the NetBSD and FreeBSD versions of mtree(1), although many of the keywords cannot currently be stored in an archive_entry object. When writing, libarchive supports use of the archive_write_set_options(3) interface to specify which keywords should - be included in the output. If libarchive was compiled with access to + be included in the output. If libarchive was compiled with access to suitable cryptographic libraries (such as the OpenSSL libraries), it can compute hash entries such as sha512 or md5 from file data being written to the mtree writer. @@ -238,4 +238,4 @@ SEE ALSO ar(1), cpio(1), mkisofs(1), shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5), tar(5) -NetBSD 5.0 December 27, 2009 NetBSD 5.0 +FreeBSD 9.0 December 27, 2009 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/libarchive.3.txt b/archivers/libarchive/files/doc/text/libarchive.3.txt index 875700fc0bb..9d99e70ca8e 100644 --- a/archivers/libarchive/files/doc/text/libarchive.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive.3.txt @@ -1,10 +1,10 @@ -LIBARCHIVE(3) NetBSD Library Functions Manual LIBARCHIVE(3) +LIBARCHIVE(3) FreeBSD Library Functions Manual LIBARCHIVE(3) NAME libarchive -- functions for reading and writing streaming archives LIBRARY - Reading and Writing Streaming Archives Library (libarchive, -larchive) + Streaming Archive Library (libarchive, -larchive) OVERVIEW The libarchive library provides a flexible interface for reading and @@ -16,22 +16,22 @@ OVERVIEW When reading an archive, the library automatically detects the format and the compression. The library currently has read support for: - old-style tar archives, - most variants of the POSIX ``ustar'' format, - the POSIX ``pax interchange'' format, - GNU-format tar archives, - most common cpio archive formats, - ISO9660 CD images (with or without RockRidge extensions), - Zip archives. + o old-style tar archives, + o most variants of the POSIX ``ustar'' format, + o the POSIX ``pax interchange'' format, + o GNU-format tar archives, + o most common cpio archive formats, + o ISO9660 CD images (with or without RockRidge extensions), + o Zip archives. The library automatically detects archives compressed with gzip(1), bzip2(1), or compress(1) and decompresses them transparently. When writing an archive, you can specify the compression to be used and - the format to use. The library can write - POSIX-standard ``ustar'' archives, - POSIX ``pax interchange format'' archives, - POSIX octet-oriented cpio archives, - two different variants of shar archives. + the format to use. The library can write + o POSIX-standard ``ustar'' archives, + o POSIX ``pax interchange format'' archives, + o POSIX octet-oriented cpio archives, + o two different variants of shar archives. Pax interchange format is an extension of the tar archive format that eliminates essentially all of the limitations of historic tar formats in a standard fashion that is supported by POSIX-compliant pax(1) implemen- @@ -57,7 +57,7 @@ READING AN ARCHIVE corresponding compression and format support. Note that these latter functions perform two distinct operations: they cause the corresponding support code to be linked into your program, and they enable the corre- - sponding auto-detect code. Unless you have specific constraints, you + sponding auto-detect code. Unless you have specific constraints, you will generally want to invoke archive_read_support_compression_all() and archive_read_support_format_all() to enable auto-detect for all formats and compression types currently supported by the library. @@ -106,7 +106,7 @@ WRITING AN ARCHIVE Individual archive entries are written in a three-step process: You first initialize a struct archive_entry structure with information about the - new entry. At a minimum, you should set the pathname of the entry and + new entry. At a minimum, you should set the pathname of the entry and provide a struct stat with a valid st_mode field, which specifies the type of object and st_size field, which specifies the size of the data portion of the object. The archive_write_header() function actually @@ -133,7 +133,7 @@ DESCRIPTION Users familiar with historic formats should be aware that the newer vari- ants have eliminated most restrictions on the length of textual fields. Clients should not assume that filenames, link names, user names, or - group names are limited in length. In particular, pax interchange format + group names are limited in length. In particular, pax interchange format can easily accommodate pathnames in arbitrary character sets that exceed PATH_MAX. @@ -151,7 +151,7 @@ RETURN VALUES cated and initialized struct archive object. archive_read_data() and archive_write_data() return a count of the number - of bytes actually read or written. A value of zero indicates the end of + of bytes actually read or written. A value of zero indicates the end of the data for this entry. A negative value indicates an error, in which case the archive_errno() and archive_error_string() functions can be used to obtain more information. @@ -182,4 +182,4 @@ BUGS formats do not support nanosecond timestamps; old tar formats do not sup- port large device numbers. -NetBSD 5.0 August 19, 2006 NetBSD 5.0 +FreeBSD 9.0 August 19, 2006 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/libarchive_internals.3.txt b/archivers/libarchive/files/doc/text/libarchive_internals.3.txt index 6c1494f4bc4..61caa1d3cff 100644 --- a/archivers/libarchive/files/doc/text/libarchive_internals.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive_internals.3.txt @@ -1,4 +1,4 @@ -LIBARCHIVE(3) NetBSD Library Functions Manual LIBARCHIVE(3) +LIBARCHIVE(3) FreeBSD Library Functions Manual LIBARCHIVE(3) NAME libarchive_internals -- description of libarchive internal interfaces @@ -32,7 +32,7 @@ READ ARCHITECTURE archive object to read entries and bodies from an archive stream. Inter- nally, the archive object is cast to an archive_read object, which holds all read-specific data. The API has four layers: The lowest layer is the - I/O layer. This layer can be overridden by clients, but most clients use + I/O layer. This layer can be overridden by clients, but most clients use the packaged I/O callbacks provided, for example, by archive_read_open_memory(3), and archive_read_open_fd(3). The compres- sion layer calls the I/O layer to read bytes and decompresses them for @@ -55,11 +55,11 @@ READ ARCHITECTURE The client read callback is expected to provide a block of data on each call. A zero-length return does indicate end of file, but otherwise - blocks may be as small as one byte or as large as the entire file. In + blocks may be as small as one byte or as large as the entire file. In particular, blocks may be of different sizes. The client skip callback returns the number of bytes actually skipped, - which may be much smaller than the skip requested. The only requirement + which may be much smaller than the skip requested. The only requirement is that the skip not be larger. In particular, clients are allowed to return zero for any skip that they don't want to handle. The skip call- back must never be invoked with a negative value. @@ -96,7 +96,7 @@ READ ARCHITECTURE pression handler invokes the internal __archive_read_register_compression() function to provide bid and initialization functions. This function returns NULL on error or - else a pointer to a struct decompressor_t. This structure con- + else a pointer to a struct decompressor_t. This structure con- tains a void * config slot that can be used for storing any cus- tomization information. Bid The bid function is invoked with a pointer and size of a block of @@ -148,7 +148,7 @@ READ ARCHITECTURE The header read is usually the most complex part of any format. There are a few strategies worth mentioning: For formats such as tar or cpio, reading and parsing the header is straightforward - since headers alternate with data. For formats that store all + since headers alternate with data. For formats that store all header data at the beginning of the file, the first header read request may have to read all headers into memory and store that data, sorted by the location of the file data. Subsequent header @@ -162,7 +162,7 @@ READ ARCHITECTURE ber that the decompressor will return as much data as it has. Generally, you will want to request one byte, examine the return value to see how much data is available, and possibly trim that - to the amount you can use. You should invoke consume for each + to the amount you can use. You should invoke consume for each block just before you return it. Skip All Data The skip data call should skip over all file data and trailing @@ -202,7 +202,7 @@ WRITE_DISK ARCHITECTURE GENERAL SERVICES The archive_read, archive_write, and archive_write_disk objects all con- tain an initial archive object which provides common support for a set of - standard services. (Recall that ANSI/ISO C90 guarantees that you can + standard services. (Recall that ANSI/ISO C90 guarantees that you can cast freely between a pointer to a structure and a pointer to the first element of that structure.) The archive object has a magic value that indicates which API this object is associated with, slots for storing @@ -212,7 +212,7 @@ MISCELLANEOUS NOTES Connecting existing archiving libraries into libarchive is generally quite difficult. In particular, many existing libraries strongly assume that you are reading from a file; they seek forwards and backwards as - necessary to locate various pieces of information. In contrast, + necessary to locate various pieces of information. In contrast, libarchive never seeks backwards in its input, which sometimes requires very different approaches. @@ -245,4 +245,4 @@ AUTHORS The libarchive library was written by Tim Kientzle <kientzle@acm.org>. BUGS -NetBSD 5.0 April 16, 2007 NetBSD 5.0 +FreeBSD 9.0 April 16, 2007 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/mtree.5.txt b/archivers/libarchive/files/doc/text/mtree.5.txt index dc4e46cbb57..58ba18da6db 100644 --- a/archivers/libarchive/files/doc/text/mtree.5.txt +++ b/archivers/libarchive/files/doc/text/mtree.5.txt @@ -1,4 +1,4 @@ -MTREE(5) NetBSD File Formats Manual MTREE(5) +MTREE(5) FreeBSD File Formats Manual MTREE(5) NAME mtree -- format of mtree dir hierarchy files @@ -56,7 +56,7 @@ DESCRIPTION /set This command defines default values for one or more keywords. It is followed on the same line by one or more whitespace- - separated keyword definitions. These definitions apply to + separated keyword definitions. These definitions apply to all following files that do not specify a value for that key- word. @@ -80,7 +80,7 @@ DESCRIPTION file. flags The file flags as a symbolic name. See chflags(1) for infor- - mation on these names. If no flags are to be set the string + mation on these names. If no flags are to be set the string ``none'' may be used to override the current default. gid The file group as a numeric value. @@ -113,7 +113,7 @@ DESCRIPTION sha1 The FIPS 160-1 (``SHA-1'') message digest of the file. - sha1digest A synonym for sha1. + sha1digest A synonym for sha1. sha256 The FIPS 180-2 (``SHA-256'') message digest of the file. @@ -132,7 +132,7 @@ DESCRIPTION fifo fifo file regular file link symbolic link - socket socket + socket socket uid The file owner as a numeric value. @@ -147,7 +147,7 @@ BUGS not yet widely implemented. HISTORY - The mtree utility appeared in 4.3BSD-Reno. The MD5 digest capability was + The mtree utility appeared in 4.3BSD-Reno. The MD5 digest capability was added in FreeBSD 2.1, in response to the widespread use of programs which can spoof cksum(1). The SHA-1 and RIPEMD160 digests were added in FreeBSD 4.0, as new attacks have demonstrated weaknesses in MD5. The @@ -155,4 +155,4 @@ HISTORY added in FreeBSD 4.0, and mostly comes from NetBSD. The ``full'' entry format was added by NetBSD. -NetBSD 5.0 August 20, 2007 NetBSD 5.0 +FreeBSD 9.0 August 20, 2007 FreeBSD 9.0 diff --git a/archivers/libarchive/files/doc/text/tar.5.txt b/archivers/libarchive/files/doc/text/tar.5.txt index eec362e890d..f806f6664dc 100644 --- a/archivers/libarchive/files/doc/text/tar.5.txt +++ b/archivers/libarchive/files/doc/text/tar.5.txt @@ -1,4 +1,4 @@ -tar(5) NetBSD File Formats Manual tar(5) +tar(5) FreeBSD File Formats Manual tar(5) NAME tar -- format of tape archive files @@ -63,9 +63,9 @@ DESCRIPTION User id and group id of owner, as octal numbers in ASCII. size Size of file, as octal number in ASCII. For regular files only, - this indicates the amount of data that follows the header. In + this indicates the amount of data that follows the header. In particular, this field was ignored by early tar implementations - when extracting hardlinks. Modern writers should always store a + when extracting hardlinks. Modern writers should always store a zero length for hardlink entries. mtime Modification time of file, as an octal number in ASCII. This @@ -78,7 +78,7 @@ DESCRIPTION the checksum, set the checksum field to all spaces, then sum all bytes in the header using unsigned arithmetic. This field should be stored as six octal digits followed by a null and a space - character. Note that many early implementations of tar used + character. Note that many early implementations of tar used signed arithmetic for the checksum field, which can cause inter- operability problems when transferring archives between systems. Modern robust readers compute the checksum both ways and accept @@ -108,11 +108,11 @@ DESCRIPTION for John Gilmore's pdtar program and many system implementations from the late 1980s and early 1990s. These archives generally follow the POSIX ustar format described below with the following variations: - The magic value is ``ustar '' (note the following space). The + o The magic value is ``ustar '' (note the following space). The version field contains a space character followed by a null. - The numeric fields are generally filled with leading spaces (not + o The numeric fields are generally filled with leading spaces (not leading zeros as recommended in the final standard). - The prefix field is often not used, limiting pathnames to the 100 + o The prefix field is often not used, limiting pathnames to the 100 characters of old-style archives. POSIX ustar Archives @@ -189,7 +189,7 @@ DESCRIPTION name, prefix If the pathname is too long to fit in the 100 bytes provided by the standard format, it can be split at any / character with the - first portion going into the prefix field. If the prefix field + first portion going into the prefix field. If the prefix field is not empty, the reader will prepend the prefix value and a / character to the regular name field to obtain the full pathname. The standard does not require a trailing / character on directory @@ -240,7 +240,7 @@ DESCRIPTION mal, not octal. A description of some common keys follows: atime, ctime, mtime - File access, inode change, and modification times. These fields + File access, inode change, and modification times. These fields can be negative or include a decimal point and a fractional value. @@ -285,7 +285,7 @@ DESCRIPTION The file flags. SCHILY.realsize - The full size of the file on disk. XXX explain? XXX + The full size of the file on disk. XXX explain? XXX SCHILY.dev, SCHILY.ino, SCHILY.nlinks The device number, inode number, and link count for the entry. @@ -310,7 +310,7 @@ DESCRIPTION as existing archivers are known to store non-compliant values in the standard header fields in this situation. There are no limits on length for any of these fields. In particular, numeric fields can be arbitrar- - ily large. All text fields are encoded in UTF8. Compliant writers + ily large. All text fields are encoded in UTF8. Compliant writers should store only portable 7-bit ASCII characters in the standard ustar header and use extended attributes whenever a text value contains non- ASCII characters. @@ -431,7 +431,7 @@ DESCRIPTION tax. Due to security concerns, "N" records are now gen- erally ignored when reading archives. - S This is a ``sparse'' regular file. Sparse files are + S This is a ``sparse'' regular file. Sparse files are stored as a series of fragments. The header contains a list of fragment offset/length pairs. If more than four such entries are required, the header is extended as nec- @@ -476,8 +476,8 @@ DESCRIPTION char offset[12]; char numbytes[12]; } sparse[21]; - char isextended[1]; - char padding[7]; + char isextended[1]; + char padding[7]; }; realsize @@ -490,7 +490,7 @@ DESCRIPTION GNU tar pax archives GNU tar 1.14 (XXX check this XXX) and later will write pax interchange - format archives when you specify the --posix flag. This format uses cus- + format archives when you specify the --posix flag. This format uses cus- tom keywords to store sparse file information. There have been three iterations of this support, referred to as ``0.0'', ``0.1'', and ``1.0''. @@ -500,7 +500,7 @@ DESCRIPTION to indicate the number of blocks in the file, a pair of GNU.sparse.offset and GNU.sparse.numbytes to indicate the offset and size of each block, and a single GNU.sparse.size to indicate - the full size of the file. This is not the same as the size in + the full size of the file. This is not the same as the size in the tar header because the latter value does not include the size of any holes. This format required that the order of attributes be preserved and relied on readers accepting multiple appearances @@ -509,7 +509,7 @@ DESCRIPTION GNU.sparse.map The ``0.1'' format used a single attribute that stored a comma- - separated list of decimal numbers. Each pair of numbers indi- + separated list of decimal numbers. Each pair of numbers indi- cated the offset and size, respectively, of a block of data. This does not work well if the archive is extracted by an archiver that does not recognize this extension, since many pax @@ -531,11 +531,11 @@ DESCRIPTION Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an ``extended'' format that is fundamentally similar to pax interchange for- mat, with the following differences: - Extended attributes are stored in an entry whose type is X, not + o Extended attributes are stored in an entry whose type is X, not x, as used by pax interchange format. The detailed format of this entry appears to be the same as detailed above for the x entry. - An additional A entry is used to store an ACL for the following + o An additional A entry is used to store an ACL for the following regular entry. The body of this entry contains a seven-digit octal number followed by a zero byte, followed by the textual ACL description. The octal value is the number of ACL entries plus a @@ -562,7 +562,7 @@ DESCRIPTION allows file sizes up to 64 GB. Another extension, utilized by GNU tar, star, and other newer tar imple- - mentations, permits binary numbers in the standard numeric fields. This + mentations, permits binary numbers in the standard numeric fields. This is flagged by setting the high bit of the first byte. This permits 95-bit values for the length and time fields and 63-bit values for the uid, gid, and device numbers. GNU tar supports this extension for the @@ -598,4 +598,4 @@ HISTORY This documentation was written as part of the libarchive and bsdtar project by Tim Kientzle <kientzle@FreeBSD.org>. -NetBSD 5.0 December 27, 2009 NetBSD 5.0 +FreeBSD 9.0 December 27, 2009 FreeBSD 9.0 diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c index c65f115b7d2..6acc096623a 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c +++ b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c @@ -210,7 +210,7 @@ setup_acls_posix1e(struct archive_read_disk *a, acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS); #else else if ((!a->follow_symlinks) - && (archive_entry_filetype(entry) == AE_IFLNK))) + && (archive_entry_filetype(entry) == AE_IFLNK)) /* We can't get the ACL of a symlink, so we assume it can't have one. */ acl = NULL; |