PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Fields
ustar_header Struct Reference

Header for ustar-format tar archive. More...

Data Fields

char name [100]
 File name. More...
 
char mode [8]
 Permissions as octal string. More...
 
char uid [8]
 User ID as octal string. More...
 
char gid [8]
 Group ID as octal string. More...
 
char size [12]
 File size in bytes as octal string. More...
 
char mtime [12]
 Modification time in seconds from Jan 1, 1970, as octal string. More...
 
char chksum [8]
 Sum of octets in header as octal string. More...
 
char typeflag
 An enum ustar_type value. More...
 
char linkname [100]
 Name of link target. More...
 
char magic [6]
 "ustar\0" More...
 
char version [2]
 "00" More...
 
char uname [32]
 User name, always null-terminated. More...
 
char gname [32]
 Group name, always null-terminated. More...
 
char devmajor [8]
 Device major number as octal string. More...
 
char devminor [8]
 Device minor number as octal string. More...
 
char prefix [155]
 Prefix to file name. More...
 
char padding [12]
 Pad to 512 bytes. More...
 

Detailed Description

Header for ustar-format tar archive.

See the documentation of the "pax" utility in [SUSv3] for the the "ustar" format specification.

Definition at line 10 of file ustar.c.

Field Documentation

◆ chksum

char ustar_header::chksum[8]

Sum of octets in header as octal string.

Definition at line 19 of file ustar.c.

Referenced by calculate_chksum(), ustar_make_header(), and ustar_parse_header().

◆ devmajor

char ustar_header::devmajor[8]

Device major number as octal string.

Definition at line 27 of file ustar.c.

◆ devminor

char ustar_header::devminor[8]

Device minor number as octal string.

Definition at line 28 of file ustar.c.

◆ gid

char ustar_header::gid[8]

Group ID as octal string.

Definition at line 15 of file ustar.c.

Referenced by ustar_make_header().

◆ gname

char ustar_header::gname[32]

Group name, always null-terminated.

Definition at line 26 of file ustar.c.

Referenced by ustar_make_header().

◆ linkname

char ustar_header::linkname[100]

Name of link target.

Null-terminated if room.

Definition at line 21 of file ustar.c.

◆ magic

char ustar_header::magic[6]

"ustar\0"

Definition at line 23 of file ustar.c.

Referenced by ustar_make_header(), and ustar_parse_header().

◆ mode

char ustar_header::mode[8]

Permissions as octal string.

Definition at line 13 of file ustar.c.

Referenced by ustar_make_header().

◆ mtime

char ustar_header::mtime[12]

Modification time in seconds from Jan 1, 1970, as octal string.

Definition at line 17 of file ustar.c.

Referenced by ustar_make_header().

◆ name

char ustar_header::name[100]

File name.

Null-terminated if room.

Definition at line 12 of file ustar.c.

Referenced by ustar_make_header(), and ustar_parse_header().

◆ padding

char ustar_header::padding[12]

Pad to 512 bytes.

Definition at line 31 of file ustar.c.

◆ prefix

char ustar_header::prefix[155]

Prefix to file name.

Null-terminated if room.

Definition at line 29 of file ustar.c.

Referenced by ustar_parse_header().

◆ size

char ustar_header::size[12]

File size in bytes as octal string.

Definition at line 16 of file ustar.c.

Referenced by parse_octal_field(), ustar_make_header(), and ustar_parse_header().

◆ typeflag

char ustar_header::typeflag

An enum ustar_type value.

Definition at line 20 of file ustar.c.

Referenced by ustar_make_header(), and ustar_parse_header().

◆ uid

char ustar_header::uid[8]

User ID as octal string.

Definition at line 14 of file ustar.c.

Referenced by ustar_make_header().

◆ uname

char ustar_header::uname[32]

User name, always null-terminated.

Definition at line 25 of file ustar.c.

Referenced by ustar_make_header().

◆ version

char ustar_header::version[2]

"00"

Definition at line 24 of file ustar.c.

Referenced by ustar_make_header(), and ustar_parse_header().


The documentation for this struct was generated from the following file: