Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
scan.c File Reference
#include "ubifs.h"

Go to the source code of this file.

Functions

int ubifs_scan_a_node (const struct ubifs_info *c, void *buf, int len, int lnum, int offs, int quiet)
 
struct ubifs_scan_lebubifs_start_scan (const struct ubifs_info *c, int lnum, int offs, void *sbuf)
 
void ubifs_end_scan (const struct ubifs_info *c, struct ubifs_scan_leb *sleb, int lnum, int offs)
 
int ubifs_add_snod (const struct ubifs_info *c, struct ubifs_scan_leb *sleb, void *buf, int offs)
 
void ubifs_scanned_corruption (const struct ubifs_info *c, int lnum, int offs, void *buf)
 
struct ubifs_scan_lebubifs_scan (const struct ubifs_info *c, int lnum, int offs, void *sbuf, int quiet)
 
void ubifs_scan_destroy (struct ubifs_scan_leb *sleb)
 

Function Documentation

int ubifs_add_snod ( const struct ubifs_info c,
struct ubifs_scan_leb sleb,
void buf,
int  offs 
)

ubifs_add_snod - add a scanned node to LEB scanning information. : UBIFS file-system description object : scanning information : buffer containing node : offset of node on flash

This function returns %0 on success and a negative error code on failure.

Definition at line 194 of file scan.c.

void ubifs_end_scan ( const struct ubifs_info c,
struct ubifs_scan_leb sleb,
int  lnum,
int  offs 
)

ubifs_end_scan - update LEB scanning information at end of scan. : UBIFS file-system description object : scanning information : logical eraseblock number : offset to start at (usually zero)

This function returns %0 on success and a negative error code on failure.

Definition at line 175 of file scan.c.

struct ubifs_scan_leb* ubifs_scan ( const struct ubifs_info c,
int  lnum,
int  offs,
void sbuf,
int  quiet 
)
read

ubifs_scan - scan a logical eraseblock. : UBIFS file-system description object : logical eraseblock number : offset to start at (usually zero) : scan buffer (must be of ->leb_size bytes in size) : print no messages

This function scans LEB number and returns complete information about its contents. Returns the scaned information in case of success and, %-EUCLEAN if the LEB neads recovery, and other negative error codes in case of failure.

If is non-zero, this function does not print large and scary error messages and flash dumps in case of errors.

Definition at line 267 of file scan.c.

int ubifs_scan_a_node ( const struct ubifs_info c,
void buf,
int  len,
int  lnum,
int  offs,
int  quiet 
)

ubifs_scan_a_node - scan for a node or padding. : UBIFS file-system description object : buffer to scan : length of buffer : logical eraseblock number : offset within the logical eraseblock : print no messages

This function returns a scanning code to indicate what was scanned.

Definition at line 69 of file scan.c.

void ubifs_scan_destroy ( struct ubifs_scan_leb sleb)

ubifs_scan_destroy - destroy LEB scanning information. : scanning information to free

Definition at line 367 of file scan.c.

void ubifs_scanned_corruption ( const struct ubifs_info c,
int  lnum,
int  offs,
void buf 
)

ubifs_scanned_corruption - print information after UBIFS scanned corruption. : UBIFS file-system description object : LEB number of corruption : offset of corruption : buffer containing corruption

Definition at line 238 of file scan.c.

struct ubifs_scan_leb* ubifs_start_scan ( const struct ubifs_info c,
int  lnum,
int  offs,
void sbuf 
)
read

ubifs_start_scan - create LEB scanning information at start of scan. : UBIFS file-system description object : logical eraseblock number : offset to start at (usually zero) : scan buffer (must be c->leb_size)

This function returns %0 on success and a negative error code on failure.

Definition at line 136 of file scan.c.