mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
Rejected implicit mounting read-only when hiberfile option is present
If the remove_hiberfile mount option is present, explicitly disallow the library from switching to a read-only mount. This is only to avoid confusion, as the remove_hiberfile is processed before taking the decision to fall back to read-only.
This commit is contained in:
parent
0c855fe36b
commit
ab4bdea00f
@ -3941,7 +3941,8 @@ static int ntfs_open(const char *device)
|
|||||||
if (ctx->ro)
|
if (ctx->ro)
|
||||||
flags |= NTFS_MNT_RDONLY;
|
flags |= NTFS_MNT_RDONLY;
|
||||||
else
|
else
|
||||||
flags |= NTFS_MNT_MAY_RDONLY;
|
if (!ctx->hiberfile)
|
||||||
|
flags |= NTFS_MNT_MAY_RDONLY;
|
||||||
if (ctx->recover)
|
if (ctx->recover)
|
||||||
flags |= NTFS_MNT_RECOVER;
|
flags |= NTFS_MNT_RECOVER;
|
||||||
if (ctx->hiberfile)
|
if (ctx->hiberfile)
|
||||||
|
@ -185,8 +185,8 @@ etc. designate the same file). All files are displayed with lower case in
|
|||||||
directory listings.
|
directory listings.
|
||||||
.TP
|
.TP
|
||||||
.B remove_hiberfile
|
.B remove_hiberfile
|
||||||
Unlike in case of read-only mount, the read-write mount is denied if
|
When the NTFS volume is hibernated, a read-write mount is denied and
|
||||||
the NTFS volume is hibernated. One needs either to resume Windows and
|
a read-only mount is forced. One needs either to resume Windows and
|
||||||
shutdown it properly, or use this option which will remove the Windows
|
shutdown it properly, or use this option which will remove the Windows
|
||||||
hibernation file. Please note, this means that the saved Windows
|
hibernation file. Please note, this means that the saved Windows
|
||||||
session will be completely lost. Use this option under your own
|
session will be completely lost. Use this option under your own
|
||||||
|
@ -3745,7 +3745,8 @@ static int ntfs_open(const char *device)
|
|||||||
if (ctx->ro)
|
if (ctx->ro)
|
||||||
flags |= NTFS_MNT_RDONLY;
|
flags |= NTFS_MNT_RDONLY;
|
||||||
else
|
else
|
||||||
flags |= NTFS_MNT_MAY_RDONLY;
|
if (!ctx->hiberfile)
|
||||||
|
flags |= NTFS_MNT_MAY_RDONLY;
|
||||||
if (ctx->recover)
|
if (ctx->recover)
|
||||||
flags |= NTFS_MNT_RECOVER;
|
flags |= NTFS_MNT_RECOVER;
|
||||||
if (ctx->hiberfile)
|
if (ctx->hiberfile)
|
||||||
|
Loading…
Reference in New Issue
Block a user