mountpoint-util: Deal with kernel API breakage in "norecovery" mount option

"norecovery" was deprecated for btrfs in
https://github.com/torvalds/linux/commit/74ef00185eb864252156022ff129b01549504175
and removed in
https://github.com/torvalds/linux/commit/a1912f712188291f9d7d434fba155461f1ebef66.

Let's drop our assumption that btrfs supports "norecovery" and first query for the
new name of the option followed by querying for the old name.
This commit is contained in:
Daan De Meyer
2024-05-17 14:29:09 +02:00
committed by Luca Boccassi
parent 19da480d3c
commit e3828d7103
4 changed files with 28 additions and 10 deletions
+2 -1
View File
@@ -57,9 +57,10 @@ bool fstype_is_blockdev_backed(const char *fstype);
bool fstype_is_ro(const char *fsype);
bool fstype_can_discard(const char *fstype);
bool fstype_can_uid_gid(const char *fstype);
bool fstype_can_norecovery(const char *fstype);
bool fstype_can_umask(const char *fstype);
const char* fstype_norecovery_option(const char *fstype);
int dev_is_devtmpfs(void);
int mount_fd(const char *source, int target_fd, const char *filesystemtype, unsigned long mountflags, const void *data);