1 /* Extended cpio header from POSIX.1.
2 Copyright (C) 1992 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 struct old_cpio_header
26 unsigned short c_magic
;
29 unsigned short c_mode
;
32 unsigned short c_nlink
;
34 unsigned short c_mtimes
[2];
35 unsigned short c_namesize
;
36 unsigned short c_filesizes
[2];
37 unsigned long c_mtime
; /* Long-aligned copy of `c_mtimes'. */
38 unsigned long c_filesize
; /* Long-aligned copy of `c_filesizes'. */
42 /* "New" portable format and CRC format:
44 Each file has a 110 byte header,
45 a variable length, NUL terminated filename,
46 and variable length file data.
47 A header for a filename "TRAILER!!!" indicates the end of the archive. */
49 /* All the fields in the header are ISO 646 (approximately ASCII) strings
50 of hexadecimal numbers, left padded, not NUL terminated.
52 Field Name Length in Bytes Notes
53 c_magic 6 "070701" for "new" portable format
54 "070702" for CRC format
61 c_filesize 8 must be 0 for FIFOs and directories
64 c_rmaj 8 only valid for chr and blk special files
65 c_rmin 8 only valid for chr and blk special files
66 c_namesize 8 count includes terminating NUL in pathname
67 c_chksum 8 0 for "new" portable format; for CRC format
68 the sum of all the bytes in the file */
70 struct new_cpio_header
72 unsigned short c_magic
;
77 unsigned long c_nlink
;
78 unsigned long c_mtime
;
79 unsigned long c_filesize
;
84 unsigned long c_namesize
;
85 unsigned long c_chksum
;
90 #endif /* cpiohdr.h */