From c38c5a7f2e5056555c22e7603c2151b118f3a494 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Thu, 12 Jul 2018 13:01:59 +0200 Subject: ubifs: Allow setting assert action as mount parameter Expose our three options to userspace. Signed-off-by: Richard Weinberger --- fs/ubifs/misc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'fs/ubifs/misc.c') diff --git a/fs/ubifs/misc.c b/fs/ubifs/misc.c index 586fd5b578a7..cd23de0f211d 100644 --- a/fs/ubifs/misc.c +++ b/fs/ubifs/misc.c @@ -56,3 +56,14 @@ void ubifs_warn(const struct ubifs_info *c, const char *fmt, ...) va_end(args); } + +static char *assert_names[] = { + [ASSACT_REPORT] = "report", + [ASSACT_RO] = "read-only", + [ASSACT_PANIC] = "panic", +}; + +const char *ubifs_assert_action_name(struct ubifs_info *c) +{ + return assert_names[c->assert_action]; +} -- cgit v1.2.3-59-g8ed1b