onenand_do_lock_cmd(9)
π onenand_do_lock_cmd(9) β like, the OneNAND lock/unlock block situation
okay so bestie, we're in the Kernel API Manual today and the star of the show is onenand_do_lock_cmd β it lives in the OneNAND Interface corner of the kernel and it's literally the function that locks or unlocks your block(s). no cap, that's the whole vibe. π
β¨ NAME β¨
onenand_do_lock_cmd β [OneNAND Interface] lock or unlock block(s). that's it, that's the girl. π¦
πΈ SYNOPSIS πΈ
int onenand_do_lock_cmd (struct mtd_info *mtd , loff_t ofs , size_t len
, int cmd );
she takes four things and returns an int, periodt. β¨
π§ ARGUMENTS π§
mtdβ the MTD device structure. this is the whole device she's working with, iykyk.ofsβ the offset, relative to the start of the mtd. like, where in the device we're pointing at. πlenβ the number of bytes you want locked or unlocked. how much we're doing here.cmdβ the lock or unlock command. this is the instruction that tells her which way to go, bestie. π₯
π DESCRIPTION π
so what does she actually do? she locks or unlocks one or more blocks. that's the whole job. one block, several blocks, she's got it. slay. π
β SEE ALSO β
okay this is the part where the whole friend group shows up, because she does not exist in a vacuum. the kernel file is ./drivers/mtd/nand/onenand/onenand_base.c and honestly the whole squad is listed here, so let's give them their moment:
onenand_readw(9)onenand_writew(9)onenand_block_address(9)onenand_bufferram_address(9)onenand_page_address(9)onenand_buffer_address(9)flexonenand_block(9)flexonenand_addr(9)onenand_get_density(9)flexonenand_region(9)onenand_command(9)onenand_read_ecc(9)onenand_wait(9)onenand_bufferram_offset(9)onenand_read_bufferram(9)onenand_sync_read_bufferram(9)onenand_write_bufferram(9)onenand_get_2x_blockpage(9)onenand_check_bufferram(9)onenand_update_bufferram(9)onenand_invalidate_bufferram(9)onenand_get_device(9)onenand_release_device(9)onenand_transfer_auto_oob(9)onenand_recover_lsb(9)onenand_mlc_read_ops_nolock(9)onenand_read_ops_nolock(9)onenand_read_oob_nolock(9)onenand_read_oob(9)onenand_bbt_wait(9)onenand_bbt_read_oob(9)onenand_verify_oob(9)onenand_verify(9)onenand_panic_write(9)onenand_fill_auto_oob(9)onenand_write_ops_nolock(9)onenand_write_oob_nolock(9)onenand_write_oob(9)onenand_block_isbad_nolock(9)onenand_multiblock_erase(9)onenand_block_by_block_erase(9)onenand_erase(9)onenand_sync(9)onenand_block_isbad(9)onenand_default_block_markbad(9)onenand_block_markbad(9)onenand_lock(9)onenand_unlock(9)onenand_check_lock_status(9)onenand_unlock_all(9)onenand_otp_command(9)onenand_otp_write_oob_nolock(9)do_otp_read(9)do_otp_write(9)do_otp_lock(9)onenand_otp_walk(9)onenand_get_fact_prot_info(9)onenand_read_fact_prot_reg(9)onenand_get_user_prot_info(9)onenand_read_user_prot_reg(9)onenand_write_user_prot_reg(9)onenand_lock_user_prot_reg(9)onenand_check_features(9)onenand_print_device_info(9)onenand_check_maf(9)flexonenand_get_boundary(9)flexonenand_get_size(9)flexonenand_check_blocks_erased(9)onenand_chip_probe(9)onenand_probe(9)onenand_suspend(9)onenand_resume(9)onenand_scan(9)onenand_release(9)
like, that's the entire group chat and she's in every single one of those conversations. obsessed. π
and that's the page, bestie!! this cutie came out of ./drivers/mtd/nand/onenand and it's dated October 2026, filed under onenand_do_lock_cmd(9) β mwah, go lock some blocks, ily πβ¨π«Ά
π¦ 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