[mdadm/f15/master] Fix compile issues on build system

Doug Ledford dledford at fedoraproject.org
Sat Mar 26 17:39:33 UTC 2011


commit 47d1109592326c2c1f3340cd8dc3712e8143cfeb
Author: Doug Ledford <dledford at redhat.com>
Date:   Sat Mar 26 13:39:20 2011 -0400

    Fix compile issues on build system
    
    Signed-off-by: Doug Ledford <dledford at redhat.com>

 mdadm-3.1.5-unused-param.patch |   63 ++++++++++++++++++++++++++++++++++++++++
 mdadm.spec                     |    2 +
 2 files changed, 65 insertions(+), 0 deletions(-)
---
diff --git a/mdadm-3.1.5-unused-param.patch b/mdadm-3.1.5-unused-param.patch
new file mode 100644
index 0000000..87d56fb
--- /dev/null
+++ b/mdadm-3.1.5-unused-param.patch
@@ -0,0 +1,63 @@
+--- mdadm-3.1.5/Query.c.param	2011-03-22 21:19:09.000000000 -0400
++++ mdadm-3.1.5/Query.c	2011-03-26 13:33:23.864978486 -0400
+@@ -35,7 +35,7 @@ int Query(char *dev)
+ 	int fd = open(dev, O_RDONLY);
+ 	int vers;
+ 	int ioctlerr;
+-	int superror, superrno;
++	int superror;
+ 	struct mdinfo info;
+ 	mdu_array_info_t array;
+ 	struct supertype *st = NULL;
+@@ -84,7 +84,6 @@ int Query(char *dev)
+ 	st = guess_super(fd);
+ 	if (st) {
+ 		superror = st->ss->load_super(st, fd, dev);
+-		superrno = errno;
+ 	} else
+ 		superror = -1;
+ 	close(fd);
+--- mdadm-3.1.5/Grow.c.param	2011-03-22 21:19:09.000000000 -0400
++++ mdadm-3.1.5/Grow.c	2011-03-26 13:33:23.866978629 -0400
+@@ -2016,7 +2016,6 @@ int Grow_continue(int mdfd, struct super
+ 	unsigned long long *offsets;
+ 	int d;
+ 	struct mdinfo *sra, *sd;
+-	int rv;
+ 	unsigned long cache;
+ 	int done = 0;
+ 
+@@ -2102,7 +2101,6 @@ int Grow_continue(int mdfd, struct super
+ 			if (fds[sd->disk.raid_disk] < 0) {
+ 				fprintf(stderr, Name ": %s: cannot open component %s\n",
+ 					info->sys_name, dn?dn:"-unknown-");
+-				rv = 1;
+ 				goto release;
+ 			}
+ 			free(dn);
+--- mdadm-3.1.5/mdadm.c.param	2011-03-22 21:19:09.000000000 -0400
++++ mdadm-3.1.5/mdadm.c	2011-03-26 13:33:23.889980281 -0400
+@@ -101,7 +101,9 @@ int main(int argc, char *argv[])
+ 	char *shortopt = short_options;
+ 	int dosyslog = 0;
+ 	int rebuild_map = 0;
++#if 0
+ 	int auto_update_home = 0;
++#endif
+ 	char *subarray = NULL;
+ 
+ 	int print_help = 0;
+@@ -1217,11 +1219,13 @@ int main(int argc, char *argv[])
+ 							cnt++;
+ 							acnt++;
+ 						}
++#if 0
+ 						if (rv2 == 1)
+ 							/* found something so even though assembly failed  we
+ 							 * want to avoid auto-updates
+ 							 */
+ 							auto_update_home = 0;
++#endif
+ 					} while (rv2!=2);
+ 					/* Incase there are stacked devices, we need to go around again */
+ 				} while (acnt);
diff --git a/mdadm.spec b/mdadm.spec
index 8ec4d82..28d8192 100644
--- a/mdadm.spec
+++ b/mdadm.spec
@@ -8,6 +8,7 @@ Source2:     raid-check
 Source3:     mdadm.rules
 Source4:     mdadm-raid-check-sysconfig
 Source5:     mdadm-cron
+Patch0:      mdadm-3.1.5-unused-param.patch
 Patch19:     mdadm-3.1.3-udev.patch
 Patch20:     mdadm-2.5.2-static.patch
 URL:         http://www.kernel.org/pub/linux/utils/raid/mdadm/
@@ -29,6 +30,7 @@ file can be used to help with some common tasks.
 
 %prep
 %setup -q
+%patch0 -p1 -b .param
 %patch19 -p1 -b .udev
 %patch20 -p1 -b .static
 


More information about the scm-commits mailing list