mytypes.h

来自「一个LINUX下一个框架文件系统,运行编译环境:RED HAT LINUX7.3」· C头文件 代码 · 共 37 行

H
37
字号
#define MYFS_SUPER_MAGIC 0x0872 

struct fs_mount_data {
	uint32_t info_magic;
	uint32_t flags;
	uint16_t port;
	char mgr[100];
	char dir[PATH_MAX];
};

struct myfs_super {
	uint32_t flags;
	uint16_t port;
	char mgr[100+1]; /* null terminated */
	char dir[PATH_MAX]; /* null terminated */
};

struct myfs_meta {
	uint64_t handle; /* similar to inode number, always valid */
	uint32_t valid; /* bitfield specifying what fields are valid */
	uint32_t mode; /* protection */
	uint32_t uid; /* user ID of owner */
	uint32_t gid; /* group ID of owner */
	uint64_t size; /* total size of file in bytes */
	time_t atime; /* time of last access (all times under one bit) */
	time_t mtime; /* time of last modification */
	time_t ctime; /* time of last change */
	uint64_t blksize; /* ``suggested'' block size (usually strip size) */
	uint64_t blocks; /* number of ``suggested'' blocks */
};

struct myfs_inode {
	uint64_t handle;
	uint8_t  *name;
	struct myfs_super *super;
};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?