'\" t .\" Title: search_bbt .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Internal Functions Provided .\" Source: Kernel Hackers Manual 4.12.2 .\" Language: English .\" .TH "SEARCH_BBT" "9" "July 2017" "Kernel Hackers Manual 4\&.12\&" "Internal Functions Provided" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" search_bbt \- [GENERIC] scan the device for a specific bad block table .SH "SYNOPSIS" .HP \w'int\ search_bbt('u .BI "int search_bbt(struct\ mtd_info\ *\ " "mtd" ", uint8_t\ *\ " "buf" ", struct\ nand_bbt_descr\ *\ " "td" ");" .SH "ARGUMENTS" .PP \fIstruct mtd_info * mtd\fR .RS 4 MTD device structure .RE .PP \fIuint8_t * buf\fR .RS 4 temporary buffer .RE .PP \fIstruct nand_bbt_descr * td\fR .RS 4 descriptor for the bad block table .RE .SH "DESCRIPTION" .PP Read the bad block table by searching for a given ident pattern\&. Search is preformed either from the beginning up or from the end of the device downwards\&. The search starts always at the start of a block\&. If the option NAND_BBT_PERCHIP is given, each chip is searched for a bbt, which contains the bad block information of this chip\&. This is necessary to provide support for certain DOC devices\&. .PP The bbt ident pattern resides in the oob area of the first page in a block\&. .SH "AUTHOR" .PP \fBThomas Gleixner\fR <\&tglx@linutronix.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br