File ntfsprogs-1.13.1-rename-MS_.diff of Package ntfsprogs

diff -urN ntfsprogs-1.13.1-orig/include/ntfs/volume.h ntfsprogs-1.13.1/include/ntfs/volume.h
--- ntfsprogs-1.13.1-orig/include/ntfs/volume.h	2006-01-08 16:53:28.000000000 +0100
+++ ntfsprogs-1.13.1/include/ntfs/volume.h	2006-11-28 19:39:22.000000000 +0100
@@ -41,25 +41,6 @@
 #include <mntent.h>
 #endif
 
-/*
- * Under Cygwin, DJGPP and FreeBSD we do not have MS_RDONLY and MS_NOATIME,
- * so we define them ourselves.
- */
-#ifndef MS_RDONLY
-#define MS_RDONLY 1
-#endif
-/*
- * Solaris defines MS_RDONLY but not MS_NOATIME thus we need to carefully
- * define MS_NOATIME.
- */
-#ifndef MS_NOATIME
-#if (MS_RDONLY != 1)
-#	define MS_NOATIME 1
-#else
-#	define MS_NOATIME 2
-#endif
-#endif
-
 /* Forward declaration */
 typedef struct _ntfs_volume ntfs_volume;
 
@@ -69,6 +50,12 @@
 #include "inode.h"
 #include "attrib.h"
 
+enum {
+	NTFS_MNT_RDONLY	 	= 1,
+	NTFS_MNT_NOATIME 	= 2,
+	NTFS_MNT_CASE_SENSITIVE	= 4,
+};
+
 /**
  * enum ntfs_mount_flags -
  *
diff -urN ntfsprogs-1.13.1-orig/libntfs/gnome-vfs-method.c ntfsprogs-1.13.1/libntfs/gnome-vfs-method.c
--- ntfsprogs-1.13.1-orig/libntfs/gnome-vfs-method.c	2006-02-03 23:19:19.000000000 +0100
+++ ntfsprogs-1.13.1/libntfs/gnome-vfs-method.c	2006-11-28 19:29:04.000000000 +0100
@@ -162,7 +162,7 @@
 			return GNOME_VFS_ERROR_INVALID_URI;
 		}
 
-		if (!(volume = ntfs_mount(uri->parent->text, MS_RDONLY))) {
+		if (!(volume = ntfs_mount(uri->parent->text, NTFS_MNT_RDONLY))) {
 			g_free(uri_parent_string);
 			return GNOME_VFS_ERROR_WRONG_FORMAT;
 		}
diff -urN ntfsprogs-1.13.1-orig/libntfs/volume.c ntfsprogs-1.13.1/libntfs/volume.c
--- ntfsprogs-1.13.1-orig/libntfs/volume.c	2006-03-28 00:43:09.000000000 +0200
+++ ntfsprogs-1.13.1/libntfs/volume.c	2006-11-28 19:29:48.000000000 +0100
@@ -429,9 +429,9 @@
 	}
 	ntfs_upcase_table_build(vol->upcase,
 			vol->upcase_len * sizeof(ntfschar));
-	if (flags & MS_RDONLY)
+	if (flags & NTFS_MNT_RDONLY)
 		NVolSetReadOnly(vol);
-	if (flags & MS_NOATIME)
+	if (flags & NTFS_MNT_NOATIME)
 		NVolSetNoATime(vol);
 	ntfs_log_debug("Reading bootsector... ");
 	if (dev->d_ops->open(dev, NVolReadOnly(vol) ? O_RDONLY: O_RDWR)) {
@@ -745,8 +745,8 @@
  * @flags is an optional second parameter. The same flags are used as for
  * the mount system call (man 2 mount). Currently only the following flags
  * are implemented:
- *	MS_RDONLY	- mount volume read-only
- *	MS_NOATIME	- do not update access time
+ *	NTFS_MNT_RDONLY	- mount volume read-only
+ *	NTFS_MNT_NOATIME	- do not update access time
  *
  * The function opens the device @dev and verifies that it contains a valid
  * bootsector. Then, it allocates an ntfs_volume structure and initializes
@@ -1116,7 +1116,7 @@
 	 * Check for dirty logfile and hibernated Windows.
 	 * We care only about read-write mounts.
 	 */
