onenand_lock_user_prot_reg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… onenand_lock_user_prot_reg(9) β€” a.k.a. the Kernel API Manual glow-up

okay so bestie, welcome to the Kernel API Manual page for onenand_lock_user_prot_reg(9) β€” yes that's the whole name, it's giving "my parents let me pick my own name and I panicked" energy but we respect it πŸ’–


✨ NAME ✨

onenand_lock_user_prot_reg β€” [MTD Interface] Lock user OTP area πŸ”’

Like, that's it. That's the whole vibe. It locks the user OTP area. Iconic behaviour honestly.


πŸ¦‹ SYNOPSIS πŸ¦‹

int onenand_lock_user_prot_reg (struct mtd_info *mtd , loff_t from ,
       size_t len );

Three args, one int coming back at you. Short and slay ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • mtd β€” the MTD device structure, i.e. the actual flash boi you're talking to 🫢
  • from β€” the offset to lock. Where the locking starts, periodt.
  • len β€” number of bytes to unlock. Yeah. The page literally says unlock here even though the function is a lock function β€” I'm not touching it, that's canon, we don't rewrite the source material πŸ’€

🌸 DESCRIPTION 🌸

Write lock mark on spare area in page 0 in OTP block. That's the whole thing! No cap. It goes and drops a lil lock mark in the spare area, on page 0, inside the OTP block. Little mark, big meaning πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/mtd/nand/onenand/onenand_base.c β€” and now, the friend group. The whole entire squad, in order, no one gets left out πŸ’œ:


and that's the page!! mwah πŸ’‹

a tiny sign-off from your girl: this one lives over in ./drivers/mtd/nand/onenand, it's dated October 2026, and it answers to the name onenand_lock_user_prot_reg(9). go lock that user OTP area bestie, you got this πŸŒˆβ­πŸŽ€

πŸ“¦ where this page comes from