summaryrefslogtreecommitdiffstats
path: root/abs/core/parted/linux.c.patch
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-08-03 23:14:05 (GMT)
committerCecil <knoppmyth@gmail.com>2011-08-03 23:14:05 (GMT)
commit998faf16b1b62493b39aa13b3cb53dfac266ef4c (patch)
treee39f222ebd2e5ca78211045d1d12ccc02f8c5516 /abs/core/parted/linux.c.patch
parent085e16d501ac72951e7455385cc8af7e90fa02cb (diff)
parenta9c47f145393b31d7f656b14a2952ab6fc6fec58 (diff)
downloadlinhes_pkgbuild-998faf16b1b62493b39aa13b3cb53dfac266ef4c.zip
linhes_pkgbuild-998faf16b1b62493b39aa13b3cb53dfac266ef4c.tar.gz
linhes_pkgbuild-998faf16b1b62493b39aa13b3cb53dfac266ef4c.tar.bz2
Merge branch 'testing' of ssh://cesman@linhes.org/mount/repository/linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/parted/linux.c.patch')
-rw-r--r--abs/core/parted/linux.c.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/abs/core/parted/linux.c.patch b/abs/core/parted/linux.c.patch
new file mode 100644
index 0000000..c9feea1
--- /dev/null
+++ b/abs/core/parted/linux.c.patch
@@ -0,0 +1,25 @@
+--- a/libparted/arch/linux.c 2011-05-27 14:52:37.000000000 +0200
++++ b/libparted/arch/linux.c 2011-07-29 20:25:38.000000000 +0200
+@@ -601,17 +601,17 @@
+ static int kver = -1;
+
+ struct utsname uts;
+- int major;
+- int minor;
+- int teeny;
++ int major = 0;
++ int minor = 0;
++ int teeny = 0;
+
+ if (kver != -1)
+ return kver;
+
+ if (uname (&uts))
+ return kver = 0;
+- if (sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny) != 3)
+- return kver = 0;
++ int n = sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny);
++ assert (n == 2 || n == 3);
+
+ return kver = KERNEL_VERSION (major, minor, teeny);
+ }