lib/mpi: mpi_read_raw_from_sgl(): don't include leading zero SGEs in nbytes
[linux-2.6/btrfs-unstable.git] / fs / ubifs / misc.c
blob486a2844949ff2cc34a1c2d6692c8fa04223742f
1 #include <linux/kernel.h>
2 #include "ubifs.h"
4 /* Normal UBIFS messages */
5 void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...)
7 struct va_format vaf;
8 va_list args;
10 va_start(args, fmt);
12 vaf.fmt = fmt;
13 vaf.va = &args;
15 pr_notice("UBIFS (ubi%d:%d): %pV\n",
16 c->vi.ubi_num, c->vi.vol_id, &vaf);
18 va_end(args);
19 } \
21 /* UBIFS error messages */
22 void ubifs_err(const struct ubifs_info *c, const char *fmt, ...)
24 struct va_format vaf;
25 va_list args;
27 va_start(args, fmt);
29 vaf.fmt = fmt;
30 vaf.va = &args;
32 pr_err("UBIFS error (ubi%d:%d pid %d): %ps: %pV\n",
33 c->vi.ubi_num, c->vi.vol_id, current->pid,
34 __builtin_return_address(0),
35 &vaf);
37 va_end(args);
38 } \
40 /* UBIFS warning messages */
41 void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...)
43 struct va_format vaf;
44 va_list args;
46 va_start(args, fmt);
48 vaf.fmt = fmt;
49 vaf.va = &args;
51 pr_warn("UBIFS warning (ubi%d:%d pid %d): %ps: %pV\n",
52 c->vi.ubi_num, c->vi.vol_id, current->pid,
53 __builtin_return_address(0),
54 &vaf);
56 va_end(args);