diff options
author | Richard Weinberger <richard@nod.at> | 2018-07-12 13:01:59 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-08-15 00:25:21 +0200 |
commit | c38c5a7f2e5056555c22e7603c2151b118f3a494 (patch) | |
tree | 3b1b99d7cf709d3c0196b2304383277d8d4dcb85 /fs/ubifs/misc.c | |
parent | 2e52eb74463f15c745d64948cedfaee722d6268c (diff) | |
download | linux-c38c5a7f2e5056555c22e7603c2151b118f3a494.tar.gz linux-c38c5a7f2e5056555c22e7603c2151b118f3a494.tar.bz2 linux-c38c5a7f2e5056555c22e7603c2151b118f3a494.zip |
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.c | 11 |
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]; +} |