fat_parse_long(9)
Hey bestie! You just opened the fat_parse_long page from the Kernel API Manual π
β¨ It's giving parse an extended directory entry and honestly we're obsessed.
π NAME π
fat_parse_long β Parse extended directory entry.
β¨ SYNOPSIS β¨
int fat_parse_long (struct inode *dir , loff_t *pos , struct buffer_head
**bh , struct msdos_dir_entry **de , wchar_t **unicode , unsigned char
*nr_slots );
No cap, that's the whole signature π
πΈ ARGUMENTS πΈ
dirβ Pointer to the inode that represents the directory. This is the directory we're snooping through πposβ On input, it holds the starting position to read from. On output, it gets updated with the new position. So it's both the before and the after, main character energy β¨bhβ Pointer to the buffer head that may be used for reading directory entries. It may be updated, so keep an eye on it πdeβ On input, it points to the current directory entry. On output, it points to the next directory entry. Glow-up moment fr fr πunicodeβ Pointer to a buffer where the parsed Unicode long filename will be stored. That's where the long filename lands πnr_slotsβ Pointer to a variable that will store the number of longname slots found. Slots found: counted, periodt π
π¦ DESCRIPTION π¦
Okay so here's the vibe check: this function returns 0 on success, a negative value on error, or one of the following return codes:
PARSE_INVALIDβ Directory entry is invalid. Red flag, bestie π©PARSE_NOT_LONGNAMEβ Directory entry does not contain longname. It's giving short-name energy, not longname energy πPARSE_EOFβ Directory has no more entries. That's a wrap, end of file, no more crumbs π
Bestie reminder: those return codes are literal values, so don't go renaming them. Copy them exactly, iykyk π
π₯ SEE ALSO π₯
- Kernel file
./fs/fat/dir.candfat_parse_short(9)β yes, go read the other one too, it's right there ππ«Ά
Later bestie! This page is from the ./fs/fat source/version corner, dated October 2026, and it's fat_parse_long(9) signing off π
ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms