Replaced all occurrences of the libntfs mount flag NTFS_MNT_RDONLY with the corresponding libntfs-3g mount flag MS_RDONLY.
parent
665555491b
commit
6ff5d3f8a7
|
@ -410,7 +410,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
utils_set_locale();
|
||||
|
||||
vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY |
|
||||
vol = utils_mount_volume(opts.device, MS_RDONLY |
|
||||
(opts.force ? NTFS_MNT_FORCE : 0));
|
||||
if (!vol) {
|
||||
ntfs_log_perror("ERROR: couldn't mount volume");
|
||||
|
|
|
@ -835,7 +835,7 @@ int main(int argc, char **argv)
|
|||
// at this point we know that the volume is valid enough for mounting.
|
||||
|
||||
/* Call ntfs_device_mount() to do the actual mount. */
|
||||
vol = ntfs_device_mount(dev, NTFS_MNT_RDONLY);
|
||||
vol = ntfs_device_mount(dev, MS_RDONLY);
|
||||
if (!vol) {
|
||||
ntfs_device_free(dev);
|
||||
return 2;
|
||||
|
|
|
@ -1603,7 +1603,7 @@ static s64 open_volume(void)
|
|||
{
|
||||
s64 device_size;
|
||||
|
||||
mount_volume(NTFS_MNT_RDONLY);
|
||||
mount_volume(MS_RDONLY);
|
||||
|
||||
device_size = ntfs_device_size_get(vol->dev, 1);
|
||||
if (device_size <= 0)
|
||||
|
|
|
@ -492,7 +492,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
utils_set_locale();
|
||||
|
||||
vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY |
|
||||
vol = utils_mount_volume(opts.device, MS_RDONLY |
|
||||
(opts.force ? NTFS_MNT_FORCE : 0));
|
||||
if (!vol)
|
||||
return 1;
|
||||
|
|
|
@ -962,7 +962,7 @@ static ntfs_volume *mount_volume(const char *volume)
|
|||
"You must 'umount' it first.\n", volume);
|
||||
}
|
||||
|
||||
vol = ntfs_mount(volume, NTFS_MNT_RDONLY);
|
||||
vol = ntfs_mount(volume, MS_RDONLY);
|
||||
if (vol == NULL) {
|
||||
|
||||
int err = errno;
|
||||
|
|
|
@ -347,7 +347,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (opts.noaction)
|
||||
flags = NTFS_MNT_RDONLY;
|
||||
flags = MS_RDONLY;
|
||||
if (opts.force)
|
||||
flags |= NTFS_MNT_FORCE;
|
||||
|
||||
|
|
|
@ -1452,7 +1452,7 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
/* Mount the ntfs volume. */
|
||||
vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY |
|
||||
vol = utils_mount_volume(opts.device, MS_RDONLY |
|
||||
(opts.force ? NTFS_MNT_FORCE : 0));
|
||||
if (!vol) {
|
||||
ntfs_log_error("Failed to mount ntfs volume. Aborting.\n");
|
||||
|
|
|
@ -198,7 +198,7 @@ static int logfile_open(BOOL is_volume, const char *filename,
|
|||
ntfs_inode *ni;
|
||||
ntfs_attr *na;
|
||||
|
||||
vol = ntfs_mount(filename, NTFS_MNT_RDONLY | NTFS_MNT_FORENSIC);
|
||||
vol = ntfs_mount(filename, MS_RDONLY | NTFS_MNT_FORENSIC);
|
||||
if (!vol)
|
||||
log_err_exit(NULL, "Failed to mount %s: %s\n",
|
||||
filename, strerror(errno));
|
||||
|
|
|
@ -2252,7 +2252,7 @@ int main(int argc, char **argv)
|
|||
|
||||
utils_set_locale();
|
||||
|
||||
vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY |
|
||||
vol = utils_mount_volume(opts.device, MS_RDONLY |
|
||||
(opts.force ? NTFS_MNT_FORCE : 0));
|
||||
if (!vol) {
|
||||
printf("Failed to open '%s'.\n", opts.device);
|
||||
|
|
|
@ -395,7 +395,7 @@ int main(int argc, char **argv)
|
|||
opts.noaction++;
|
||||
|
||||
vol = utils_mount_volume(opts.device,
|
||||
(opts.noaction ? NTFS_MNT_RDONLY : 0) |
|
||||
(opts.noaction ? MS_RDONLY : 0) |
|
||||
(opts.force ? NTFS_MNT_FORCE : 0));
|
||||
if (!vol)
|
||||
return 1;
|
||||
|
|
|
@ -651,7 +651,7 @@ int main(int argc, char **argv)
|
|||
|
||||
utils_set_locale();
|
||||
|
||||
vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY |
|
||||
vol = utils_mount_volume(opts.device, MS_RDONLY |
|
||||
(opts.force ? NTFS_MNT_FORCE : 0));
|
||||
if (!vol) {
|
||||
// FIXME: Print error... (AIA)
|
||||
|
|
|
@ -313,7 +313,7 @@ int main(int argc, char **argv)
|
|||
/* Mount the device. */
|
||||
if (opts.no_action) {
|
||||
ntfs_log_quiet("Running in READ-ONLY mode!\n");
|
||||
ul = NTFS_MNT_RDONLY;
|
||||
ul = MS_RDONLY;
|
||||
} else
|
||||
ul = 0;
|
||||
vol = ntfs_mount(dev_name, ul);
|
||||
|
|
|
@ -875,7 +875,7 @@ int main(int argc, char *argv[])
|
|||
utils_set_locale();
|
||||
|
||||
if (opts.noaction)
|
||||
flags |= NTFS_MNT_RDONLY;
|
||||
flags |= MS_RDONLY;
|
||||
if (opts.force)
|
||||
flags |= NTFS_MNT_FORCE;
|
||||
|
||||
|
|
|
@ -488,7 +488,7 @@ static int parse_options(int argc, char **argv)
|
|||
opt.info++;
|
||||
break;
|
||||
case 'n':
|
||||
opt.ro_flag = NTFS_MNT_RDONLY;
|
||||
opt.ro_flag = MS_RDONLY;
|
||||
break;
|
||||
case 'P':
|
||||
opt.show_progress = 0;
|
||||
|
@ -524,7 +524,7 @@ static int parse_options(int argc, char **argv)
|
|||
err++;
|
||||
}
|
||||
if (opt.info) {
|
||||
opt.ro_flag = NTFS_MNT_RDONLY;
|
||||
opt.ro_flag = MS_RDONLY;
|
||||
if (opt.bytes) {
|
||||
printf(NERR_PREFIX "Options --info and --size "
|
||||
"can't be used together.\n");
|
||||
|
|
|
@ -738,7 +738,7 @@ int main(int argc, char **argv)
|
|||
/* Mount the device. */
|
||||
if (opts.no_action) {
|
||||
ntfs_log_quiet("Running in READ-ONLY mode!\n");
|
||||
ul = NTFS_MNT_RDONLY;
|
||||
ul = MS_RDONLY;
|
||||
} else
|
||||
ul = 0;
|
||||
vol = ntfs_mount(dev_name, ul);
|
||||
|
|
|
@ -2155,7 +2155,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
utils_set_locale();
|
||||
|
||||
vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY |
|
||||
vol = utils_mount_volume(opts.device, MS_RDONLY |
|
||||
(opts.force ? NTFS_MNT_FORCE : 0));
|
||||
if (!vol)
|
||||
return 1;
|
||||
|
|
|
@ -1340,7 +1340,7 @@ int main(int argc, char *argv[])
|
|||
print_summary();
|
||||
|
||||
if (opts.info || opts.noaction)
|
||||
flags = NTFS_MNT_RDONLY;
|
||||
flags = MS_RDONLY;
|
||||
if (opts.force)
|
||||
flags |= NTFS_MNT_FORCE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue