mount-tool: honor arg_canonicalize for ACTION_UMOUNT path_is_absolute() check too (#37398)

Split out from #36337
This commit is contained in:
Yu Watanabe
2025-05-10 03:22:20 +09:00
committed by GitHub
2 changed files with 5 additions and 10 deletions
+3 -8
View File
@@ -2416,7 +2416,6 @@ char* mount_get_what_escaped(const Mount *m) {
}
char* mount_get_options_escaped(const Mount *m) {
_cleanup_free_ char *escaped = NULL;
const char *s = NULL;
assert(m);
@@ -2425,14 +2424,10 @@ char* mount_get_options_escaped(const Mount *m) {
s = m->parameters_proc_self_mountinfo.options;
else if (m->from_fragment && m->parameters_fragment.options)
s = m->parameters_fragment.options;
if (!s)
return strdup("");
if (s) {
escaped = utf8_escape_invalid(s);
if (!escaped)
return NULL;
}
return escaped ? TAKE_PTR(escaped) : strdup("");
return utf8_escape_invalid(s);
}
const char* mount_get_fstype(const Mount *m) {