-	if (!(flags & MS_RDONLY)) {
+	if (!(flags & NTFS_MNT_RDONLY)) {
 		if (ntfs_volume_check_logfile(vol) < 0)
 			goto error_exit;
 		if (ntfs_volume_check_hiberfile(vol) < 0)
@@ -1148,8 +1148,8 @@
  * @flags is an optional second parameter. The same flags are used as for
  * the mount system call (man 2 mount). Currently only the following flags
  * are implemented:
- *	MS_RDONLY	- mount volume read-only
- *	MS_NOATIME	- do not update access time
+ *	NTFS_MNT_RDONLY	- mount volume read-only
+ *	NTFS_MNT_NOATIME	- do not update access time
  *
  * The function opens the device or file @name and verifies that it contains a
  * valid bootsector. Then, it allocates an ntfs_volume structure and initializes
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfscat.c ntfsprogs-1.13.1/ntfsprogs/ntfscat.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfscat.c	2006-04-05 14:43:07.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfscat.c	2006-11-28 19:29:04.000000000 +0100
@@ -399,7 +399,7 @@
 
 	utils_set_locale();
 
-	vol = utils_mount_volume(opts.device, MS_RDONLY, opts.force);
+	vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY, opts.force);
 	if (!vol) {
 		ntfs_log_perror("ERROR: couldn't mount volume");
 		return 1;
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsclone.c ntfsprogs-1.13.1/ntfsprogs/ntfsclone.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsclone.c	2006-06-21 09:59:19.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsclone.c	2006-11-28 19:29:48.000000000 +0100
@@ -1487,7 +1487,7 @@
 {
 	s64 device_size;
 
-	mount_volume(MS_RDONLY);
+	mount_volume(NTFS_MNT_RDONLY);
 
 	device_size = ntfs_device_size_get(vol->dev, 1);
 	if (device_size <= 0)
@@ -1716,7 +1716,7 @@
 	/* 'force' again mount for dirty volumes (e.g. after resize).
 	   FIXME: use mount flags to avoid potential side-effects in future */
 	opt.force++;
-	mount_volume(MS_NOATIME);
+	mount_volume(NTFS_MNT_NOATIME);
 
 	free(lcn_bitmap.bm);
 	setup_lcn_bitmap();
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfscluster.c ntfsprogs-1.13.1/ntfsprogs/ntfscluster.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfscluster.c	2006-04-05 14:43:07.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfscluster.c	2006-11-28 19:29:04.000000000 +0100
@@ -492,7 +492,7 @@
 
 	utils_set_locale();
 
-	vol = utils_mount_volume(opts.device, MS_RDONLY, opts.force);
+	vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY, opts.force);
 	if (!vol)
 		return 1;
 
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfscmp.c ntfsprogs-1.13.1/ntfsprogs/ntfscmp.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfscmp.c	2006-04-05 14:43:07.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfscmp.c	2006-11-28 19:29:04.000000000 +0100
@@ -829,7 +829,7 @@
 				 "You must 'umount' it first.\n", volume);
 	}
 
-	vol = ntfs_mount(volume, MS_RDONLY);
+	vol = ntfs_mount(volume, NTFS_MNT_RDONLY);
 	if (vol == NULL) {
 
 		int err = errno;
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfscp.c ntfsprogs-1.13.1/ntfsprogs/ntfscp.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfscp.c	2006-04-05 14:43:07.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfscp.c	2006-11-28 19:29:04.000000000 +0100
@@ -312,7 +312,7 @@
 	}
 
 	if (opts.noaction)
-		flags = MS_RDONLY;
+		flags = NTFS_MNT_RDONLY;
 
 	vol = utils_mount_volume(opts.device, flags, opts.force);
 	if (!vol) {
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsdecrypt.c ntfsprogs-1.13.1/ntfsprogs/ntfsdecrypt.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsdecrypt.c	2006-04-20 00:03:58.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsdecrypt.c	2006-11-28 19:29:04.000000000 +0100
@@ -1313,7 +1313,7 @@
 		return 1;
 	}
 	/* Mount the ntfs volume. */
