Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Reisner <dreisner@archlinux.org>
To: alsa-devel@alsa-project.org
Cc: Dave Reisner <dreisner@archlinux.org>
Subject: [PATCH] alsa-restore.rules: refer to correct attr
Date: Sun, 12 Jan 2014 11:15:52 -0500	[thread overview]
Message-ID: <1389543352-9105-1-git-send-email-dreisner@archlinux.org> (raw)

$attr{number} in the RUN rule is an empty expansion. This makes sense,
because the path doesn't exist -- i.e., it refers to the path:

/sys/devices/pci0000:00/foo/bar/sound/card0/controlC0/number

Instead, refer to $attr{device/number}, which does exist.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
This seems to have been broken when it was first introduced a little over
three years ago (de7c3eff0e).

Please CC me on replies as I am not subscribed to the list.

 alsactl/90-alsa-restore.rules.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in
index 88e12e0..c68119d 100644
--- a/alsactl/90-alsa-restore.rules.in
+++ b/alsactl/90-alsa-restore.rules.in
@@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="
 GOTO="alsa_restore_end"
 
 LABEL="alsa_restore_go"
-TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{number}"
-TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{number}"
+TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{device/number}"
+TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{device/number}"
 
 LABEL="alsa_restore_end"
-- 
1.8.5.2

             reply	other threads:[~2014-01-12 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-12 16:15 Dave Reisner [this message]
2014-01-12 16:39 ` [PATCH] alsa-restore.rules: refer to correct attr Dave Reisner
2014-01-13 10:31   ` [alsa-devel] " Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389543352-9105-1-git-send-email-dreisner@archlinux.org \
    --to=dreisner@archlinux.org \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox