summaryrefslogtreecommitdiff
path: root/fs/ubifs/misc.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-07-12 14:01:59 +0300
committerRichard Weinberger <richard@nod.at>2018-08-15 01:25:21 +0300
commitc38c5a7f2e5056555c22e7603c2151b118f3a494 (patch)
tree3b1b99d7cf709d3c0196b2304383277d8d4dcb85 /fs/ubifs/misc.c
parent2e52eb74463f15c745d64948cedfaee722d6268c (diff)
downloadlinux-c38c5a7f2e5056555c22e7603c2151b118f3a494.tar.xz
ubifs: Allow setting assert action as mount parameter
Expose our three options to userspace. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/misc.c')
-rw-r--r--fs/ubifs/misc.c11
1 files changed, 11 insertions, 0 deletions
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];
+}