]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: propagate first error of multiple filesystem types
authorJohn Keeping <jkeeping@inmusicbrands.com>
Tue, 6 Aug 2024 17:17:29 +0000 (18:17 +0100)
committerJohn Keeping <jkeeping@inmusicbrands.com>
Tue, 6 Aug 2024 17:17:29 +0000 (18:17 +0100)
commite2b3f9915333b6e423e1f47d3f5e7cc6ea0ff482
tree69b9002d8f1ac2e1b89309c35d1b875f4ceccdd2
parent7903560fa34fe1810cdaf3dcda7cafbdefb488ac
libmount: propagate first error of multiple filesystem types

Use the same error handling logic as do_mount_by_pattern() to better
handle the case where EROFS is returned from the first filesystem in a
list but subsequent filesystems overwrite this status with, for example,
ENODEV.

This allows read-only devices to mount without the user needing to
explicitly specify "ro" while specifying a list of potential
filesystems, some of which may not be available.

Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
libmount/src/context_mount.c