]> git.sur5r.net Git - u-boot/commitdiff
ubi: ubifs: Turn off verbose prints
authorJoe Hershberger <joe.hershberger@ni.com>
Mon, 8 Apr 2013 10:32:49 +0000 (10:32 +0000)
committerTom Rini <trini@ti.com>
Thu, 11 Apr 2013 19:52:54 +0000 (15:52 -0400)
The prints are out of control.  SILENCE!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
README
common/cmd_ubi.c
drivers/mtd/mtdpart.c
drivers/mtd/ubi/ubi.h
fs/ubifs/ubifs.h

diff --git a/README b/README
index 81d3681dca70d4edb53de2ac9cb71facb98cb953..da8b68a5a95d09cd2d01593e4feb03fd12258186 100644 (file)
--- a/README
+++ b/README
@@ -2814,6 +2814,11 @@ FIT uImage format:
 
                Requires also defining CONFIG_RBTREE
 
+               CONFIG_UBI_SILENCE_MSG
+
+               Make the verbose messages from UBI stop printing.  This leaves
+               warnings and errors enabled.
+
 - UBIFS support
                CONFIG_CMD_UBIFS
 
@@ -2822,6 +2827,11 @@ FIT uImage format:
 
                Requires UBI support as well as CONFIG_LZO
 
+               CONFIG_UBIFS_SILENCE_MSG
+
+               Make the verbose messages from UBIFS stop printing.  This leaves
+               warnings and errors enabled.
+
 - SPL framework
                CONFIG_SPL
                Enable building of SPL globally.
index 41fbae734ba007670f70d81e8099f50f7982ae2f..5ba4feb485bd40faaa9a474588006abdd0e50eb5 100644 (file)
@@ -23,6 +23,9 @@
 #include <asm/errno.h>
 #include <jffs2/load_kernel.h>
 
+#undef ubi_msg
+#define ubi_msg(fmt, ...) printf("UBI: " fmt "\n", ##__VA_ARGS__)
+
 #define DEV_TYPE_NONE          0
 #define DEV_TYPE_NAND          1
 #define DEV_TYPE_ONENAND       2
index 96dcda2b2ba4a4bfa7226c14a9c9073dacc645fe..cbfc6796c7d6a96b3c81d353c0c2a141ac80b62c 100644 (file)
@@ -347,16 +347,18 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
                if (mtd_mod_by_eb(cur_offset, master) != 0) {
                        /* Round up to next erasesize */
                        slave->offset = (mtd_div_by_eb(cur_offset, master) + 1) * master->erasesize;
-                       printk(KERN_NOTICE "Moving partition %d: "
-                              "0x%012llx -> 0x%012llx\n", partno,
-                              (unsigned long long)cur_offset, (unsigned long long)slave->offset);
+                       debug("Moving partition %d: 0x%012llx -> 0x%012llx\n",
+                             partno, (unsigned long long)cur_offset,
+                             (unsigned long long)slave->offset);
                }
        }
        if (slave->mtd.size == MTDPART_SIZ_FULL)
                slave->mtd.size = master->size - slave->offset;
 
-       printk(KERN_NOTICE "0x%012llx-0x%012llx : \"%s\"\n", (unsigned long long)slave->offset,
-               (unsigned long long)(slave->offset + slave->mtd.size), slave->mtd.name);
+       debug("0x%012llx-0x%012llx : \"%s\"\n",
+             (unsigned long long)slave->offset,
+             (unsigned long long)(slave->offset + slave->mtd.size),
+             slave->mtd.name);
 
        /* let's do some sanity checks */
        if (slave->offset >= master->size) {
@@ -463,7 +465,7 @@ int add_mtd_partitions(struct mtd_info *master,
        if (mtd_partitions.next == NULL)
                INIT_LIST_HEAD(&mtd_partitions);
 
-       printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);
+       debug("Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);
 
        for (i = 0; i < nbparts; i++) {
                slave = add_one_partition(master, parts + i, i, cur_offset);
index 14c3a5f76c83c2e7682fabbf09ca8a4f2eceef5d..044e849907f436c6201189cce6bc74ea18c19eb7 100644 (file)
 #define UBI_NAME_STR "ubi"
 
 /* Normal UBI messages */
+#ifdef CONFIG_UBI_SILENCE_MSG
+#define ubi_msg(fmt, ...)
+#else
 #define ubi_msg(fmt, ...) printk(KERN_NOTICE "UBI: " fmt "\n", ##__VA_ARGS__)
+#endif
 /* UBI warning messages */
 #define ubi_warn(fmt, ...) printk(KERN_WARNING "UBI warning: %s: " fmt "\n", \
                                  __func__, ##__VA_ARGS__)
index 0af471afb911485508f990d1d1112dbdf12fac88..633631e4d4e44b7d9e39bb8cbea51bd07385f7e9 100644 (file)
@@ -463,8 +463,12 @@ static inline ino_t parent_ino(struct dentry *dentry)
 #define UBIFS_VERSION 1
 
 /* Normal UBIFS messages */
+#ifdef CONFIG_UBIFS_SILENCE_MSG
+#define ubifs_msg(fmt, ...)
+#else
 #define ubifs_msg(fmt, ...) \
                printk(KERN_NOTICE "UBIFS: " fmt "\n", ##__VA_ARGS__)
+#endif
 /* UBIFS error messages */
 #define ubifs_err(fmt, ...)                                                  \
        printk(KERN_ERR "UBIFS error (pid %d): %s: " fmt "\n", 0, \