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() {
|
SUBOPT_OPT_FALLBACK() {
|
||||||
char *opt = SUBOPT_STR;
|
char *opt = SUBOPT_STR;
|
||||||
if (opt[0] == '@') {
|
switch (*(opt++)) {
|
||||||
bookmarkfs_opts_add(&info->backend_opts, opt + 1);
|
case '@':
|
||||||
} else if (opt[0] == '%') {
|
bookmarkfs_opts_add(&info->backend_opts, opt);
|
||||||
bookmarkfs_opts_add(&info->handler_opts, opt + 1);
|
break;
|
||||||
} else {
|
|
||||||
|
case '%':
|
||||||
|
bookmarkfs_opts_add(&info->handler_opts, opt);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
return SUBOPT_ERR_BAD_KEY();
|
return SUBOPT_ERR_BAD_KEY();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,8 +309,9 @@ parse_opts (
|
||||||
}
|
}
|
||||||
BACKEND_OPT_KEY("translit") {
|
BACKEND_OPT_KEY("translit") {
|
||||||
BACKEND_OPT_VAL_START
|
BACKEND_OPT_VAL_START
|
||||||
if (1 == strlen(BACKEND_OPT_VAL_STR)) {
|
char const *str = BACKEND_OPT_VAL_STR;
|
||||||
translit = BACKEND_OPT_VAL_STR[0];
|
if (str[0] != '\0' && str[0] != '/' && str[1] == '\0') {
|
||||||
|
translit = str[0];
|
||||||
}
|
}
|
||||||
BACKEND_OPT_VAL_END
|
BACKEND_OPT_VAL_END
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue