Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Bor Kraljič (b261ceccb4eaa5730f785bceb643528ccea467eb)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Bor Kraljič <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Bor Kraljič (b261ceccb4eaa5730f785bceb643528ccea467eb)
  • Date: Wed, 5 Oct 2011 06:27:35 -0500

GIT changes to master grimoire by Bor Kraljič <pyrobor AT ver.si>:

disk/mdadm/HISTORY | 3 +++
disk/mdadm/PRE_BUILD | 3 ++-
disk/mdadm/linux-3.0.patch | 45
+++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 1 deletion(-)

New commits:
commit b261ceccb4eaa5730f785bceb643528ccea467eb
Author: Bor Kraljič <pyrobor AT ver.si>
Commit: Bor Kraljič <pyrobor AT ver.si>

mdadm: added upstream patch for kernel 3.0 support (issue #230)

diff --git a/disk/mdadm/HISTORY b/disk/mdadm/HISTORY
index d4ce62d..84e72fe 100644
--- a/disk/mdadm/HISTORY
+++ b/disk/mdadm/HISTORY
@@ -1,3 +1,6 @@
+2011-10-05 Bor Kraljič <pyrobor AT ver.si>
+ * linux-3.0.patch: added upstream patch for kernel 3.0 support (issue
#230)
+
2011-03-30 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* PRE_BUILD: remove compiler warnings/errors to fix build with
gcc 4.6
diff --git a/disk/mdadm/PRE_BUILD b/disk/mdadm/PRE_BUILD
index 1dc3479..c4886fd 100755
--- a/disk/mdadm/PRE_BUILD
+++ b/disk/mdadm/PRE_BUILD
@@ -2,4 +2,5 @@ default_pre_build &&
cd ${SOURCE_DIRECTORY} &&
sedit 's:-Wall::' Makefile &&
sedit 's:-Wextra::' Makefile &&
-sedit 's:-Werror::' Makefile
+sedit 's:-Werror::' Makefile &&
+patch -p1 -d $SOURCE_DIRECTORY < $SPELL_DIRECTORY/linux-3.0.patch
diff --git a/disk/mdadm/linux-3.0.patch b/disk/mdadm/linux-3.0.patch
new file mode 100644
index 0000000..b8111b6
--- /dev/null
+++ b/disk/mdadm/linux-3.0.patch
@@ -0,0 +1,45 @@
+From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb AT suse.de>
+Date: Fri, 17 Jun 2011 22:49:24 +1000
+Subject: [PATCH] util: correctly parse shorter linux version numbers.
+
+The next version of Linux might be 3.0. If it is, get_linux_version
+will fail.
+So make it more robust.
+
+Reported-by: Namhyung Kim <namhyung AT gmail.com>
+Reported-by: Milan Broz <mbroz AT redhat.com>
+Signed-off-by: NeilBrown <neilb AT suse.de>
+---
+ util.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/util.c b/util.c
+index 10bbe56..55d171a 100644
+--- a/util.c
++++ b/util.c
+@@ -146,16 +146,16 @@ int get_linux_version()
+ {
+ struct utsname name;
+ char *cp;
+- int a,b,c;
++ int a = 0, b = 0,c = 0;
+ if (uname(&name) <0)
+ return -1;
+
+ cp = name.release;
+ a = strtoul(cp, &cp, 10);
+- if (*cp != '.') return -1;
+- b = strtoul(cp+1, &cp, 10);
+- if (*cp != '.') return -1;
+- c = strtoul(cp+1, NULL, 10);
++ if (*cp == '.')
++ b = strtoul(cp+1, &cp, 10);
++ if (*cp == '.')
++ c = strtoul(cp+1, &cp, 10);
+
+ return (a*1000000)+(b*1000)+c;
+ }
+--
+1.7.6.3
+



  • [SM-Commit] GIT changes to master grimoire by Bor Kraljič (b261ceccb4eaa5730f785bceb643528ccea467eb), Bor Kraljič, 10/05/2011

Archive powered by MHonArc 2.6.24.

Top of Page