Accept kernel 3.0 uname string in libdevmapper initialization.
This commit is contained in:
parent
7c4433fcec
commit
d47b2bc379
32
lvm2-uname.patch
Normal file
32
lvm2-uname.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- a/libdm/ioctl/libdm-iface.c
|
||||
+++ b/libdm/ioctl/libdm-iface.c
|
||||
@@ -152,6 +152,7 @@ static int _uname(void)
|
||||
{
|
||||
static int _uts_set = 0;
|
||||
struct utsname _uts;
|
||||
+ int parts;
|
||||
|
||||
if (_uts_set)
|
||||
return 1;
|
||||
@@ -160,10 +161,18 @@ static int _uname(void)
|
||||
log_error("uname failed: %s", strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
- if (sscanf(_uts.release, "%d.%d.%d",
|
||||
+
|
||||
+ parts = sscanf(_uts.release, "%d.%d.%d",
|
||||
&_kernel_major,
|
||||
&_kernel_minor,
|
||||
- &_kernel_release) != 3) {
|
||||
+ &_kernel_release);
|
||||
+
|
||||
+ if (parts == 1 && _kernel_major >= 3) {
|
||||
+ _kernel_minor = 0;
|
||||
+ _kernel_release = 0;
|
||||
+ } else if (parts == 2 && _kernel_major >= 3) {
|
||||
+ _kernel_release = 0;
|
||||
+ } else if (parts != 3) {
|
||||
log_error("Could not determine kernel version used.");
|
||||
return 0;
|
||||
}
|
||||
|
@ -30,13 +30,14 @@
|
||||
Summary: Userland logical volume management tools
|
||||
Name: lvm2
|
||||
Version: 2.02.84
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
URL: http://sources.redhat.com/lvm2
|
||||
Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
|
||||
Source1: %{name}-tmpfiles.conf
|
||||
Patch0: lvm2-set-default-preferred_names.patch
|
||||
Patch1: lvm2-uname.patch
|
||||
|
||||
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
|
||||
BuildRequires: ncurses-devel
|
||||
@ -68,6 +69,7 @@ or more physical volumes and creating one or more logical volumes
|
||||
%prep
|
||||
%setup -q -n LVM2.%{version}
|
||||
%patch0 -p1 -b preferred_names
|
||||
%patch1 -p1 -b .uname
|
||||
|
||||
%build
|
||||
%define _exec_prefix ""
|
||||
@ -475,6 +477,9 @@ the device-mapper event library.
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Jun 4 2011 Milan Broz <mbroz@redhat.com> - 2.02.84-2
|
||||
- Accept kernel 3.0 uname string in libdevmapper initialization.
|
||||
|
||||
* Wed Feb 9 2011 Alasdair Kergon <agk@redhat.com> - 2.02.84-1
|
||||
- Fix big-endian CRC32 checksumming broken since 2.02.75. If affected,
|
||||
ensure metadata backups in /etc/lvm/backup are up-to-date (vgcfgbackup)
|
||||
|
Loading…
Reference in New Issue
Block a user