/[cpio]/cpio/src/cpio.h
ViewVC logotype

Contents of /cpio/src/cpio.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed May 25 13:08:58 2005 UTC (18 years, 10 months ago) by gray
Branch: MAIN
Changes since 1.2: +2 -0 lines
File MIME type: text/plain
(CPIO_TRAILER_NAME): New define

1 /* Extended cpio format from POSIX.1.
2 Copyright (C) 1992 Free Software Foundation, Inc.
3
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)
7 any later version.
8
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.
13
14 You should have received a copy of the GNU General Public
15 License along with this program; if not, write to the Free
16 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301 USA. */
18
19 #ifndef _CPIO_H
20
21 #define _CPIO_H 1
22
23 /* A cpio archive consists of a sequence of files.
24 Each file has a 76 byte header,
25 a variable length, NUL terminated filename,
26 and variable length file data.
27 A header for a filename "TRAILER!!!" indicates the end of the archive. */
28
29 #define CPIO_TRAILER_NAME "TRAILER!!!"
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 /* Values for c_mode, OR'd together: */
48
49 #define C_IRUSR 000400
50 #define C_IWUSR 000200
51 #define C_IXUSR 000100
52 #define C_IRGRP 000040
53 #define C_IWGRP 000020
54 #define C_IXGRP 000010
55 #define C_IROTH 000004
56 #define C_IWOTH 000002
57 #define C_IXOTH 000001
58
59 #define C_ISUID 004000
60 #define C_ISGID 002000
61 #define C_ISVTX 001000
62
63 #define C_ISBLK 060000
64 #define C_ISCHR 020000
65 #define C_ISDIR 040000
66 #define C_ISFIFO 010000
67 #define C_ISSOCK 0140000
68 #define C_ISLNK 0120000
69 #define C_ISCTG 0110000
70 #define C_ISREG 0100000
71
72 #endif /* cpio.h */

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26