AquilaOS documentation
How it works, and its code
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
25
27struct 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
38extern struct fs cpiofs;
39
40#endif /* !_CPIO_H */
struct fs cpiofs
Definition cpio.c:436
#define __packed
Definition system.h:30
unsigned short int uint16_t
Definition stddef.h:21
The header of a member of an old binary cpio archive, as it is in the archive: its name follows,...
Definition cpio.h:12
uint16_t filesize[2]
Definition cpio.h:23
uint16_t ino
Definition cpio.h:15
uint16_t nlink
Definition cpio.h:19
uint16_t dev
Definition cpio.h:14
uint16_t rdev
Definition cpio.h:20
uint16_t gid
Definition cpio.h:18
uint16_t magic
Definition cpio.h:13
uint16_t namesize
Definition cpio.h:22
uint16_t mode
Definition cpio.h:16
uint16_t mtime[2]
Definition cpio.h:21
uint16_t uid
Definition cpio.h:17
What cpiofs keeps for each of its vnodes, a member of the archive.
Definition cpio.h:27
struct vnode * super
Definition cpio.h:28
const char * name
Definition cpio.h:34
size_t data
Definition cpio.h:32
struct vnode * parent
Definition cpio.h:29
size_t count
Definition cpio.h:31
struct vnode * dir
Definition cpio.h:30
struct vnode * next
Definition cpio.h:35
A filesystem type.
Definition vfs.h:98
A file in memory (a vnode): what its inode says, and the kernel's own state.
Definition vfs.h:113