Add multipath support to ofpathname for bug #884826
This commit is contained in:
parent
d3ac2512b5
commit
af28865222
29
powerpc-utils-1.2.12-ofpathname-884826.patch
Normal file
29
powerpc-utils-1.2.12-ofpathname-884826.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -up powerpc-utils-1.2.12/scripts/ofpathname.884826 powerpc-utils-1.2.12/scripts/ofpathname
|
||||
--- powerpc-utils-1.2.12/scripts/ofpathname.884826 2012-12-13 16:31:42.890057349 +0100
|
||||
+++ powerpc-utils-1.2.12/scripts/ofpathname 2012-12-13 16:33:23.929498245 +0100
|
||||
@@ -291,6 +291,13 @@ print_aliases()
|
||||
fi
|
||||
}
|
||||
|
||||
+get_slave()
|
||||
+{
|
||||
+ cd /sys/class/*/$1
|
||||
+ while [[ -n "`ls slaves 2> /dev/null`" ]]; do cd slaves/*; done
|
||||
+ $FIND /dev -name "`basename $PWD`"
|
||||
+}
|
||||
+
|
||||
#
|
||||
# logical_to_ofpathname
|
||||
# Conversion for logical device name to an Open Firmware device path
|
||||
@@ -333,6 +340,11 @@ logical_to_ofpathname()
|
||||
fi ;;
|
||||
hd*) l2of_ide ;;
|
||||
fd*) echo "no fd support yet" ;;
|
||||
+ dm-*)
|
||||
+ DEVNAME=`get_slave $DEVICE`
|
||||
+ logical_to_ofpathname
|
||||
+ exit
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if [[ -z $OF_PATH ]]; then
|
@ -1,6 +1,6 @@
|
||||
Name: powerpc-utils
|
||||
Version: 1.2.12
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Utilities for PowerPC platforms
|
||||
|
||||
Group: System Environment/Base
|
||||
@ -8,6 +8,7 @@ License: CPL
|
||||
URL: http://sourceforge.net/projects/%{name}/
|
||||
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||
Source1: nvsetenv
|
||||
Patch0: powerpc-utils-1.2.12-ofpathname-884826.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: zlib-devel doxygen automake librtas-devel libservicelog-devel >= 1.0.1-2
|
||||
|
||||
@ -30,6 +31,7 @@ Utilities for PowerPC platforms.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
# This hack is needed only for platforms with autoconf < 2.63
|
||||
%if 0%{?fedora} < 9 && 0%{?rhel} < 6
|
||||
@ -129,6 +131,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%preun
|
||||
|
||||
%changelog
|
||||
* Thu Dec 13 2012 Karsten Hopp <karsten@redhat.com> 1.2.12-4
|
||||
- Add multipath support to ofpathname for bug #884826
|
||||
|
||||
* Tue Sep 04 2012 Karsten Hopp <karsten@redhat.com> 1.2.12-3
|
||||
- require powerpc-utils-python (#852326 comment 7)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user