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 _UAPI__CRAMFS_H 2022851890Sopenharmony_ci#define _UAPI__CRAMFS_H 2122851890Sopenharmony_ci#include <linux/types.h> 2222851890Sopenharmony_ci#include <linux/magic.h> 2322851890Sopenharmony_ci#define CRAMFS_SIGNATURE "Compressed ROMFS" 2422851890Sopenharmony_ci#define CRAMFS_MODE_WIDTH 16 2522851890Sopenharmony_ci#define CRAMFS_UID_WIDTH 16 2622851890Sopenharmony_ci#define CRAMFS_SIZE_WIDTH 24 2722851890Sopenharmony_ci#define CRAMFS_GID_WIDTH 8 2822851890Sopenharmony_ci#define CRAMFS_NAMELEN_WIDTH 6 2922851890Sopenharmony_ci#define CRAMFS_OFFSET_WIDTH 26 3022851890Sopenharmony_ci#define CRAMFS_MAXPATHLEN (((1 << CRAMFS_NAMELEN_WIDTH) - 1) << 2) 3122851890Sopenharmony_cistruct cramfs_inode { 3222851890Sopenharmony_ci __u32 mode : CRAMFS_MODE_WIDTH, uid : CRAMFS_UID_WIDTH; 3322851890Sopenharmony_ci __u32 size : CRAMFS_SIZE_WIDTH, gid : CRAMFS_GID_WIDTH; 3422851890Sopenharmony_ci __u32 namelen : CRAMFS_NAMELEN_WIDTH, offset : CRAMFS_OFFSET_WIDTH; 3522851890Sopenharmony_ci}; 3622851890Sopenharmony_cistruct cramfs_info { 3722851890Sopenharmony_ci __u32 crc; 3822851890Sopenharmony_ci __u32 edition; 3922851890Sopenharmony_ci __u32 blocks; 4022851890Sopenharmony_ci __u32 files; 4122851890Sopenharmony_ci}; 4222851890Sopenharmony_cistruct cramfs_super { 4322851890Sopenharmony_ci __u32 magic; 4422851890Sopenharmony_ci __u32 size; 4522851890Sopenharmony_ci __u32 flags; 4622851890Sopenharmony_ci __u32 future; 4722851890Sopenharmony_ci __u8 signature[16]; 4822851890Sopenharmony_ci struct cramfs_info fsid; 4922851890Sopenharmony_ci __u8 name[16]; 5022851890Sopenharmony_ci struct cramfs_inode root; 5122851890Sopenharmony_ci}; 5222851890Sopenharmony_ci#define CRAMFS_FLAG_FSID_VERSION_2 0x00000001 5322851890Sopenharmony_ci#define CRAMFS_FLAG_SORTED_DIRS 0x00000002 5422851890Sopenharmony_ci#define CRAMFS_FLAG_HOLES 0x00000100 5522851890Sopenharmony_ci#define CRAMFS_FLAG_WRONG_SIGNATURE 0x00000200 5622851890Sopenharmony_ci#define CRAMFS_FLAG_SHIFTED_ROOT_OFFSET 0x00000400 5722851890Sopenharmony_ci#define CRAMFS_FLAG_EXT_BLOCK_POINTERS 0x00000800 5822851890Sopenharmony_ci#define CRAMFS_SUPPORTED_FLAGS (0x000000ff | CRAMFS_FLAG_HOLES | CRAMFS_FLAG_WRONG_SIGNATURE | CRAMFS_FLAG_SHIFTED_ROOT_OFFSET | CRAMFS_FLAG_EXT_BLOCK_POINTERS) 5922851890Sopenharmony_ci#define CRAMFS_BLK_FLAG_UNCOMPRESSED (1 << 31) 6022851890Sopenharmony_ci#define CRAMFS_BLK_FLAG_DIRECT_PTR (1 << 30) 6122851890Sopenharmony_ci#define CRAMFS_BLK_FLAGS (CRAMFS_BLK_FLAG_UNCOMPRESSED | CRAMFS_BLK_FLAG_DIRECT_PTR) 6222851890Sopenharmony_ci#define CRAMFS_BLK_DIRECT_PTR_SHIFT 2 6322851890Sopenharmony_ci#endif 64