rpms/util-linux-ng/devel util-linux-ng-2.13-blockdev-rmpart.patch, 1.1, 1.2 util-linux-ng.spec, 1.12, 1.13

Karel Zak (kzak) fedora-extras-commits at redhat.com
Wed Oct 31 11:09:30 UTC 2007


Author: kzak

Update of /cvs/pkgs/rpms/util-linux-ng/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13072

Modified Files:
	util-linux-ng-2.13-blockdev-rmpart.patch util-linux-ng.spec 
Log Message:
* Wed Oct 31 2007 Karel Zak <kzak at redhat.com> 2.13-4
- fix #354791 - blockdev command calls the blkpg ioctl with a wrong data structure


util-linux-ng-2.13-blockdev-rmpart.patch:

Index: util-linux-ng-2.13-blockdev-rmpart.patch
===================================================================
RCS file: /cvs/pkgs/rpms/util-linux-ng/devel/util-linux-ng-2.13-blockdev-rmpart.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- util-linux-ng-2.13-blockdev-rmpart.patch	20 Aug 2007 11:22:42 -0000	1.1
+++ util-linux-ng-2.13-blockdev-rmpart.patch	31 Oct 2007 11:09:24 -0000	1.2
@@ -1,6 +1,15 @@
---- util-linux-ng-2.13-rc3/disk-utils/blockdev.c.kzak	2007-08-01 15:40:21.000000000 +0200
-+++ util-linux-ng-2.13-rc3/disk-utils/blockdev.c	2007-08-13 12:31:47.000000000 +0200
-@@ -32,6 +32,28 @@
+diff -up util-linux-ng-2.13/disk-utils/blockdev.c.kzak util-linux-ng-2.13/disk-utils/blockdev.c
+--- util-linux-ng-2.13/disk-utils/blockdev.c.kzak	2007-09-04 15:43:33.000000000 +0200
++++ util-linux-ng-2.13/disk-utils/blockdev.c	2007-10-31 11:14:32.000000000 +0100
+@@ -10,6 +10,7 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <errno.h>
++#include <linux/blkpg.h>
+ 
+ #include "nls.h"
+ 
+@@ -32,6 +33,14 @@
  #define BLKGETSIZE64 _IOR(0x12,114,size_t)
  #endif
  
@@ -10,26 +19,12 @@
 +#define BLKPG_DEVNAMELTH 64
 +#define BLKPG_VOLNAMELTH 64
 +
-+struct blkpg_partition {
-+	long long start;
-+	long long length;
-+	long long pno;
-+	char devname[BLKPG_DEVNAMELTH];
-+	char volname[BLKPG_VOLNAMELTH];
-+};
-+
-+struct blkpg_ioctl_arg {
-+	int op;
-+	int flags;
-+	int datalen;
-+	void *data;
-+};
 +#endif
 +
  /* Maybe <linux/hdreg.h> could be included */
  #ifndef HDIO_GETGEO
  #define HDIO_GETGEO 0x0301
-@@ -104,6 +126,10 @@
+@@ -104,6 +113,10 @@ struct bdc {
  	{ "--rereadpt", "BLKRRPART", BLKRRPART, ARGNONE, 0, NULL,
  	  N_("reread partition table") },
  #endif
@@ -40,7 +35,7 @@
  };
  
  #define SIZE(a)	(sizeof(a)/sizeof((a)[0]))
-@@ -163,6 +189,35 @@
+@@ -163,6 +176,40 @@ getsize(int fd, long long *sectors) {
  	return 0;
  }
  
@@ -49,11 +44,16 @@
 +disable_partition(int fd, int partno) {
 +	struct blkpg_partition part = {
 +		.pno = partno,
++		.start = 0,
++		.length = 0,
++		.devname[0] = 0,
++		.volname[0] = 0,
 +	};
 +	struct blkpg_ioctl_arg io = {
 +		.op = BLKPG_DEL_PARTITION,
 +		.datalen = sizeof(part),
 +		.data = &part,
++		.flags = 0,
 +	};
 +	int res;
 +
@@ -76,7 +76,7 @@
  void do_commands(int fd, char **argv, int d);
  void report_header(void);
  void report_device(char *device, int quiet);
-@@ -280,6 +335,12 @@
+@@ -280,6 +327,12 @@ do_commands(int fd, char **argv, int d) 
  		switch(bdcms[j].argtype) {
  		default:
  		case ARGNONE:
@@ -89,7 +89,7 @@
  			res = ioctl(fd, bdcms[j].ioc, 0);
  			break;
  		case ARGINTA:
-@@ -297,6 +358,13 @@
+@@ -297,6 +350,13 @@ do_commands(int fd, char **argv, int d) 
  					bdcms[j].name);
  				usage();
  			}


Index: util-linux-ng.spec
===================================================================
RCS file: /cvs/pkgs/rpms/util-linux-ng/devel/util-linux-ng.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- util-linux-ng.spec	16 Oct 2007 20:24:23 -0000	1.12
+++ util-linux-ng.spec	31 Oct 2007 11:09:24 -0000	1.13
@@ -2,7 +2,7 @@
 Summary: A collection of basic system utilities
 Name: util-linux-ng
 Version: 2.13
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain
 Group: System Environment/Base
 URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@@ -533,6 +533,9 @@
 /sbin/losetup
 
 %changelog
+* Wed Oct 31 2007 Karel Zak <kzak at redhat.com> 2.13-4
+- fix #354791 - blockdev command calls the blkpg ioctl with a wrong data structure
+
 * Tue Oct 16 2007 Karel Zak <kzak at redhat.com> 2.13-3
 - fix mount -L | -U segfault
 - fix script die on SIGWINCH




More information about the fedora-extras-commits mailing list