Skip to contentSkip to conversation

flag specifications for structs

DISCUSSION Amir Mahdi Ghorbanian 2 participants 2 messages Dec 28, 2019 VFS

lore
Share & tools
lore
#0 lore raw

Hello fellow kernel hackers,

I am currently considering tackling the following item from the TODO list in the drivers/staging/exfat directory:

	Fix (thing)->flags to not use magic numbers - multiple
	offenders

I am having some difficulty figuring out what the flag bits of the following two structs, defined in exfat.h, mean:

	/* directory structure */
	struct chain_t {
		u32      dir;
		s32       size;
		u8       flags;
	};

	struct file_id_t {
		struct chain_t     dir;
		s32       entry;
		u32      type;
		u32      attr;
		u32      start_clu;
		u64      size;
		u8       flags;
		s64       rwoffset;
		s32       hint_last_off;
		u32      hint_last_clu;
	};

Are the bit specifications defined somewhere in the linux kernel or online? Any guidance on how to go about figuring them out would be much appreciated.

#1 lore raw
Quoted 4 lines · Amir Mahdi Ghorbanian

Hello fellow kernel hackers,

I am currently considering tackling the following item from the TODO list in the drivers/staging/exfat directory:

Probably not worth doing. See the patches from Namjae Jeon recently which entirely replace this filesystem.