Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
debug.h File Reference
#include <linux/random.h>

Go to the source code of this file.

Data Structures

struct  ubi_debug_info
 

Macros

#define ubi_assert(expr)
 
#define ubi_dbg_print_hex_dump(l, ps, pt, r, g, b, len, a)   print_hex_dump(l, ps, pt, r, g, b, len, a)
 
#define ubi_dbg_msg(type, fmt,...)
 
#define dbg_gen(fmt,...)   ubi_dbg_msg("gen", fmt, ##__VA_ARGS__)
 
#define dbg_eba(fmt,...)   ubi_dbg_msg("eba", fmt, ##__VA_ARGS__)
 
#define dbg_wl(fmt,...)   ubi_dbg_msg("wl", fmt, ##__VA_ARGS__)
 
#define dbg_io(fmt,...)   ubi_dbg_msg("io", fmt, ##__VA_ARGS__)
 
#define dbg_bld(fmt,...)   ubi_dbg_msg("bld", fmt, ##__VA_ARGS__)
 
#define UBI_DFS_DIR_NAME   "ubi%d"
 
#define UBI_DFS_DIR_LEN   (3 + 2 + 1)
 

Functions

void ubi_dump_flash (struct ubi_device *ubi, int pnum, int offset, int len)
 
void ubi_dump_ec_hdr (const struct ubi_ec_hdr *ec_hdr)
 
void ubi_dump_vid_hdr (const struct ubi_vid_hdr *vid_hdr)
 
void ubi_dump_vol_info (const struct ubi_volume *vol)
 
void ubi_dump_vtbl_record (const struct ubi_vtbl_record *r, int idx)
 
void ubi_dump_av (const struct ubi_ainf_volume *av)
 
void ubi_dump_aeb (const struct ubi_ainf_peb *aeb, int type)
 
void ubi_dump_mkvol_req (const struct ubi_mkvol_req *req)
 
int ubi_self_check_all_ff (struct ubi_device *ubi, int pnum, int offset, int len)
 
int ubi_debugging_init_dev (struct ubi_device *ubi)
 
void ubi_debugging_exit_dev (struct ubi_device *ubi)
 
int ubi_debugfs_init (void)
 
void ubi_debugfs_exit (void)
 
int ubi_debugfs_init_dev (struct ubi_device *ubi)
 
void ubi_debugfs_exit_dev (struct ubi_device *ubi)
 

Macro Definition Documentation

#define dbg_bld (   fmt,
  ... 
)    ubi_dbg_msg("bld", fmt, ##__VA_ARGS__)

Definition at line 54 of file debug.h.

#define dbg_eba (   fmt,
  ... 
)    ubi_dbg_msg("eba", fmt, ##__VA_ARGS__)

Definition at line 48 of file debug.h.

#define dbg_gen (   fmt,
  ... 
)    ubi_dbg_msg("gen", fmt, ##__VA_ARGS__)

Definition at line 46 of file debug.h.

#define dbg_io (   fmt,
  ... 
)    ubi_dbg_msg("io", fmt, ##__VA_ARGS__)

Definition at line 52 of file debug.h.

#define dbg_wl (   fmt,
  ... 
)    ubi_dbg_msg("wl", fmt, ##__VA_ARGS__)

Definition at line 50 of file debug.h.

#define ubi_assert (   expr)
Value:
do { \
if (unlikely(!(expr))) { \
pr_crit("UBI assert failed in %s at %u (pid %d)\n", \
__func__, __LINE__, current->pid); \
dump_stack(); \
} \
} while (0)

Definition at line 30 of file debug.h.

#define ubi_dbg_msg (   type,
  fmt,
  ... 
)
Value:
pr_debug("UBI DBG " type " (pid %d): " fmt "\n", current->pid, \
##__VA_ARGS__)

Definition at line 41 of file debug.h.

#define ubi_dbg_print_hex_dump (   l,
  ps,
  pt,
  r,
  g,
  b,
  len,
  a 
)    print_hex_dump(l, ps, pt, r, g, b, len, a)

