122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef __LINUX_ROMFS_FS_H
2022851890Sopenharmony_ci#define __LINUX_ROMFS_FS_H
2122851890Sopenharmony_ci#include <linux/types.h>
2222851890Sopenharmony_ci#include <linux/fs.h>
2322851890Sopenharmony_ci#define ROMBSIZE BLOCK_SIZE
2422851890Sopenharmony_ci#define ROMBSBITS BLOCK_SIZE_BITS
2522851890Sopenharmony_ci#define ROMBMASK (ROMBSIZE - 1)
2622851890Sopenharmony_ci#define ROMFS_MAGIC 0x7275
2722851890Sopenharmony_ci#define ROMFS_MAXFN 128
2822851890Sopenharmony_ci#define __mkw(h,l) (((h) & 0x00ff) << 8 | ((l) & 0x00ff))
2922851890Sopenharmony_ci#define __mkl(h,l) (((h) & 0xffff) << 16 | ((l) & 0xffff))
3022851890Sopenharmony_ci#define __mk4(a,b,c,d) cpu_to_be32(__mkl(__mkw(a, b), __mkw(c, d)))
3122851890Sopenharmony_ci#define ROMSB_WORD0 __mk4('-', 'r', 'o', 'm')
3222851890Sopenharmony_ci#define ROMSB_WORD1 __mk4('1', 'f', 's', '-')
3322851890Sopenharmony_cistruct romfs_super_block {
3422851890Sopenharmony_ci  __be32 word0;
3522851890Sopenharmony_ci  __be32 word1;
3622851890Sopenharmony_ci  __be32 size;
3722851890Sopenharmony_ci  __be32 checksum;
3822851890Sopenharmony_ci  char name[0];
3922851890Sopenharmony_ci};
4022851890Sopenharmony_cistruct romfs_inode {
4122851890Sopenharmony_ci  __be32 next;
4222851890Sopenharmony_ci  __be32 spec;
4322851890Sopenharmony_ci  __be32 size;
4422851890Sopenharmony_ci  __be32 checksum;
4522851890Sopenharmony_ci  char name[0];
4622851890Sopenharmony_ci};
4722851890Sopenharmony_ci#define ROMFH_TYPE 7
4822851890Sopenharmony_ci#define ROMFH_HRD 0
4922851890Sopenharmony_ci#define ROMFH_DIR 1
5022851890Sopenharmony_ci#define ROMFH_REG 2
5122851890Sopenharmony_ci#define ROMFH_SYM 3
5222851890Sopenharmony_ci#define ROMFH_BLK 4
5322851890Sopenharmony_ci#define ROMFH_CHR 5
5422851890Sopenharmony_ci#define ROMFH_SCK 6
5522851890Sopenharmony_ci#define ROMFH_FIF 7
5622851890Sopenharmony_ci#define ROMFH_EXEC 8
5722851890Sopenharmony_ci#define ROMFH_SIZE 16
5822851890Sopenharmony_ci#define ROMFH_PAD (ROMFH_SIZE - 1)
5922851890Sopenharmony_ci#define ROMFH_MASK (~ROMFH_PAD)
6022851890Sopenharmony_ci#endif
61