(Re-)apply patch to fix Linux 3.0 problem.
This commit is contained in:
parent
3cb85c39f2
commit
61bbdc442a
@ -0,0 +1,35 @@
|
||||
From bb4fbe2130cd85727bbaf6c71b2d27b6769aa4aa Mon Sep 17 00:00:00 2001
|
||||
From: Jim Meyering <meyering@redhat.com>
|
||||
Date: Sun, 5 Jun 2011 18:15:31 +0200
|
||||
Subject: [PATCH] libparted: accommodate two-component linux version number
|
||||
like 3.0
|
||||
|
||||
* libparted/arch/linux.c (_get_linux_version): Also accept 2-component
|
||||
version numbers.
|
||||
* NEWS: (Bug fixes): Mention it.
|
||||
Reported by Richard W.M. Jones.
|
||||
---
|
||||
NEWS | 4 ++++
|
||||
libparted/arch/linux.c | 6 +++++-
|
||||
2 files changed, 9 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
||||
index aeaf98f..111816c 100644
|
||||
--- a/libparted/arch/linux.c
|
||||
+++ b/libparted/arch/linux.c
|
||||
@@ -610,7 +610,11 @@ _get_linux_version ()
|
||||
|
||||
if (uname (&uts))
|
||||
return kver = 0;
|
||||
- if (sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny) != 3)
|
||||
+ if (sscanf (uts.release, "%u.%u.%u", &major, &minor, &teeny) == 3)
|
||||
+ ; /* ok */
|
||||
+ else if (sscanf (uts.release, "%u.%u", &major, &minor) == 2)
|
||||
+ teeny = 0;
|
||||
+ else
|
||||
return kver = 0;
|
||||
|
||||
return kver = KERNEL_VERSION (major, minor, teeny);
|
||||
--
|
||||
1.7.5.2
|
||||
|
@ -4,7 +4,7 @@
|
||||
Summary: The GNU disk partition manipulation program
|
||||
Name: parted
|
||||
Version: 3.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/System
|
||||
URL: http://www.gnu.org/software/parted
|
||||
@ -22,6 +22,8 @@ Patch2: parted-3.0-libparted-fix-snap-radius-so-that-it-is-using-half.patch
|
||||
Patch3: parted-3.0-libparted-don-t-allow-values-less-than-1.patch
|
||||
Patch4: parted-3.0-tests-add-test-for-radius-divide-by-2-fix.patch
|
||||
Patch5: parted-3.0-tests-add-test-for-value-less-than-1.patch
|
||||
# Fix for kernel 3.0 new version numbering.
|
||||
Patch6: parted-3.0-libparted-accommodate-two-component-linux-version-nu.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: e2fsprogs-devel
|
||||
@ -150,6 +152,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jun 29 2011 Richard W.M. Jones <rjones@redhat.com> - 3.0-2
|
||||
- (Re-)apply patch to fix Linux "3.0" problem.
|
||||
|
||||
* Tue Jun 28 2011 Brian C. Lane <bcl@redhat.com> - 3.0-1
|
||||
- Update to parted v3.0
|
||||
- Run autoreconf so that patches to .am files will work
|
||||
|
Loading…
Reference in New Issue
Block a user