fat_parse_long(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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.c and fat_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