ubifs_scan(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ubifs_scan(9) β€” like, the Kernel API Manual page, bestie

Okay so this is ubifs_scan, straight out of the Kernel API Manual, and I'm gonna walk you through it like we're texting at 2am. Stay with me, it's actually not that deep 🫢


✨ NAME ✨

ubifs_scan β€” scan a logical eraseblock. That's it. That's the whole vibe check. πŸŽ€


🌸 SYNOPSIS 🌸

struct ubifs_scan_leb * ubifs_scan (const struct ubifs_info *c , int lnum , int offs , void *sbuf , int quiet );

Not me copying this character for character because you need it exactly like this πŸ˜­πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • c β€” the UBIFS file-system description object. Your main character struct, lowkey.
  • lnum β€” logical eraseblock number. Which LEB we're looking at πŸ‘€
  • offs β€” offset to start at (usually zero, fr fr).
  • sbuf β€” the scan buffer. Heads up bestie: it must be of c->leb_size bytes in size. No exceptions, no cap πŸ’€
  • quiet β€” print no messages. Shhh. πŸ™ˆ

🧚 DESCRIPTION 🧚

So what does this bad boy do? It scans LEB number lnum and returns complete information about its contents. Iconic behavior, honestly. ✨

It returns the scanned information in case of success. And if the LEB neads recovery, it hands you back -EUCLEAN. Any other failure? You get other negative error codes. Slay, but make it errors. 😭

And about quiet β€” if it's non-zero, this function does not print large and scary error messages and flash dumps when errors happen. So if you're not in the mood for the dramatic flash dump monologue, just set that flag and move on. 🫢


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/ubifs/scan.c, plus the whole friend group: scan_padding_bytes(9), ubifs_scan_a_node(9), ubifs_start_scan(9), ubifs_end_scan(9), ubifs_add_snod(9), ubifs_scanned_corruption(9), ubifs_scan_destroy(9). Go read them, iykyk πŸ’œ


πŸŽ€ the little sign-off πŸŽ€

This page lives in ./fs/ubifs, and it's dated October 2026, filed under ubifs_scan(9). Periodt. β­πŸŒˆπŸ’…

πŸ“¦ where this page comes from