archives(4)
NAME
archives − device header
DESCRIPTION
/∗ Magic numbers ∗/
#define CMN_ASC0x070701 /∗ Cpio Magic Number for −c header ∗/
#define CMN_BIN070707 /∗ Cpio Magic Number for Binary header ∗/
#define CMN_BBS0143561 /∗ Cpio Magic Number for Byte-Swap header ∗/
#define CMN_CRC0x070702 /∗ Cpio Magic Number for CRC header ∗/
#define CMS_ASC"070701" /∗ Cpio Magic String for −c header ∗/
#define CMS_CHR"070707" /∗ Cpio Magic String for odc header ∗/
#define CMS_CRC"070702" /∗ Cpio Magic String for CRC header ∗/
#define CMS_LEN6 /∗ Cpio Magic String length ∗/
/∗ Various header and field lengths ∗/
#define CHRSZ76/∗ −H odc size minus filename field ∗/
#define ASCSZ110/∗ −c and CRC hdr size minus filename field ∗/
#define TARSZ512/∗ TAR hdr size ∗/
#define HNAMLEN256 /∗ maximum filename length for binary and
odc headers ∗/
#define EXPNLEN1024 /∗ maximum filename length for −c and
CRC headers ∗/
#define HTIMLEN2 /∗ length of modification time field ∗/
#define HSIZLEN2 /∗ length of file size field ∗/
/∗ cpio binary header definition ∗/
struct hdr_cpio {
shorth_magic,/∗ magic number field ∗/
h_dev;/∗ file system of file ∗/
ushorth_ino,/∗ inode of file ∗/
h_mode,/∗ modes of file ∗/
h_uid,/∗ uid of file ∗/
h_gid;/∗ gid of file ∗/
shorth_nlink,/∗ number of links to file ∗/
h_rdev,/∗ maj/min numbers for special files ∗/
h_mtime[HTIMLEN],/∗ modification time of file ∗/
h_namesize,/∗ length of filename ∗/
h_filesize[HSIZLEN];/∗ size of file ∗/
charh_name[HNAMLEN];/∗ filename ∗/
} ;
/∗ cpio −H odc header format ∗/
struct c_hdr {
charc_magic[CMS_LEN],
c_dev[6],
c_ino[6],
c_mode[6],
c_uid[6],
c_gid[6],
c_nlink[6],
c_rdev[6],
c_mtime[11],
c_namesz[6],
c_filesz[11],
c_name[HNAMLEN];
} ;
/∗ −c and CRC header format ∗/
struct Exp_cpio_hdr {
charE_magic[CMS_LEN],
E_ino[8],
E_mode[8],
E_uid[8],
E_gid[8],
E_nlink[8],
E_mtime[8],
E_filesize[8],
E_maj[8],
E_min[8],
E_rmaj[8],
E_rmin[8],
E_namesize[8],
E_chksum[8],
E_name[EXPNLEN];
} ;
/∗ Tar header structure and format ∗/
#define TBLOCK512/∗ length of tar header and data blocks ∗/
#define TNAMLEN100 /∗ maximum length for tar file names ∗/
#define TMODLEN8 /∗ length of mode field ∗/
#define TUIDLEN8 /∗ length of uid field ∗/
#define TGIDLEN8 /∗ length of gid field ∗/
#define TSIZLEN12/∗ length of size field ∗/
#define TTIMLEN12 /∗ length of modification time field ∗/
#define TCRCLEN8 /∗ length of header checksum field ∗/
/∗ tar header definition ∗/
union tblock {
char dummy[TBLOCK];
struct header {
chart_name[TNAMLEN];/∗ name of file ∗/
chart_mode[TMODLEN];/∗ mode of file ∗/
chart_uid[TUIDLEN];/∗ uid of file ∗/
chart_gid[TGIDLEN];/∗ gid of file ∗/
chart_size[TSIZLEN];/∗ size of file in bytes ∗/
chart_mtime[TTIMLEN];/∗ modification time of file ∗/
chart_chksum[TCRCLEN];/∗ checksum of header ∗/
chart_typeflag;/∗ flag to indicate type of file ∗/
chart_linkname[TNAMLEN];/∗ file this file is linked with ∗/
chart_magic[6];/∗ magic string always "ustar" ∗/
chart_version[2];/∗ version strings always "00" ∗/
chart_uname[32];/∗ owner of file in ASCII ∗/
chart_gname[32];/∗ group of file in ASCII ∗/
chart_devmajor[8];/∗ major number for special files ∗/
chart_devminor[8];/∗ minor number for special files ∗/
chart_prefix[155];/∗ pathname prefix ∗/
} tbuf;
};
/∗ volcopy tape label format and structure ∗/
#define VMAGLEN 8
#define VVOLLEN 6
#define VFILLEN 464
struct volcopy_label {
charv_magic[VMAGLEN],
v_volume[VVOLLEN],
v_reels,
v_reel;
longv_time,
v_length,
v_dens,
v_reelblks,/∗ u370 added field ∗/
v_blksize,/∗ u370 added field ∗/
v_nblocks;/∗ u370 added field ∗/
charv_fill[VFILLEN];
longv_offset;/∗ used with -e and -reel options ∗/
intv_type;/∗ does tape have nblocks field? ∗/
} ;
SunOS 5.4 — Last change: 3 Jul 1990