1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>search_bbt</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="MTD NAND Driver Programming Interface"><link rel="up" href="intfunctions.html" title="Chapter 11. Internal Functions Provided"><link rel="prev" href="API-create-bbt.html" title="create_bbt"><link rel="next" href="API-search-read-bbts.html" title="search_read_bbts"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">search_bbt</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-create-bbt.html">Prev</a> </td><th width="60%" align="center">Chapter 11. Internal Functions Provided</th><td width="20%" align="right"> <a accesskey="n" href="API-search-read-bbts.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-search-bbt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>search_bbt — 2 [GENERIC] scan the device for a specific bad block table 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">search_bbt </b>(</code></td><td>struct mtd_info * <var class="pdparam">mtd</var>, </td></tr><tr><td> </td><td>uint8_t * <var class="pdparam">buf</var>, </td></tr><tr><td> </td><td>struct nand_bbt_descr * <var class="pdparam">td</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1103557708"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>mtd</code></em></span></dt><dd><p> 4 MTD device structure 5 </p></dd><dt><span class="term"><em class="parameter"><code>buf</code></em></span></dt><dd><p> 6 temporary buffer 7 </p></dd><dt><span class="term"><em class="parameter"><code>td</code></em></span></dt><dd><p> 8 descriptor for the bad block table 9 </p></dd></dl></div></div><div class="refsect1"><a name="idp1103561236"></a><h2>Description</h2><p> 10 Read the bad block table by searching for a given ident pattern. Search is 11 preformed either from the beginning up or from the end of the device 12 downwards. The search starts always at the start of a block. If the option 13 NAND_BBT_PERCHIP is given, each chip is searched for a bbt, which contains 14 the bad block information of this chip. This is necessary to provide support 15 for certain DOC devices. 16 </p><p> 17 18 The bbt ident pattern resides in the oob area of the first page in a block. 19</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-create-bbt.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intfunctions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-search-read-bbts.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">create_bbt</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">search_read_bbts</span></td></tr></table></div></body></html> 20