1998-01-25 17:01:47 +00:00
|
|
|
/* Extended cpio format from POSIX.1.
|
|
|
|
This file is part of the GNU C Library.
|
2021-01-02 19:32:25 +00:00
|
|
|
Copyright (C) 1992-2021 Free Software Foundation, Inc.
|
1998-01-25 17:01:47 +00:00
|
|
|
NOTE: The canonical source of this file is maintained with the GNU cpio.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1998-01-25 17:01:47 +00:00
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1998-01-25 17:01:47 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
<https://www.gnu.org/licenses/>. */
|
1998-01-25 17:01:47 +00:00
|
|
|
|
|
|
|
#ifndef _CPIO_H
|
|
|
|
#define _CPIO_H 1
|
|
|
|
|
|
|
|
/* A cpio archive consists of a sequence of files.
|
|
|
|
Each file has a 76 byte header,
|
|
|
|
a variable length, NUL terminated filename,
|
|
|
|
and variable length file data.
|
|
|
|
A header for a filename "TRAILER!!!" indicates the end of the archive. */
|
|
|
|
|
|
|
|
/* All the fields in the header are ISO 646 (approximately ASCII) strings
|
|
|
|
of octal numbers, left padded, not NUL terminated.
|
|
|
|
|
|
|
|
Field Name Length in Bytes Notes
|
|
|
|
c_magic 6 must be "070707"
|
|
|
|
c_dev 6
|
|
|
|
c_ino 6
|
|
|
|
c_mode 6 see below for value
|
|
|
|
c_uid 6
|
|
|
|
c_gid 6
|
|
|
|
c_nlink 6
|
|
|
|
c_rdev 6 only valid for chr and blk special files
|
|
|
|
c_mtime 11
|
|
|
|
c_namesize 6 count includes terminating NUL in pathname
|
|
|
|
c_filesize 11 must be 0 for FIFOs and directories */
|
|
|
|
|
|
|
|
/* Value for the field `c_magic'. */
|
|
|
|
#define MAGIC "070707"
|
|
|
|
|
|
|
|
/* Values for c_mode, OR'd together: */
|
|
|
|
|
|
|
|
#define C_IRUSR 000400
|
|
|
|
#define C_IWUSR 000200
|
|
|
|
#define C_IXUSR 000100
|
|
|
|
#define C_IRGRP 000040
|
|
|
|
#define C_IWGRP 000020
|
|
|
|
#define C_IXGRP 000010
|
|
|
|
#define C_IROTH 000004
|
|
|
|
#define C_IWOTH 000002
|
|
|
|
#define C_IXOTH 000001
|
|
|
|
|
|
|
|
#define C_ISUID 004000
|
|
|
|
#define C_ISGID 002000
|
|
|
|
#define C_ISVTX 001000
|
|
|
|
|
|
|
|
#define C_ISBLK 060000
|
|
|
|
#define C_ISCHR 020000
|
|
|
|
#define C_ISDIR 040000
|
|
|
|
#define C_ISFIFO 010000
|
|
|
|
#define C_ISSOCK 0140000
|
|
|
|
#define C_ISLNK 0120000
|
|
|
|
#define C_ISCTG 0110000
|
|
|
|
#define C_ISREG 0100000
|
|
|
|
|
|
|
|
#endif /* cpio.h */
|