AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
cpio.h
Go to the documentation of this file.
1
#ifndef _CPIO_H
2
#define _CPIO_H
3
4
#include <
core/system.h
>
5
#include <
fs/vfs.h
>
6
7
/* the magic number of the old binary cpio format */
8
#define CPIO_BIN_MAGIC 0070707
9
12
struct
cpio_hdr
{
13
uint16_t
magic
;
14
uint16_t
dev
;
15
uint16_t
ino
;
16
uint16_t
mode
;
17
uint16_t
uid
;
18
uint16_t
gid
;
19
uint16_t
nlink
;
20
uint16_t
rdev
;
21
uint16_t
mtime
[2];
22
uint16_t
namesize
;
23
uint16_t
filesize
[2];
24
}
__packed
;
25
27
struct
cpio
{
28
struct
vnode
*
super
;
/* the archive's device */
29
struct
vnode
*
parent
;
/* the directory it's in */
30
struct
vnode
*
dir
;
/* its first entry, if it's a directory */
31
size_t
count
;
/* how many entries it has, if a directory */
32
size_t
data
;
/* where its data starts in the archive */
33
34
const
char
*
name
;
35
struct
vnode
*
next
;
/* the next entry of its directory */
36
};
37
38
extern
struct
fs
cpiofs
;
39
40
#endif
/* !_CPIO_H */
cpiofs
struct fs cpiofs
Definition
cpio.c:436
system.h
__packed
#define __packed
Definition
system.h:30
uint16_t
unsigned short int uint16_t
Definition
stddef.h:21
cpio_hdr
The header of a member of an old binary cpio archive, as it is in the archive: its name follows,...
Definition
cpio.h:12
cpio_hdr::filesize
uint16_t filesize[2]
Definition
cpio.h:23
cpio_hdr::ino
uint16_t ino
Definition
cpio.h:15
cpio_hdr::nlink
uint16_t nlink
Definition
cpio.h:19
cpio_hdr::dev
uint16_t dev
Definition
cpio.h:14
cpio_hdr::rdev
uint16_t rdev
Definition
cpio.h:20
cpio_hdr::gid
uint16_t gid
Definition
cpio.h:18
cpio_hdr::magic
uint16_t magic
Definition
cpio.h:13
cpio_hdr::namesize
uint16_t namesize
Definition
cpio.h:22
cpio_hdr::mode
uint16_t mode
Definition
cpio.h:16
cpio_hdr::mtime
uint16_t mtime[2]
Definition
cpio.h:21
cpio_hdr::uid
uint16_t uid
Definition
cpio.h:17
cpio
What cpiofs keeps for each of its vnodes, a member of the archive.
Definition
cpio.h:27
cpio::super
struct vnode * super
Definition
cpio.h:28
cpio::name
const char * name
Definition
cpio.h:34
cpio::data
size_t data
Definition
cpio.h:32
cpio::parent
struct vnode * parent
Definition
cpio.h:29
cpio::count
size_t count
Definition
cpio.h:31
cpio::dir
struct vnode * dir
Definition
cpio.h:30
cpio::next
struct vnode * next
Definition
cpio.h:35
fs
A filesystem type.
Definition
vfs.h:98
vnode
A file in memory (a vnode): what its inode says, and the kernel's own state.
Definition
vfs.h:113
vfs.h
kernel
fs
initramfs
cpio
cpio.h
Generated by
1.18.0