Definition at line 38 of file debug.h.

#define UBI_DFS_DIR_LEN   (3 + 2 + 1)

Definition at line 75 of file debug.h.

#define UBI_DFS_DIR_NAME   "ubi%d"

Definition at line 74 of file debug.h.

Function Documentation

void ubi_debugfs_exit ( void  )

ubi_debugfs_exit - remove UBI debugfs directory.

Definition at line 278 of file debug.c.

void ubi_debugfs_exit_dev ( struct ubi_device ubi)

dbg_debug_exit_dev - free all debugfs files corresponding to device : UBI device description object

Definition at line 471 of file debug.c.

int ubi_debugfs_init ( void  )

ubi_debugfs_init - create UBI debugfs directory.

Create UBI debugfs directory. Returns zero in case of success and a negative error code in case of failure.

Definition at line 258 of file debug.c.

int ubi_debugfs_init_dev ( struct ubi_device ubi)

ubi_debugfs_init_dev - initialize debugfs for an UBI device. : UBI device description object

This function creates all debugfs files for UBI device . Returns zero in case of success and a negative error code in case of failure.

Definition at line 395 of file debug.c.

void ubi_debugging_exit_dev ( struct ubi_device ubi)

ubi_debugging_exit_dev - free debugging data for an UBI device. : UBI device description object

Definition at line 241 of file debug.c.

int ubi_debugging_init_dev ( struct ubi_device ubi)

ubi_debugging_init_dev - initialize debugging for an UBI device. : UBI device description object

This function initializes debugging-related data for UBI device . Returns zero in case of success and a negative error code in case of failure.

Definition at line 228 of file debug.c.

void ubi_dump_aeb ( const struct ubi_ainf_peb aeb,
int  type 
)

ubi_dump_aeb - dump a &struct ubi_ainf_peb object. : the object to dump : object type: 0 - not corrupted, 1 - corrupted

Definition at line 188 of file debug.c.

void ubi_dump_av ( const struct ubi_ainf_volume av)

ubi_dump_av - dump a &struct ubi_ainf_volume object. : the object to dump

Definition at line 170 of file debug.c.

void ubi_dump_ec_hdr ( const struct ubi_ec_hdr ec_hdr)

ubi_dump_ec_hdr - dump an erase counter header. : the erase counter header to dump

Definition at line 63 of file debug.c.

void ubi_dump_flash ( struct ubi_device ubi,
int  pnum,
int  offset,
int  len 
)

ubi_dump_flash - dump a region of flash. : UBI device description object : the physical eraseblock number to dump : the starting offset within the physical eraseblock to dump : the length of the region to dump

Definition at line 34 of file debug.c.

void ubi_dump_mkvol_req ( const struct ubi_mkvol_req req)

ubi_dump_mkvol_req - dump a &struct ubi_mkvol_req object. : the object to dump

Definition at line 204 of file debug.c.

void ubi_dump_vid_hdr ( const struct ubi_vid_hdr vid_hdr)

ubi_dump_vid_hdr - dump a volume identifier header. : the volume identifier header to dump

Definition at line 82 of file debug.c.

void ubi_dump_vol_info ( const struct ubi_volume vol)

ubi_dump_vol_info - dump volume information. : UBI volume description object

Definition at line 107 of file debug.c.

void ubi_dump_vtbl_record ( const struct ubi_vtbl_record r,
int  idx 
)

ubi_dump_vtbl_record - dump a &struct ubi_vtbl_record object. : the object to dump : volume table index

Definition at line 138 of file debug.c.

int ubi_self_check_all_ff ( struct ubi_device ubi,
int  pnum,
int  offset,
int  len 
)

ubi_self_check_all_ff - check that a region of flash is empty. : UBI device description object : the physical eraseblock number to check : the starting offset within the physical eraseblock to check : the length of the region to check

This function returns zero if only 0xFF bytes are present at offset of the physical eraseblock , and a negative error code if not or if an error occurred.

Definition at line 1394 of file io.c.