~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/ubifs/misc.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 #include <linux/kernel.h>
  3 #include "ubifs.h"
  4 
  5 /* Normal UBIFS messages */
  6 void ubifs_msg(const struct ubifs_info *c, const char *fmt, ...)
  7 {
  8         struct va_format vaf;
  9         va_list args;
 10 
 11         va_start(args, fmt);
 12 
 13         vaf.fmt = fmt;
 14         vaf.va = &args;
 15 
 16         pr_notice("UBIFS (ubi%d:%d): %pV\n",
 17                   c->vi.ubi_num, c->vi.vol_id, &vaf);
 18 
 19         va_end(args);
 20 }                                                                   \
 21 
 22 /* UBIFS error messages */
 23 void ubifs_err(const struct ubifs_info *c, const char *fmt, ...)
 24 {
 25         struct va_format vaf;
 26         va_list args;
 27 
 28         va_start(args, fmt);
 29 
 30         vaf.fmt = fmt;
 31         vaf.va = &args;
 32 
 33         pr_err("UBIFS error (ubi%d:%d pid %d): %ps: %pV\n",
 34                c->vi.ubi_num, c->vi.vol_id, current->pid,
 35                __builtin_return_address(0),
 36                &vaf);
 37 
 38         va_end(args);
 39 }                                                                   \
 40 
 41 /* UBIFS warning messages */
 42 void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...)
 43 {
 44         struct va_format vaf;
 45         va_list args;
 46 
 47         va_start(args, fmt);
 48 
 49         vaf.fmt = fmt;
 50         vaf.va = &args;
 51 
 52         pr_warn("UBIFS warning (ubi%d:%d pid %d): %ps: %pV\n",
 53                 c->vi.ubi_num, c->vi.vol_id, current->pid,
 54                 __builtin_return_address(0),
 55                 &vaf);
 56 
 57         va_end(args);
 58 }
 59 
 60 static char *assert_names[] = {
 61         [ASSACT_REPORT] = "report",
 62         [ASSACT_RO] = "read-only",
 63         [ASSACT_PANIC] = "panic",
 64 };
 65 
 66 const char *ubifs_assert_action_name(struct ubifs_info *c)
 67 {
 68         return assert_names[c->assert_action];
 69 }
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php