rpms/ntfsprogs/devel ntfsprogs-2.0.0-check_volume.patch, 1.1, 1.2 ntfsprogs.spec, 1.13, 1.14

Tom Callaway (spot) fedora-extras-commits at redhat.com
Thu Apr 24 16:30:43 UTC 2008


Author: spot

Update of /cvs/pkgs/rpms/ntfsprogs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4929/devel

Modified Files:
	ntfsprogs-2.0.0-check_volume.patch ntfsprogs.spec 
Log Message:
fix check_volume patch, resolves bz 443988

ntfsprogs-2.0.0-check_volume.patch:

Index: ntfsprogs-2.0.0-check_volume.patch
===================================================================
RCS file: /cvs/pkgs/rpms/ntfsprogs/devel/ntfsprogs-2.0.0-check_volume.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ntfsprogs-2.0.0-check_volume.patch	27 Mar 2008 19:47:13 -0000	1.1
+++ ntfsprogs-2.0.0-check_volume.patch	24 Apr 2008 16:30:00 -0000	1.2
@@ -1,6 +1,6 @@
-diff -up ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in.BAD ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in
---- ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in.BAD	2008-03-27 14:37:01.000000000 -0400
-+++ ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in	2008-03-27 14:38:50.000000000 -0400
+diff -up ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in.check_volume ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in
+--- ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in.check_volume	2008-04-24 11:58:19.000000000 -0400
++++ ntfsprogs-2.0.0/ntfsprogs/ntfsresize.8.in	2008-04-24 11:58:19.000000000 -0400
 @@ -116,6 +116,11 @@ is equivalent to
  .BR "\-f \-v" .
  Long named options can be abbreviated to any unique prefix of their name.
@@ -13,9 +13,9 @@
  \fB\-i\fR, \fB\-\-info\fR
  By using this option ntfsresize will determine the theoretically smallest
  shrunken filesystem size supported. Most of the time the result is the space
-diff -up ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c.BAD ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c
---- ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c.BAD	2008-03-27 14:35:44.000000000 -0400
-+++ ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c	2008-03-27 14:36:09.000000000 -0400
+diff -up ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c.check_volume ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c
+--- ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c.check_volume	2008-04-24 11:58:19.000000000 -0400
++++ ntfsprogs-2.0.0/ntfsprogs/ntfsresize.c	2008-04-24 12:24:07.000000000 -0400
 @@ -135,6 +135,7 @@ static struct {
  	int infombonly;
  	int show_progress;
@@ -54,20 +54,20 @@
  		case 'd':
  			opt.debug++;
  			break;
-@@ -2233,6 +2239,34 @@ static void print_num_of_relocations(ntf
+@@ -2233,6 +2239,35 @@ static void print_num_of_relocations(ntf
  			rounded_up_division(relocations, NTFS_MBYTE));
  }
  
-+static void check_volume(void)
++static ntfs_volume *check_volume()
 +{
-+	ntfs_volume *vol = NULL;
++	ntfs_volume *myvol = NULL;
 +
 +	/*
 +	 * Pass NTFS_MNT_FORENSIC so that the mount process does not modify the
 +	 * volume at all.  We will do the logfile emptying and dirty setting
 +	 * later if needed.
 +	 */
-+	if (!(vol = ntfs_mount(opt.volume, opt.ro_flag | NTFS_MNT_FORENSIC))) {
++	if (!(myvol = ntfs_mount(opt.volume, opt.ro_flag | NTFS_MNT_FORENSIC))) {
 +		int err = errno;
 +
 +		perr_printf("Opening '%s' as NTFS failed", opt.volume);
@@ -83,13 +83,14 @@
 +			printf("%s", opened_volume_msg);
 +		exit(1);
 +	}
++	return myvol;
 +}
 +
 +
  /**
   * mount_volume
   *
-@@ -2259,27 +2293,8 @@ static ntfs_volume *mount_volume(void)
+@@ -2259,27 +2294,8 @@ static ntfs_volume *mount_volume(void)
  			err_exit("Device '%s' is mounted. "
  				 "You must 'umount' it first.\n", opt.volume);
  	}
@@ -114,17 +115,34 @@
 -			printf("%s", opened_volume_msg);
 -		exit(1);
 -	}
-+	check_volume();
++	vol = check_volume();
  
  	if (NVolWasDirty(vol))
  		if (opt.force-- <= 0)
+@@ -2289,7 +2305,6 @@ static ntfs_volume *mount_volume(void)
+ 	if (NTFS_MAX_CLUSTER_SIZE < vol->cluster_size)
+ 		err_exit("Cluster size %u is too large!\n",
+ 			(unsigned int)vol->cluster_size);
+-
+ 	if (!opt.infombonly) {
+ 	    printf("Device name        : %s\n", opt.volume);
+ 	    printf("NTFS volume version: %d.%d\n", vol->major_ver, vol->minor_ver);
+@@ -2401,7 +2416,7 @@ int main(int argc, char **argv)
+ 	ntfs_resize_t resize;
+ 	s64 new_size = 0;	/* in clusters; 0 = --info w/o --size */
+ 	s64 device_size;        /* in bytes */
+-	ntfs_volume *vol;
++	ntfs_volume *vol = NULL;
+ 
+ 	ntfs_log_set_handler(ntfs_log_handler_outerr);
+ 
 @@ -2413,6 +2428,12 @@ int main(int argc, char **argv)
  
  	utils_set_locale();
  
 +	/* If we're just checking the device, we'll do it first, and exit out, no matter what we find. */
 +	if (opt.check) {
-+		check_volume();
++		vol = check_volume();
 +		exit(0);
 +	}
 +


Index: ntfsprogs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ntfsprogs/devel/ntfsprogs.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ntfsprogs.spec	27 Mar 2008 19:47:13 -0000	1.13
+++ ntfsprogs.spec	24 Apr 2008 16:30:00 -0000	1.14
@@ -1,6 +1,6 @@
 Name:		ntfsprogs
 Version:	2.0.0
-Release:	6%{?dist}
+Release:	7%{?dist}
 Summary:	NTFS filesystem libraries and utilities
 Source0:	http://download.sf.net/linux-ntfs/%{name}-%{version}.tar.bz2
 Patch0:		ntfsprogs-2.0.0-build-extras-by-default.patch
@@ -45,7 +45,7 @@
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+%patch2 -p1 -b .check_volume
 
 %build
 # If we need to enable the fuse module, we'd change this.
@@ -116,6 +116,9 @@
 %{_libdir}/gnome-vfs-2.0/modules/libntfs-gnomevfs.so
 
 %changelog
+* Thu Apr 24 2008 Tom "spot" Callaway <tcallawa at redhat.com> 2.0.0-7
+- fix check_volume patch
+
 * Thu Mar 27 2008 Tom "spot" Callaway <tcallawa at redhat.com> 2.0.0-6
 - add option to ntfsresize to check the volume to ensure it is ready to be resized
 




More information about the scm-commits mailing list