From 6dede2f2f7c5271b95c0361abd647af2a731b1dc Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 26 Apr 2017 17:27:02 +0200 Subject: libmount: support MS_RDONLY on write-protected devices This feature is supported by mount(8) only. It seems better move this code to libmount. The results is more simple mount(8) and the feature is accessible for all libmount users. Signed-off-by: Karel Zak --- libmount/src/mountP.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmount/src/mountP.h') diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h index 2baab55de..42957ecb9 100644 --- a/libmount/src/mountP.h +++ b/libmount/src/mountP.h @@ -328,6 +328,7 @@ struct libmnt_context #define MNT_FL_RDONLY_UMOUNT (1 << 11) /* remount,ro after EBUSY umount(2) */ #define MNT_FL_FORK (1 << 12) #define MNT_FL_NOSWAPMATCH (1 << 13) +#define MNT_FL_RWONLY_MOUNT (1 << 14) /* explicit mount -w; never try read-only */ #define MNT_FL_MOUNTDATA (1 << 20) #define MNT_FL_TAB_APPLIED (1 << 21) /* mtab/fstab merged to cxt->fs */ @@ -338,6 +339,7 @@ struct libmnt_context #define MNT_FL_LOOPDEV_READY (1 << 26) /* /dev/loop initialized by the library */ #define MNT_FL_MOUNTOPTS_FIXED (1 << 27) #define MNT_FL_TABPATHS_CHECKED (1 << 28) +#define MNT_FL_FORCED_RDONLY (1 << 29) /* mounted read-only on write-protected device */ /* default flags */ #define MNT_FL_DEFAULT 0 -- cgit v1.2.3-55-g7522