Blame posix/cpio.h

Packit 6c4009
/* Extended cpio format from POSIX.1.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
   Copyright (C) 1992-2018 Free Software Foundation, Inc.
Packit 6c4009
   NOTE: The canonical source of this file is maintained with the GNU cpio.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _CPIO_H
Packit 6c4009
#define _CPIO_H 1
Packit 6c4009
Packit 6c4009
/* A cpio archive consists of a sequence of files.
Packit 6c4009
   Each file has a 76 byte header,
Packit 6c4009
   a variable length, NUL terminated filename,
Packit 6c4009
   and variable length file data.
Packit 6c4009
   A header for a filename "TRAILER!!!" indicates the end of the archive.  */
Packit 6c4009
Packit 6c4009
/* All the fields in the header are ISO 646 (approximately ASCII) strings
Packit 6c4009
   of octal numbers, left padded, not NUL terminated.
Packit 6c4009
Packit 6c4009
   Field Name	Length in Bytes	Notes
Packit 6c4009
   c_magic	6		must be "070707"
Packit 6c4009
   c_dev	6
Packit 6c4009
   c_ino	6
Packit 6c4009
   c_mode	6		see below for value
Packit 6c4009
   c_uid	6
Packit 6c4009
   c_gid	6
Packit 6c4009
   c_nlink	6
Packit 6c4009
   c_rdev	6		only valid for chr and blk special files
Packit 6c4009
   c_mtime	11
Packit 6c4009
   c_namesize	6		count includes terminating NUL in pathname
Packit 6c4009
   c_filesize	11		must be 0 for FIFOs and directories  */
Packit 6c4009
Packit 6c4009
/* Value for the field `c_magic'.  */
Packit 6c4009
#define MAGIC	"070707"
Packit 6c4009
Packit 6c4009
/* Values for c_mode, OR'd together: */
Packit 6c4009
Packit 6c4009
#define C_IRUSR		000400
Packit 6c4009
#define C_IWUSR		000200
Packit 6c4009
#define C_IXUSR		000100
Packit 6c4009
#define C_IRGRP		000040
Packit 6c4009
#define C_IWGRP		000020
Packit 6c4009
#define C_IXGRP		000010
Packit 6c4009
#define C_IROTH		000004
Packit 6c4009
#define C_IWOTH		000002
Packit 6c4009
#define C_IXOTH		000001
Packit 6c4009
Packit 6c4009
#define C_ISUID		004000
Packit 6c4009
#define C_ISGID		002000
Packit 6c4009
#define C_ISVTX		001000
Packit 6c4009
Packit 6c4009
#define C_ISBLK		060000
Packit 6c4009
#define C_ISCHR		020000
Packit 6c4009
#define C_ISDIR		040000
Packit 6c4009
#define C_ISFIFO	010000
Packit 6c4009
#define C_ISSOCK	0140000
Packit 6c4009
#define C_ISLNK		0120000
Packit 6c4009
#define C_ISCTG		0110000
Packit 6c4009
#define C_ISREG		0100000
Packit 6c4009
Packit 6c4009
#endif /* cpio.h */