self_check_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… self_check_write β€” make sure write succeeded.

okay bestie, welcome to self_check_write(9) from the Kernel API Manual β€” yes that's the whole title, we're getting straight into it πŸ’–


✨ SYNOPSIS ✨

int self_check_write (struct ubi_device *ubi , const void *buf , int
pnum , int offset , int len );

🫢 ARGUMENTS 🫢

  • ubi β€” the UBI device description object. like, the whole vibe of the device we're dealing with ✨
  • buf β€” the buffer holding the data that were written. this is the receipts, keep them πŸ“
  • pnum β€” the physical eraseblock number that the data were written to. where it went, bestie πŸ“
  • offset β€” the offset within that physical eraseblock where the data were written to. precise placement, we love to see it πŸ’…
  • len β€” how many bytes were written. count 'em πŸ”’

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” this function reads back the data that were recently written and compares it against the original data buffer. and the data have to match. no cap, they gotta match fr fr.

If the data match, it returns zero 🌸. If they don't match β€” or if something just fails along the way β€” it returns a negative error code 😭.

literally a vibe check for your writes. if the write didn't slay, you're getting a negative number back, periodt.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/mtd/ubi/io.c β€” and the whole squad of related functions, all of them, no skipping πŸ‘‘:


and that's the whole page, bestie πŸŽ€ come back any time β€” this one lives at ./drivers/mtd/ubi and it's dated October 2026. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from