source: svn/trunk/newcon3bcm2_21bu/toolchain/mips-linux-uclibc/include/cpio.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

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