%!PS-Adobe-3.0 %%Creator: groff version 1.19.2 %%CreationDate: Wed Jun 30 11:55:52 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()0 12 Q(
)0 24 Q(
struct
archi)0 24 Q -.15(ve)
-.25 G(
*
).15 E(archi)0 36 Q -.15(ve)-.25 G
(_read_disk_ne).15 E(w\(
v)-.25 E(oid
\))-.2
E(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G
(_read_disk_set_symlink_logical\(
struct archi).15
E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_disk_set_symlink_ph).15 E
(ysical\(
struct archi)-.05 E .3 -.15(ve *)-.25 H
(
\)).15 E(
int
)0 24 Q(archi)0
36 Q -.15(ve)-.25 G(_read_disk_set_symlink_h).15 E
(ybrid\(
struct archi)-.05 E .3 -.15(ve *)-.25 H
(
\)).15 E(
int
)0 48 Q(archi)0
60 Q -.15(ve)-.25 G
(_read_disk_gname\(
struct archi).15 E .3 -.15
(ve *)-.25 H(
, gid_t
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_disk_uname\(
struct archi).15 E .3 -.15
(ve *)-.25 H(
, uid_t
\)).15 E
(
int
)0 24 Q(archi)0 36 Q -.15(ve)
-.25 G(_read_disk_set_gname_lookup\(
).15 E
(
struct archi)0 48 Q .3 -.15(ve *)-.25 H(
).15
E(
v)0 60 Q(oid *
)-.2 E
(
const char *\(*lookup\)\(v)0 72 Q
(oid *, gid_t\)
)-.2 E 0 Cg EP
%%Page: 10 10
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
v)0 12 Q(oid \(*cleanup\)\(v)
-.2 E(oid *\)
)-.2 E(\))0 24 Q
(
int
)0 36 Q(archi)0 48 Q -.15(ve)
-.25 G(_read_disk_set_uname_lookup\(
).15 E
(
struct archi)0 60 Q .3 -.15(ve *)-.25 H(
).15
E(
v)0 72 Q(oid *
)-.2 E 0 Cg EP
%%Page: 11 11
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
const char *\(*lookup\)\(v)0
12 Q(oid *, uid_t\)
)-.2 E(
v)0 24 Q
(oid \(*cleanup\)\(v)-.2 E(oid *\)
)-.2 E(\))0 36 Q
(
int
)0 48 Q(archi)0 60 Q -.15(ve)
-.25 G
(_read_disk_set_standard_lookup\(
struct archi).15
E .3 -.15(ve *)-.25 H(
\)).15 E
(
int
)0 72 Q 0 Cg EP
%%Page: 12 12
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G
(_read_disk_entry_from_\214le\(
).15 E
(
struct archi)0 24 Q .3 -.15(ve *)-.25 H(
).15
E(
struct archi)0 36 Q -.15(ve)-.25 G(_entry *
)
.15 E(
int fd
)0 48 Q
(
const struct stat *
)0 60 Q(\))0 72 Q 0 Cg EP
%%Page: 13 13
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
int
)0 12 Q
(archi)0 24 Q -.15(ve)-.25 G
(_read_close\(
struct archi).15 E .3 -.15(ve *)
-.25 H(
\)).15 E(
int
)0 36 Q
(archi)0 48 Q -.15(ve)-.25 G
(_read_\214nish\(
struct archi).15 E .3 -.15(ve *)
-.25 H(
\)).15 E(
\)
\),).15 E(archi)0
24 Q -.15(ve)-.25 G(_read_disk_set_symlink_ph).15 E
(ysical\(
\),)-.05 E(archi)0 36 Q -.15(ve)-.25 G
(_read_disk_set_symlink_h).15 E(ybrid\(
\))-.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(
\),).15 E(archi)0 72 Q -.15(ve)
-.25 G(_read_disk_uname\(
\)).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
(
\),).15 E(archi)0 60 Q
-.15(ve)-.25 G(_read_disk_set_uname_lookup\(
\)).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
(v)0 36 Q
(oid *)-.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(struct\
font> archi)0 12 Q -.15(ve)-.25 G().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(
\)
\))36 36 Q
(Information is read from disk using the path name from the)0 48 Q(
) 36 48 Q(If a pointer to a)0 60 Q(struct stat)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(\ struct stat)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(
)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(struct archi)0 72 Q -.15(ve)-.25 G(_entry).15 E 0 Cg
EP
%%Page: 29 29
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(object.)0 12 Q(\)
\)
\)).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(
)0 24 Q()
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()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(
)0 48 Q(
)0 60 Q
()36 72 Q 0 Cg EP
%%Page: 41 41
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(archi)0 12 Q -.15(ve)-.25 G(_read_disk_ne).15
E(w\( )36 60 Q(archi)0 72 Q -.15(ve)-.25 G
(_read_disk_gname\(\))-.25 E(returns a pointer to a ne)0 24 Q
(wly-allocated)-.25 E(struct archi)0 36 Q -.15(ve)-.25 G().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(
\)).15 E 0 Cg EP
%%Page: 42 42
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(and)0 12 Q(archi)0 24 Q -.15(ve)-.25 G
(_read_disk_uname\(
\)).15 E(return)0 36 Q(const char
)36 36 Q(
)36 48 Q(The)0 60 Q(libarchi)0 72 Q -.15(ve)-.25 G().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 (
)36 36 Q
(The full list of metadata read from disk by)0 48 Q(archi)0 60 Q -.15
(ve)-.25 G(_read_disk_entry_from_\214le\(\)).15 E
(is necessarily system-dependent.)0 72 Q 0 Cg EP
%%Page: 51 51
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(
)36 12 Q(The)0 24 Q(archi)0 36 Q -.15(ve)
-.25 G(_read_disk_entry_from_\214le\(\)).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(
)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(archi).15 E -.15(ve)-.25 G (_read\(3\)).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()0 48 Q()0 60 Q 0 Cg EP %%Trailer end %%EOF