mount-util: do not pass 'x-*' options to mount syscall

They will not be recognized. libmount filters them manually.
This commit is contained in:
Luca Boccassi
2022-10-12 09:47:39 +01:00
parent 25d615eb70
commit ac6086fdf6
+3 -1
View File
@@ -765,7 +765,9 @@ int mount_option_mangle(
}
/* If 'word' is not a mount flag, then store it in '*ret_remaining_options'. */
if (!ent->name && !strextend_with_separator(&ret, ",", word))
if (!ent->name &&
!startswith_no_case(word, "x-") &&
!strextend_with_separator(&ret, ",", word))
return -ENOMEM;
}