UBI: make debugging messages dynamic

This patch adds a possibility to dynamically select UBI debugging
messages, instead of selecting them compile-time from the configuration
menu. This is much more flexible, and consistent with UBIFS, and this
also simplifies UBI Kconfig menu and the code.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
Artem Bityutskiy
2011-03-11 14:33:23 +02:00
parent 6f9fdf62db
commit b342efd4a4
3 changed files with 37 additions and 55 deletions

View File

@@ -27,6 +27,14 @@
#ifdef CONFIG_MTD_UBI_DEBUG
#include "ubi.h"
#include <linux/module.h>
#include <linux/moduleparam.h>
unsigned int ubi_msg_flags;
module_param_named(debug_msgs, ubi_msg_flags, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug_msgs, "Debug message type flags");
/**
* ubi_dbg_dump_ec_hdr - dump an erase counter header.