cramfs_fs.h revision 96c1db7b9d601c31d103389cac074a6cce0d7633
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__CRAMFS_H
20#define _UAPI__CRAMFS_H
21#include <linux/types.h>
22#include <linux/magic.h>
23#define CRAMFS_SIGNATURE "Compressed ROMFS"
24#define CRAMFS_MODE_WIDTH 16
25#define CRAMFS_UID_WIDTH 16
26#define CRAMFS_SIZE_WIDTH 24
27#define CRAMFS_GID_WIDTH 8
28#define CRAMFS_NAMELEN_WIDTH 6
29#define CRAMFS_OFFSET_WIDTH 26
30#define CRAMFS_MAXPATHLEN (((1 << CRAMFS_NAMELEN_WIDTH) - 1) << 2)
31struct cramfs_inode {
32  __u32 mode : CRAMFS_MODE_WIDTH, uid : CRAMFS_UID_WIDTH;
33  __u32 size : CRAMFS_SIZE_WIDTH, gid : CRAMFS_GID_WIDTH;
34  __u32 namelen : CRAMFS_NAMELEN_WIDTH, offset : CRAMFS_OFFSET_WIDTH;
35};
36struct cramfs_info {
37  __u32 crc;
38  __u32 edition;
39  __u32 blocks;
40  __u32 files;
41};
42struct cramfs_super {
43  __u32 magic;
44  __u32 size;
45  __u32 flags;
46  __u32 future;
47  __u8 signature[16];
48  struct cramfs_info fsid;
49  __u8 name[16];
50  struct cramfs_inode root;
51};
52#define CRAMFS_FLAG_FSID_VERSION_2 0x00000001
53#define CRAMFS_FLAG_SORTED_DIRS 0x00000002
54#define CRAMFS_FLAG_HOLES 0x00000100
55#define CRAMFS_FLAG_WRONG_SIGNATURE 0x00000200
56#define CRAMFS_FLAG_SHIFTED_ROOT_OFFSET 0x00000400
57#define CRAMFS_SUPPORTED_FLAGS (0x000000ff | CRAMFS_FLAG_HOLES | CRAMFS_FLAG_WRONG_SIGNATURE | CRAMFS_FLAG_SHIFTED_ROOT_OFFSET)
58#endif
59