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 __LINUX_ROMFS_FS_H
20#define __LINUX_ROMFS_FS_H
21#include <linux/types.h>
22#include <linux/fs.h>
23#define ROMBSIZE BLOCK_SIZE
24#define ROMBSBITS BLOCK_SIZE_BITS
25#define ROMBMASK (ROMBSIZE - 1)
26#define ROMFS_MAGIC 0x7275
27#define ROMFS_MAXFN 128
28#define __mkw(h,l) (((h) & 0x00ff) << 8 | ((l) & 0x00ff))
29#define __mkl(h,l) (((h) & 0xffff) << 16 | ((l) & 0xffff))
30#define __mk4(a,b,c,d) cpu_to_be32(__mkl(__mkw(a, b), __mkw(c, d)))
31#define ROMSB_WORD0 __mk4('-', 'r', 'o', 'm')
32#define ROMSB_WORD1 __mk4('1', 'f', 's', '-')
33struct romfs_super_block {
34  __be32 word0;
35  __be32 word1;
36  __be32 size;
37  __be32 checksum;
38  char name[0];
39};
40struct romfs_inode {
41  __be32 next;
42  __be32 spec;
43  __be32 size;
44  __be32 checksum;
45  char name[0];
46};
47#define ROMFH_TYPE 7
48#define ROMFH_HRD 0
49#define ROMFH_DIR 1
50#define ROMFH_REG 2
51#define ROMFH_SYM 3
52#define ROMFH_BLK 4
53#define ROMFH_CHR 5
54#define ROMFH_SCK 6
55#define ROMFH_FIF 7
56#define ROMFH_EXEC 8
57#define ROMFH_SIZE 16
58#define ROMFH_PAD (ROMFH_SIZE - 1)
59#define ROMFH_MASK (~ROMFH_PAD)
60#endif
61