Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ archives(4) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

archives(4)                                                     archives(4)

NAME
     archives - device header file

DESCRIPTION
     /* Magic numbers */

     #define CMNASC 0x070701  /* Cpio Magic Number for -c header */
     #define CMNBIN 070707    /* Cpio Magic Number for Binary header */
     #define CMNBBS 0143561   /* Cpio Magic Number for Byte-Swap header */
     #define CMNCRC 0x070702  /* Cpio Magic Number for CRC header */
     #define CMSASC "070701"  /* Cpio Magic String for -c header */
     #define CMSCHR "070707"  /* Cpio Magic String for odc header */
     #define CMSCRC "070702"  /* Cpio Magic String for CRC header */
     #define CMSLEN 6         /* Cpio Magic String length */

     /* Various header and field lengths */

     #define CHRSZ   76    /* -H odc size minus filename field */
     #define ASCSZ   110   /* -c and CRC hdr size minus filename field */
     #define TARSZ   512   /* TAR hdr size */

     #define HNAMLEN 256   /* maximum filename length for binary and odc headers */
     #define EXPNLEN 1024  /* maximum filename length for -c and CRC headers */
     #define HTIMLEN 2     /* length of modification time field */
     #define HSIZLEN 2     /* length of file size field */

     /* cpio binary header definition */

     struct hdrcpio
     {
         short  hmagic,              /* magic number field */
                hdev;                /* file system of file */
         ushort hino,                /* inode of file */
                hmode,               /* modes of file */
                huid,                /* uid of file */
                hgid;                /* gid of file */
         short  hnlink,              /* number of links to file */
                hrdev,               /* maj/min numbers for special files */
                hmtime[HTIMLEN],     /* modification time of file */
                hnamesize,           /* length of filename */
                hfilesize[HSIZLEN];  /* size of file */
         char   hname[HNAMLEN];      /* filename */
     };

     /* cpio -H odc header format */

     struct chdr
     {
         char cmagic[CMSLEN],
              cdev[6],
              cino[6],
              cmode[6],



Page 1                       Reliant UNIX 5.44                Printed 11/98

archives(4)                                                     archives(4)

              cuid[6],
              cgid[6],
              cnlink[6],
              crdev[6],
              cmtime[11],
              cnamesz[6],
              cfilesz[11],
              cname[HNAMLEN];
     };

     /* -c and CRC header format */

     struct Expcpiohdr
     {
         char Emagic[CMSLEN],
              Eino[8],
              Emode[8],
              Euid[8],
              Egid[8],
              Enlink[8],
              Emtime[8],
              Efilesize[8],
              Emaj[8],
              Emin[8],
              Ermaj[8],
              Ermin[8],
              Enamesize[8],
              Echksum[8],
              Ename[EXPNLEN];
     };

     /* Tar header structure and format */

     #define TBLOCK  512  /* length of tar header and data blocks */
     #define TNAMLEN 100  /* maximum length for tar file names */
     #define TMODLEN 8    /* length of mode field */
     #define TUIDLEN 8    /* length of uid field */
     #define TGIDLEN 8    /* length of gid field */
     #define TSIZLEN 12   /* length of size field */
     #define TTIMLEN 12   /* length of modification time field */
     #define TCRCLEN 8    /* length of header checksum field */

     /* tar header definition */

     union tblock
     {
         char dummy[TBLOCK];
         struct header
         {
             char tname[TNAMLEN];      /* name of file */
             char tmode[TMODLEN];      /* mode of file */
             char tuid[TUIDLEN];       /* uid of file */


Page 2                       Reliant UNIX 5.44                Printed 11/98

archives(4)                                                     archives(4)

             char tgid[TGIDLEN];       /* gid of file */
             char tsize[TSIZLEN];      /* size of file in bytes */
             char tmtime[TTIMLEN];     /* modification time of file */
             char tchksum[TCRCLEN];    /* checksum of header */
             char ttypeflag;           /* flag to indicate type of file */
             char tlinkname[TNAMLEN];  /* file this file is linked with */
             char tmagic[6];           /* magic string always "ustar" */
             char tversion[2];         /* version strings always "00" */
             char tuname[32];          /* owner of file in ASCII */
             char tgname[32];          /* group of file in ASCII */
             char tdevmajor[8];        /* major number for special files */
             char tdevminor[8];        /* minor number for special files */
             char tprefix[155];        /* pathname prefix */
         } tbuf;
     };

     /* volcopy tape label format and structure */

     #define VMAGLEN 8
     #define VVOLLEN 6
     #define VFILLEN 464

     struct volcopylabel
     {
         char vmagic[VMAGLEN],
              vvolume[VVOLLEN],
              vreels,
              vreel;
         long vtime,
              vlength,
              vdens,
              vreelblks,       /* u370 added field */
              vblksize,        /* u370 added field */
              vnblocks;        /* u370 added field */
         char vfill[VFILLEN];
         long voffset;         /* used with -e and -reel options */
         int  vtype;           /* does tape have nblocks field? */
     };
















Page 3                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026