-	vol = utils_mount_volume(opts.device, MS_RDONLY, opts.force);
+	vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY, opts.force);
 	if (!vol) {
 		ntfs_log_error("Failed to mount ntfs volume.  Aborting.\n");
 		ntfs_rsa_private_key_release(rsa_key);
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsdump_logfile.c ntfsprogs-1.13.1/ntfsprogs/ntfsdump_logfile.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsdump_logfile.c	2005-11-20 15:15:33.000000000 +0100
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsdump_logfile.c	2006-11-28 19:29:04.000000000 +0100
@@ -197,7 +197,7 @@
 		ntfs_inode *ni;
 		ntfs_attr *na;
 
-		vol = ntfs_mount(filename, MS_RDONLY);
+		vol = ntfs_mount(filename, NTFS_MNT_RDONLY);
 		if (!vol)
 			log_err_exit(NULL, "Failed to mount %s: %s\n",
 					filename, strerror(errno));
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsinfo.c ntfsprogs-1.13.1/ntfsprogs/ntfsinfo.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsinfo.c	2006-05-20 23:27:15.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsinfo.c	2006-11-28 19:29:04.000000000 +0100
@@ -1967,7 +1967,7 @@
 
 	utils_set_locale();
 
-	vol = utils_mount_volume(opts.device, MS_RDONLY, opts.force);
+	vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY, opts.force);
 	if (!vol)
 		return 1;
 
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfslabel.c ntfsprogs-1.13.1/ntfsprogs/ntfslabel.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfslabel.c	2006-04-05 14:43:07.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfslabel.c	2006-11-28 19:29:04.000000000 +0100
@@ -394,7 +394,7 @@
 	if (!opts.label)
 		opts.noaction++;
 
