diff options
Diffstat (limited to 'fsck.c')
-rw-r--r-- | fsck.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -131,6 +131,14 @@ static int parse_msg_type(const char *str) die("Unknown fsck message type: '%s'", str); } +int is_valid_msg_type(const char *msg_id, const char *msg_type) +{ + if (parse_msg_id(msg_id) < 0) + return 0; + parse_msg_type(msg_type); + return 1; +} + void fsck_set_msg_type(struct fsck_options *options, const char *msg_id, const char *msg_type) { |