1*53ee8cc1Swenshuai.xi /* Extended cpio format from POSIX.1. 2*53ee8cc1Swenshuai.xi This file is part of the GNU C Library. 3*53ee8cc1Swenshuai.xi Copyright (C) 1992, 1998 Free Software Foundation, Inc. 4*53ee8cc1Swenshuai.xi NOTE: The canonical source of this file is maintained with the GNU cpio. 5*53ee8cc1Swenshuai.xi 6*53ee8cc1Swenshuai.xi The GNU C Library is free software; you can redistribute it and/or 7*53ee8cc1Swenshuai.xi modify it under the terms of the GNU Lesser General Public 8*53ee8cc1Swenshuai.xi License as published by the Free Software Foundation; either 9*53ee8cc1Swenshuai.xi version 2.1 of the License, or (at your option) any later version. 10*53ee8cc1Swenshuai.xi 11*53ee8cc1Swenshuai.xi The GNU C Library is distributed in the hope that it will be useful, 12*53ee8cc1Swenshuai.xi but WITHOUT ANY WARRANTY; without even the implied warranty of 13*53ee8cc1Swenshuai.xi MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14*53ee8cc1Swenshuai.xi Lesser General Public License for more details. 15*53ee8cc1Swenshuai.xi 16*53ee8cc1Swenshuai.xi You should have received a copy of the GNU Lesser General Public 17*53ee8cc1Swenshuai.xi License along with the GNU C Library; if not, write to the Free 18*53ee8cc1Swenshuai.xi Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 19*53ee8cc1Swenshuai.xi 02111-1307 USA. */ 20*53ee8cc1Swenshuai.xi 21*53ee8cc1Swenshuai.xi #ifndef _CPIO_H 22*53ee8cc1Swenshuai.xi #define _CPIO_H 1 23*53ee8cc1Swenshuai.xi 24*53ee8cc1Swenshuai.xi /* A cpio archive consists of a sequence of files. 25*53ee8cc1Swenshuai.xi Each file has a 76 byte header, 26*53ee8cc1Swenshuai.xi a variable length, NUL terminated filename, 27*53ee8cc1Swenshuai.xi and variable length file data. 28*53ee8cc1Swenshuai.xi A header for a filename "TRAILER!!!" indicates the end of the archive. */ 29*53ee8cc1Swenshuai.xi 30*53ee8cc1Swenshuai.xi /* All the fields in the header are ISO 646 (approximately ASCII) strings 31*53ee8cc1Swenshuai.xi of octal numbers, left padded, not NUL terminated. 32*53ee8cc1Swenshuai.xi 33*53ee8cc1Swenshuai.xi Field Name Length in Bytes Notes 34*53ee8cc1Swenshuai.xi c_magic 6 must be "070707" 35*53ee8cc1Swenshuai.xi c_dev 6 36*53ee8cc1Swenshuai.xi c_ino 6 37*53ee8cc1Swenshuai.xi c_mode 6 see below for value 38*53ee8cc1Swenshuai.xi c_uid 6 39*53ee8cc1Swenshuai.xi c_gid 6 40*53ee8cc1Swenshuai.xi c_nlink 6 41*53ee8cc1Swenshuai.xi c_rdev 6 only valid for chr and blk special files 42*53ee8cc1Swenshuai.xi c_mtime 11 43*53ee8cc1Swenshuai.xi c_namesize 6 count includes terminating NUL in pathname 44*53ee8cc1Swenshuai.xi c_filesize 11 must be 0 for FIFOs and directories */ 45*53ee8cc1Swenshuai.xi 46*53ee8cc1Swenshuai.xi /* Value for the field `c_magic'. */ 47*53ee8cc1Swenshuai.xi #define MAGIC "070707" 48*53ee8cc1Swenshuai.xi 49*53ee8cc1Swenshuai.xi /* Values for c_mode, OR'd together: */ 50*53ee8cc1Swenshuai.xi 51*53ee8cc1Swenshuai.xi #define C_IRUSR 000400 52*53ee8cc1Swenshuai.xi #define C_IWUSR 000200 53*53ee8cc1Swenshuai.xi #define C_IXUSR 000100 54*53ee8cc1Swenshuai.xi #define C_IRGRP 000040 55*53ee8cc1Swenshuai.xi #define C_IWGRP 000020 56*53ee8cc1Swenshuai.xi #define C_IXGRP 000010 57*53ee8cc1Swenshuai.xi #define C_IROTH 000004 58*53ee8cc1Swenshuai.xi #define C_IWOTH 000002 59*53ee8cc1Swenshuai.xi #define C_IXOTH 000001 60*53ee8cc1Swenshuai.xi 61*53ee8cc1Swenshuai.xi #define C_ISUID 004000 62*53ee8cc1Swenshuai.xi #define C_ISGID 002000 63*53ee8cc1Swenshuai.xi #define C_ISVTX 001000 64*53ee8cc1Swenshuai.xi 65*53ee8cc1Swenshuai.xi #define C_ISBLK 060000 66*53ee8cc1Swenshuai.xi #define C_ISCHR 020000 67*53ee8cc1Swenshuai.xi #define C_ISDIR 040000 68*53ee8cc1Swenshuai.xi #define C_ISFIFO 010000 69*53ee8cc1Swenshuai.xi #define C_ISSOCK 0140000 70*53ee8cc1Swenshuai.xi #define C_ISLNK 0120000 71*53ee8cc1Swenshuai.xi #define C_ISCTG 0110000 72*53ee8cc1Swenshuai.xi #define C_ISREG 0100000 73*53ee8cc1Swenshuai.xi 74*53ee8cc1Swenshuai.xi #endif /* cpio.h */ 75