mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
fsck: minor refactor
This commit is contained in:
parent
95d6ff6b52
commit
57a1a181b8
2 changed files with 13 additions and 7 deletions
15
src/fsck.c
15
src/fsck.c
|
@ -423,11 +423,16 @@ parse_opts (
|
|||
}
|
||||
SUBOPT_OPT_FALLBACK() {
|
||||
char *opt = SUBOPT_STR;
|
||||
if (opt[0] == '@') {
|
||||
bookmarkfs_opts_add(&info->backend_opts, opt + 1);
|
||||
} else if (opt[0] == '%') {
|
||||
bookmarkfs_opts_add(&info->handler_opts, opt + 1);
|
||||
} else {
|
||||
switch (*(opt++)) {
|
||||
case '@':
|
||||
bookmarkfs_opts_add(&info->backend_opts, opt);
|
||||
break;
|
||||
|
||||
case '%':
|
||||
bookmarkfs_opts_add(&info->handler_opts, opt);
|
||||
break;
|
||||
|
||||
default:
|
||||
return SUBOPT_ERR_BAD_KEY();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,8 +309,9 @@ parse_opts (
|
|||
}
|
||||
BACKEND_OPT_KEY("translit") {
|
||||
BACKEND_OPT_VAL_START
|
||||
if (1 == strlen(BACKEND_OPT_VAL_STR)) {
|
||||
translit = BACKEND_OPT_VAL_STR[0];
|
||||
char const *str = BACKEND_OPT_VAL_STR;
|
||||
if (str[0] != '\0' && str[0] != '/' && str[1] == '\0') {
|
||||
translit = str[0];
|
||||
}
|
||||
BACKEND_OPT_VAL_END
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue