]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - wimboot/wimboot-2.7.3/src/cpio.h
5 * Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
32 /** A CPIO archive header
34 * All field are hexadecimal ASCII numbers padded with '0' on the
35 * left to the full width of the field.
38 /** The string "070701" or "070702" */
40 /** File inode number */
42 /** File mode and permissions */
48 /** Number of links */
50 /** Modification time */
52 /** Size of data field */
54 /** Major part of file device number */
56 /** Minor part of file device number */
58 /** Major part of device node reference */
60 /** Minor part of device node reference */
62 /** Length of filename, including final NUL */
64 /** Checksum of data field if c_magic is 070702, othersize zero */
66 } __attribute__ (( packed
));
69 #define CPIO_MAGIC "070701"
72 #define CPIO_TRAILER "TRAILER!!!"
74 extern int cpio_extract ( void *data
, size_t len
,
75 int ( * file
) ( const char *name
, void *data
,