[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#667823: marked as done (eeepc-acpi-scripts: Support for disabling and enabling card reader)



Your message dated Wed, 01 Apr 2020 19:02:55 +0000
with message-id <E1jJidb-0003VK-Ao@fasolo.debian.org>
and subject line Bug#955195: Removed package(s) from unstable
has caused the Debian Bug report #667823,
regarding eeepc-acpi-scripts: Support for disabling and enabling card reader
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
667823: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667823
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: eeepc-acpi-scripts
Version: 1.1.12
Severity: wishlist
Tags: patch

There is a knob in sysfs that allows toggling of card reader state.
Attached patch provides handler scripts for changing and displaying
that state.

The patch uses escaping of notification title as suggested in #667821.

-- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (193, 'testing'), (192, 'unstable'), (190, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to ru_RU.UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/acpilib/cardreader.sh b/acpilib/cardreader.sh
new file mode 100644
index 0000000..86461d9
--- /dev/null
+++ b/acpilib/cardreader.sh
@@ -0,0 +1,31 @@
+# shell library for handling builtin card reader of Asus EeePC
+#
+# to be sourced
+
+CRD_CTL=/sys/devices/platform/eeepc/cardr
+[ -e "$CRD_CTL" ] || CRD_CTL=/proc/acpi/asus/cardr #pre-2.6.26
+# check if card reader is enabled and return success (exit code 0 if it is
+# return failure (exit code 1) if it is not
+#
+# uses the acpi platform driver interface if that is available
+# if not, assume there is not card reader and return false
+cardreader_is_on()
+{
+    if [ -e "$CRD_CTL" ]; then
+        [ $( cat $CRD_CTL ) = "1" ]
+    else
+        false
+    fi
+}
+
+toggle_cardreader()
+{
+    if cardreader_is_on; then
+        echo 0 > $CRD_CTL
+    else
+        if [ -e "$CRD_CTL" ]; then
+            echo 1 > $CRD_CTL
+        fi
+    fi
+}
+
diff --git a/acpilib/notify.sh b/acpilib/notify.sh
index e97e596..a771e22 100644
--- a/acpilib/notify.sh
+++ b/acpilib/notify.sh
@@ -9,6 +9,7 @@ notify() {
     ICON_super_hybrid_engine="battery"
     ICON_error="error"
     ICON_camera="camera"
+    ICON_cardreader="media-flash"
     ICON_touchpad="input-touchpad"
     ICON_gsm="gsm"
     ICON_wifi="network-wireless"
diff --git a/debian/eeepc-acpi-scripts.default.in b/debian/eeepc-acpi-scripts.default.in
index f4d6469..9aea681 100644
--- a/debian/eeepc-acpi-scripts.default.in
+++ b/debian/eeepc-acpi-scripts.default.in
@@ -67,6 +67,8 @@ BLUETOOTH_FALLBACK_TO_HCITOOL='yes'
 #      on/off any USB bluetooth adapter found.
 #  - handle_camera_toggle
 #      Toggles internal camera on/off.
+#  - handle_cardreader_toggle
+#      Toggles internal card reader on/off.
 #  - handle_vga_toggle
 #      Toggles between panel and VGA (as configured above).
 #  - handle_gsm_toggle
diff --git a/eeepc-acpi-scripts/hotkey.sh b/eeepc-acpi-scripts/hotkey.sh
index c09861c..2ff8aa8 100755
--- a/eeepc-acpi-scripts/hotkey.sh
+++ b/eeepc-acpi-scripts/hotkey.sh
@@ -85,6 +85,24 @@ handle_camera_toggle() {
     fi
 }
 
+show_cardreader() {
+    if cardreader_is_on; then
+	notify cardreader 'Card\ reader Enabled'
+    else
+	notify cardreader 'Card\ reader Disabled'
+    fi
+}
+
+handle_cardreader_toggle() {
+    . $PKG_DIR/lib/cardreader.sh
+    if [ -e "$CRD_CTL" ]; then
+	toggle_cardreader
+	show_cardreader
+    else
+	notify error 'Card\ reader unavailable'
+    fi
+}
+
 handle_shengine() {
     . $PKG_DIR/lib/shengine.sh
     handle_shengine "$@"

--- End Message ---
--- Begin Message ---
Version: 1.1.14+rm

Dear submitter,

as the package eeepc-acpi-scripts has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/955195

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: