---
name: "nand_lock"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/nand_lock"
---

# nand\_lock(9)

\[REPLACEABLE\] locks all blocks present in the device

## NAME

nand\_lock - \[REPLACEABLE\] locks all blocks present in the device

## SYNOPSIS

**int nand\_lock(struct mtd\_info \*** *mtd***, loff\_t** *ofs***, uint64\_t** *len***);**

## ARGUMENTS

*mtd*

mtd info

*ofs*

offset to start unlock from

*len*

length to unlock

## DESCRIPTION

This feature is not supported in many NAND parts. 'Micron' NAND parts do have this feature, but it allows only to lock all blocks, not for specified range for block. Implementing 'lock' feature by making use of 'unlock', for now.

Returns lock status.

## AUTHOR

**Thomas Gleixner** \<tglx@linutronix.de\>

Author.

## COPYRIGHT