-	vol = utils_mount_volume(opts.device, opts.noaction ? MS_RDONLY : 0,
+	vol = utils_mount_volume(opts.device, opts.noaction ? NTFS_MNT_RDONLY : 0,
 			opts.force);
 	if (!vol)
 		return 1;
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsls.c ntfsprogs-1.13.1/ntfsprogs/ntfsls.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsls.c	2006-04-05 14:43:07.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsls.c	2006-11-28 19:29:04.000000000 +0100
@@ -651,7 +651,7 @@
 
 	utils_set_locale();
 
-	vol = utils_mount_volume(opts.device, MS_RDONLY, opts.force);
+	vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY, opts.force);
 	if (!vol) {
 		// FIXME: Print error... (AIA)
 		return 2;
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsmftalloc.c ntfsprogs-1.13.1/ntfsprogs/ntfsmftalloc.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsmftalloc.c	2005-11-20 15:15:33.000000000 +0100
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsmftalloc.c	2006-11-28 19:29:04.000000000 +0100
@@ -313,7 +313,7 @@
 	/* Mount the device. */
 	if (opts.no_action) {
 		ntfs_log_quiet("Running in READ-ONLY mode!\n");
-		ul = MS_RDONLY;
+		ul = NTFS_MNT_RDONLY;
 	} else
 		ul = 0;
 	vol = ntfs_mount(dev_name, ul);
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsmount.c ntfsprogs-1.13.1/ntfsprogs/ntfsmount.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsmount.c	2006-05-19 06:22:53.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsmount.c	2006-11-28 19:29:48.000000000 +0100
@@ -1420,8 +1420,8 @@
 {
 	ntfs_volume *vol;
 
-	vol = utils_mount_volume(device, ((ctx->ro) ? MS_RDONLY : 0) |
-			((ctx->noatime) ? MS_NOATIME : 0), ctx->force);
+	vol = utils_mount_volume(device, ((ctx->ro) ? NTFS_MNT_RDONLY : 0) |
+			((ctx->noatime) ? NTFS_MNT_NOATIME : 0), ctx->force);
 	if (!vol) {
 		ntfs_log_error("Mount failed.\n");
 		return -1;
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsmove.c ntfsprogs-1.13.1/ntfsprogs/ntfsmove.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsmove.c	2006-04-05 14:43:07.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsmove.c	2006-11-28 19:29:05.000000000 +0100
@@ -873,7 +873,7 @@
 	utils_set_locale();
 
 	if (opts.noaction)
-		flags |= MS_RDONLY;
+		flags |= NTFS_MNT_RDONLY;
 
 	vol = utils_mount_volume(opts.device, flags, opts.force);
 	if (!vol) {
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsresize.c ntfsprogs-1.13.1/ntfsprogs/ntfsresize.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsresize.c	2006-04-19 00:03:09.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsresize.c	2006-11-28 19:29:48.000000000 +0100
@@ -486,7 +486,7 @@
 			opt.info++;
 			break;
 		case 'n':
-			opt.ro_flag = MS_RDONLY;
+			opt.ro_flag = NTFS_MNT_RDONLY;
 			break;
 		case 'P':
 			opt.show_progress = 0;
@@ -522,7 +522,7 @@
 			err++;
 		}
 		if (opt.info) {
-			opt.ro_flag = MS_RDONLY;
+			opt.ro_flag = NTFS_MNT_RDONLY;
 			if (opt.bytes) {
 				printf(NERR_PREFIX "Options --info and --size "
 					"can't be used together.\n");
@@ -2238,7 +2238,7 @@
 				 "You must 'umount' it first.\n", opt.volume);
 	}
 
-	if (!(vol = ntfs_mount(opt.volume, opt.ro_flag | MS_NOATIME))) {
+	if (!(vol = ntfs_mount(opt.volume, opt.ro_flag | NTFS_MNT_NOATIME))) {
 
 		int err = errno;
 
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsrm.c ntfsprogs-1.13.1/ntfsprogs/ntfsrm.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsrm.c	2006-04-05 14:43:08.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsrm.c	2006-11-28 19:29:05.000000000 +0100
@@ -1027,7 +1027,7 @@
 #endif
 
 	if (opts.noaction)
-		flags |= MS_RDONLY;
+		flags |= NTFS_MNT_RDONLY;
 
 	//ntfs_log_set_levels (NTFS_LOG_LEVEL_DEBUG | NTFS_LOG_LEVEL_TRACE);
 	//ntfs_log_set_levels (NTFS_LOG_LEVEL_DEBUG);
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfstruncate.c ntfsprogs-1.13.1/ntfsprogs/ntfstruncate.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfstruncate.c	2006-04-05 04:45:56.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfstruncate.c	2006-11-28 19:29:05.000000000 +0100
@@ -738,7 +738,7 @@
 	/* Mount the device. */
 	if (opts.no_action) {
 		ntfs_log_quiet("Running in READ-ONLY mode!\n");
-		ul = MS_RDONLY;
+		ul = NTFS_MNT_RDONLY;
 	} else
 		ul = 0;
 	vol = ntfs_mount(dev_name, ul);
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfsundelete.c ntfsprogs-1.13.1/ntfsprogs/ntfsundelete.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfsundelete.c	2006-04-05 14:43:08.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfsundelete.c	2006-11-28 19:29:05.000000000 +0100
@@ -2123,7 +2123,7 @@
 
 	utils_set_locale();
 
-	vol = utils_mount_volume(opts.device, MS_RDONLY, opts.force);
+	vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY, opts.force);
 	if (!vol)
 		return 1;
 
diff -urN ntfsprogs-1.13.1-orig/ntfsprogs/ntfswipe.c ntfsprogs-1.13.1/ntfsprogs/ntfswipe.c
--- ntfsprogs-1.13.1-orig/ntfsprogs/ntfswipe.c	2006-04-05 14:43:08.000000000 +0200
+++ ntfsprogs-1.13.1/ntfsprogs/ntfswipe.c	2006-11-28 19:29:05.000000000 +0100
@@ -1340,7 +1340,7 @@
 		print_summary();
 
 	if (opts.info || opts.noaction)
-		flags = MS_RDONLY;
+		flags = NTFS_MNT_RDONLY;
 
 	vol = utils_mount_volume(opts.device, flags, opts.force);
 	if (!vol)