From 98264cba8a87c2b827766dc9df4f5e97817ab154 Mon Sep 17 00:00:00 2001 From: Doug Ledford Date: Fri, 13 Feb 2009 20:55:51 +0000 Subject: [PATCH] - Update to latest upstream devel release - Use the udev rules file included with mdadm instead of our own - Drop all the no longer relevant patches - Fix a build error in mdopen.c - Fix the udev rules path in Makefile - Fix a compile issue with the __le32_to_cpu() macro usage (bad juju to to operations on the target of the macro as it could get executed multiple times, and gcc now throws an error on that) - Add some casts to some print statements to keep gcc from complaining --- mdadm-3.0-cast.patch | 23 +++++++++++++++++++++++ mdadm.spec | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 mdadm-3.0-cast.patch diff --git a/mdadm-3.0-cast.patch b/mdadm-3.0-cast.patch new file mode 100644 index 0000000..747f8d9 --- /dev/null +++ b/mdadm-3.0-cast.patch @@ -0,0 +1,23 @@ +--- mdadm-3.0-devel2/super-ddf.c.typedef 2009-02-13 15:26:56.000000000 -0500 ++++ mdadm-3.0-devel2/super-ddf.c 2009-02-13 15:28:17.000000000 -0500 +@@ -1043,9 +1043,9 @@ static void examine_vd(int n, struct ddf + map_num(ddf_sec_level, vc->srl) ?: "-unknown-"); + } + printf(" Device Size[%d] : %llu\n", n, +- __be64_to_cpu(vc->blocks)/2); ++ (unsigned long long)__be64_to_cpu(vc->blocks)/2); + printf(" Array Size[%d] : %llu\n", n, +- __be64_to_cpu(vc->array_blocks)/2); ++ (unsigned long long)__be64_to_cpu(vc->array_blocks)/2); + } + } + +@@ -1105,7 +1105,7 @@ static void examine_pds(struct ddf_super + (state&32)? ", Unrecovered Read Errors": "", + (state&64)? ", Missing" : ""); + printf(" Avail Size[%d] : %llu K\n", i, +- __be64_to_cpu(pd->config_size)>>1); ++ (unsigned long long)__be64_to_cpu(pd->config_size)>>1); + for (dl = sb->dlist; dl ; dl = dl->next) { + if (dl->disk.refnum == pd->refnum) { + char *dv = map_dev(dl->major, dl->minor, 0); diff --git a/mdadm.spec b/mdadm.spec index 26bf7d2..4e79be5 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -8,6 +8,7 @@ Patch1: mdadm-3.0-udev.patch Patch2: mdadm-3.0-warn.patch Patch3: mdadm-2.5.2-static.patch Patch4: mdadm-3.0-alias.patch +Patch5: mdadm-3.0-cast.patch URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ License: GPLv2+ Group: System Environment/Base @@ -30,6 +31,7 @@ file can be used to help with some common tasks. %patch2 -p1 -b .warn %patch3 -p1 -b .static %patch4 -p1 -b .alias +%patch5 -p1 -b .cast %build make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" SYSCONFDIR="%{_sysconfdir}" mdadm.static mdadm mdmon @@ -87,6 +89,7 @@ fi - Fix a compile issue with the __le32_to_cpu() macro usage (bad juju to to operations on the target of the macro as it could get executed multiple times, and gcc now throws an error on that) +- Add some casts to some print statements to keep gcc from complaining * Fri Oct 24 2008 Doug Ledford - 2.6.7.1-1 - Updated to latest upstream stable release (#466803)