UBIFS: extend debug/message capabilities
[deliverable/linux.git] / fs / ubifs / ubifs.h
index 2911d2d23456861d3f3606260cd80fff9e762de7..de759022f3d636d74a62445ab33bd2b9b0e48dac 100644 (file)
 #define UBIFS_VERSION 1
 
 /* Normal UBIFS messages */
-#define ubifs_msg(fmt, ...) pr_notice("UBIFS: " fmt "\n", ##__VA_ARGS__)
+#define ubifs_msg(c, fmt, ...)                                      \
+       pr_notice("UBIFS (ubi%d:%d): " fmt "\n",                    \
+                 (c)->vi.ubi_num, (c)->vi.vol_id, ##__VA_ARGS__)
 /* UBIFS error messages */
-#define ubifs_err(fmt, ...)                                         \
-       pr_err("UBIFS error (pid %d): %s: " fmt "\n", current->pid, \
+#define ubifs_err(c, fmt, ...)                                      \
+       pr_err("UBIFS error (ubi%d:%d pid %d): %s: " fmt "\n",      \
+              (c)->vi.ubi_num, (c)->vi.vol_id, current->pid,       \
               __func__, ##__VA_ARGS__)
 /* UBIFS warning messages */
-#define ubifs_warn(fmt, ...)                                        \
-       pr_warn("UBIFS warning (pid %d): %s: " fmt "\n",            \
-               current->pid, __func__, ##__VA_ARGS__)
+#define ubifs_warn(c, fmt, ...)                                     \
+       pr_warn("UBIFS warning (ubi%d:%d pid %d): %s: " fmt "\n",   \
+               (c)->vi.ubi_num, (c)->vi.vol_id, current->pid,      \
+               __func__, ##__VA_ARGS__)
 /*
  * A variant of 'ubifs_err()' which takes the UBIFS file-sytem description
  * object as an argument.
@@ -59,7 +63,7 @@
 #define ubifs_errc(c, fmt, ...)                                     \
        do {                                                        \
                if (!(c)->probing)                                  \
-                       ubifs_err(fmt, ##__VA_ARGS__);              \
+                       ubifs_err(c, fmt, ##__VA_ARGS__);           \
        } while (0)
 
 /* UBIFS file system VFS magic number */
@@ -1787,10 +1791,10 @@ long ubifs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 /* compressor.c */
 int __init ubifs_compressors_init(void);
 void ubifs_compressors_exit(void);
-void ubifs_compress(const void *in_buf, int in_len, void *out_buf, int *out_len,
-                   int *compr_type);
-int ubifs_decompress(const void *buf, int len, void *out, int *out_len,
-                    int compr_type);
+void ubifs_compress(const struct ubifs_info *c, const void *in_buf, int in_len,
+                   void *out_buf, int *out_len, int *compr_type);
+int ubifs_decompress(const struct ubifs_info *c, const void *buf, int len,
+                    void *out, int *out_len, int compr_type);
 
 #include "debug.h"
 #include "misc.h"
This page took 0.026969 seconds and 5 git commands to generate.