debug.h (008531f4c30dce606094be8f78c766218edd6754) debug.h (182ec4eee397543101a6db8906ed88727d3f7e53)
1/*
2 * JFFS2 -- Journalling Flash File System, Version 2.
3 *
4 * Copyright (C) 2001-2003 Red Hat, Inc.
5 *
6 * Created by David Woodhouse <dwmw2@infradead.org>
7 *
8 * For licensing information, see the file 'LICENCE' in this directory.
9 *
1/*
2 * JFFS2 -- Journalling Flash File System, Version 2.
3 *
4 * Copyright (C) 2001-2003 Red Hat, Inc.
5 *
6 * Created by David Woodhouse <dwmw2@infradead.org>
7 *
8 * For licensing information, see the file 'LICENCE' in this directory.
9 *
10 * $Id: debug.h,v 1.20 2005/10/24 16:22:34 dedekind Exp $
10 * $Id: debug.h,v 1.21 2005/11/07 11:14:39 gleixner Exp $
11 *
12 */
13#ifndef _JFFS2_DEBUG_H_
14#define _JFFS2_DEBUG_H_
15
16#include <linux/config.h>
17
18#ifndef CONFIG_JFFS2_FS_DEBUG
19#define CONFIG_JFFS2_FS_DEBUG 0
20#endif
21
22#if CONFIG_JFFS2_FS_DEBUG > 0
23/* Enable "paranoia" checks and dumps */
24#define JFFS2_DBG_PARANOIA_CHECKS
25#define JFFS2_DBG_DUMPS
26
11 *
12 */
13#ifndef _JFFS2_DEBUG_H_
14#define _JFFS2_DEBUG_H_
15
16#include <linux/config.h>
17
18#ifndef CONFIG_JFFS2_FS_DEBUG
19#define CONFIG_JFFS2_FS_DEBUG 0
20#endif
21
22#if CONFIG_JFFS2_FS_DEBUG > 0
23/* Enable "paranoia" checks and dumps */
24#define JFFS2_DBG_PARANOIA_CHECKS
25#define JFFS2_DBG_DUMPS
26
27/*
27/*
28 * By defining/undefining the below macros one may select debugging messages
29 * fro specific JFFS2 subsystems.
30 */
31#define JFFS2_DBG_READINODE_MESSAGES
32#define JFFS2_DBG_FRAGTREE_MESSAGES
33#define JFFS2_DBG_DENTLIST_MESSAGES
34#define JFFS2_DBG_NODEREF_MESSAGES
35#define JFFS2_DBG_INOCACHE_MESSAGES

--- 4 unchanged lines hidden (view full) ---

40#if CONFIG_JFFS2_FS_DEBUG > 1
41#define JFFS2_DBG_FRAGTREE2_MESSAGES
42#define JFFS2_DBG_MEMALLOC_MESSAGES
43#endif
44
45/* Sanity checks are supposed to be light-weight and enabled by default */
46#define JFFS2_DBG_SANITY_CHECKS
47
28 * By defining/undefining the below macros one may select debugging messages
29 * fro specific JFFS2 subsystems.
30 */
31#define JFFS2_DBG_READINODE_MESSAGES
32#define JFFS2_DBG_FRAGTREE_MESSAGES
33#define JFFS2_DBG_DENTLIST_MESSAGES
34#define JFFS2_DBG_NODEREF_MESSAGES
35#define JFFS2_DBG_INOCACHE_MESSAGES

--- 4 unchanged lines hidden (view full) ---

40#if CONFIG_JFFS2_FS_DEBUG > 1
41#define JFFS2_DBG_FRAGTREE2_MESSAGES
42#define JFFS2_DBG_MEMALLOC_MESSAGES
43#endif
44
45/* Sanity checks are supposed to be light-weight and enabled by default */
46#define JFFS2_DBG_SANITY_CHECKS
47
48/*
48/*
49 * Dx() are mainly used for debugging messages, they must go away and be
50 * superseded by nicer dbg_xxx() macros...
51 */
52#if CONFIG_JFFS2_FS_DEBUG > 0
53#define D1(x) x
54#else
55#define D1(x)
56#endif

--- 29 unchanged lines hidden (view full) ---

86 } while(0)
87
88#define JFFS2_WARNING(fmt, ...) \
89 do { \
90 printk(JFFS2_WARN_MSG_PREFIX \
91 " (%d) %s: " fmt, current->pid, \
92 __FUNCTION__, ##__VA_ARGS__); \
93 } while(0)
49 * Dx() are mainly used for debugging messages, they must go away and be
50 * superseded by nicer dbg_xxx() macros...
51 */
52#if CONFIG_JFFS2_FS_DEBUG > 0
53#define D1(x) x
54#else
55#define D1(x)
56#endif

--- 29 unchanged lines hidden (view full) ---

86 } while(0)
87
88#define JFFS2_WARNING(fmt, ...) \
89 do { \
90 printk(JFFS2_WARN_MSG_PREFIX \
91 " (%d) %s: " fmt, current->pid, \
92 __FUNCTION__, ##__VA_ARGS__); \
93 } while(0)
94
94
95#define JFFS2_NOTICE(fmt, ...) \
96 do { \
97 printk(JFFS2_NOTICE_MSG_PREFIX \
98 " (%d) %s: " fmt, current->pid, \
99 __FUNCTION__, ##__VA_ARGS__); \
100 } while(0)
101
102#define JFFS2_DEBUG(fmt, ...) \
103 do { \
104 printk(JFFS2_DBG_MSG_PREFIX \
105 " (%d) %s: " fmt, current->pid, \
106 __FUNCTION__, ##__VA_ARGS__); \
107 } while(0)
108
95#define JFFS2_NOTICE(fmt, ...) \
96 do { \
97 printk(JFFS2_NOTICE_MSG_PREFIX \
98 " (%d) %s: " fmt, current->pid, \
99 __FUNCTION__, ##__VA_ARGS__); \
100 } while(0)
101
102#define JFFS2_DEBUG(fmt, ...) \
103 do { \
104 printk(JFFS2_DBG_MSG_PREFIX \
105 " (%d) %s: " fmt, current->pid, \
106 __FUNCTION__, ##__VA_ARGS__); \
107 } while(0)
108
109/*
109/*
110 * We split our debugging messages on several parts, depending on the JFFS2
111 * subsystem the message belongs to.
112 */
113/* Read inode debugging messages */
114#ifdef JFFS2_DBG_READINODE_MESSAGES
115#define dbg_readinode(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__)
116#else
117#define dbg_readinode(fmt, ...)

--- 162 unchanged lines hidden ---
110 * We split our debugging messages on several parts, depending on the JFFS2
111 * subsystem the message belongs to.
112 */
113/* Read inode debugging messages */
114#ifdef JFFS2_DBG_READINODE_MESSAGES
115#define dbg_readinode(fmt, ...) JFFS2_DEBUG(fmt, ##__VA_ARGS__)
116#else
117#define dbg_readinode(fmt, ...)

--- 162 unchanged lines hidden ---