Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 377556 Details for
Bug 511110
<=app-laptop/laptop-mode-tools-1.64 is incompatible with kernel >=3.13
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pci-support-both-enable-enabled.patch
0001-pci-support-both-enable-enabled.patch (text/plain), 4.00 KB, created by
Alon Bar-Lev (RETIRED)
on 2014-05-24 09:36:48 UTC
(
hide
)
Description:
pci-support-both-enable-enabled.patch
Filename:
MIME Type:
Creator:
Alon Bar-Lev (RETIRED)
Created:
2014-05-24 09:36:48 UTC
Size:
4.00 KB
patch
obsolete
>From 92bb2d3963d0af6ff8e53023880ecfbfd2f08f31 Mon Sep 17 00:00:00 2001 >From: Alon Bar-Lev <alon.barlev@gmail.com> >Date: Sat, 24 May 2014 12:34:58 +0300 >Subject: [PATCH] pci: support both enable/enabled > >Starting with linux kernel 3.13, the sysfs attribute 'enable' for pci >devices was renambed to 'enabled'. > >Support the two notations to allow seamless migration. > >Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> >--- > usr/share/laptop-mode-tools/modules/ethernet | 27 +++++++++++++--------- > .../laptop-mode-tools/modules/wireless-ipw-power | 2 +- > .../laptop-mode-tools/modules/wireless-iwl-power | 2 +- > 3 files changed, 18 insertions(+), 13 deletions(-) > >diff --git a/usr/share/laptop-mode-tools/modules/ethernet b/usr/share/laptop-mode-tools/modules/ethernet >index 0b31775..94837d4 100755 >--- a/usr/share/laptop-mode-tools/modules/ethernet >+++ b/usr/share/laptop-mode-tools/modules/ethernet >@@ -63,19 +63,24 @@ if [ x$CONTROL_ETHERNET = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_ETHE > fi > fi > >- if ! [ -z $dev_path ] && [ -f $dev_path/enabled ]; then >+ dev_enable_path= >+ if [ x$dev_path != x ]; then >+ if [ -f $dev_path/enabled ]; then >+ dev_enable_path=$dev_path/enabled >+ elif [ -f $dev_path/enable ]; then >+ dev_enable_path=$dev_path/enable >+ fi >+ fi >+ >+ if [ x$dev_enable_path != x ]; then > if [ x$DISABLE_ETHERNET = x1 ]; then >- if [ -f $dev_path/enabled ]; then >- echo 0 > $dev_path/enabled 2>/dev/null >- log "VERBOSE" "ethernet: Disabling ethernet device $DEVICE" >- DISABLED=1 >- fi >+ echo 0 > $dev_enable_path 2>/dev/null >+ log "VERBOSE" "ethernet: Disabling ethernet device $DEVICE" >+ DISABLED=1 > elif [ x$DISABLE_ETHERNET = x0 ]; then >- if [ -f $dev_path/enabled ]; then >- echo 1 > $dev_path/enabled 2>/dev/null >- log "VERBOSE" "ethernet: Re-enabling ethernet device $DEVICE" >- DISABLED=0 >- fi >+ echo 1 > $dev_enable_path 2>/dev/null >+ log "VERBOSE" "ethernet: Re-enabling ethernet device $DEVICE" >+ DISABLED=0 > elif [ x$DISABLE_ETHERNET = x2 ]; then > DISABLED=0 # Be safe. :-) > else >diff --git a/usr/share/laptop-mode-tools/modules/wireless-ipw-power b/usr/share/laptop-mode-tools/modules/wireless-ipw-power >index bd04961..062b3d3 100755 >--- a/usr/share/laptop-mode-tools/modules/wireless-ipw-power >+++ b/usr/share/laptop-mode-tools/modules/wireless-ipw-power >@@ -71,7 +71,7 @@ if [ x$CONTROL_IPW_POWER = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_IPW > # the driver. > LINK_TARGET=`readlink $DEVICE/device/driver` > LINK_TARGET=${LINK_TARGET##*/} >- ENABLED=`cat $DEVICE/device/enabled` >+ ENABLED=`[ -r $DEVICE/device/enabled ] && cat $DEVICE/device/enabled || cat $DEVICE/device/enable` > > if [ $ENABLED -eq 1 -a "$LINK_TARGET" = "$1" ]; then > # add the interface name to the list >diff --git a/usr/share/laptop-mode-tools/modules/wireless-iwl-power b/usr/share/laptop-mode-tools/modules/wireless-iwl-power >index 184bb2f..ce82e1d 100755 >--- a/usr/share/laptop-mode-tools/modules/wireless-iwl-power >+++ b/usr/share/laptop-mode-tools/modules/wireless-iwl-power >@@ -24,7 +24,7 @@ findWifiIfsByDriver () { > # the driver. > LINK_TARGET=`readlink $DEVICE/device/driver` > LINK_TARGET=${LINK_TARGET##*/} >- ENABLED=`cat $DEVICE/device/enabled` >+ ENABLED=`[ -r $DEVICE/device/enabled ] && cat $DEVICE/device/enabled || cat $DEVICE/device/enable` > > if [ $ENABLED -eq 1 -a "$LINK_TARGET" = "$1" ] ; then > # add the interface name to the list >-- >1.8.5.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 511110
:
377500
|
377502
|
377504
| 377556 |
377752