linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] Let persistent-cd rules use by-id for usb/firewire
Date: Thu, 22 Mar 2007 10:03:43 +0000	[thread overview]
Message-ID: <200703221103.43118.zzam@gentoo.org> (raw)
In-Reply-To: <200703211920.50772.zzam@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

On Mittwoch, 21. März 2007, Matthias Schwarzott wrote:
> On Mittwoch, 21. März 2007, Kay Sievers wrote:
> > On 3/21/07, Matthias Schwarzott <zzam@gentoo.org> wrote:
> > > I suggest to let extras/rule_generator/75-cd-aliases-generator.rules
> > > use by-id for usb/firewire devices.
> > >
> > > Attached patch contains a (at least for me) working solution.
> >
> > At the time the script runs, you already have
> > ID_BUS={ata,scsi,usb,ieee1394} in the environment. Shouldn't we put
> > the logic, which default id-type to use in the script?
>
> Sounds like a good idea :)
>
Try this as a sample implementation.

Matthias

-- 
Matthias Schwarzott (zzam)

[-- Attachment #2: udev-107-usbcd-by-id.patch --]
[-- Type: text/x-diff, Size: 412 bytes --]

diff --git a/extras/rule_generator/write_cd_rules b/extras/rule_generator/write_cd_rules
index 1dbe6b7..bd951c5 100644
--- a/extras/rule_generator/write_cd_rules
+++ b/extras/rule_generator/write_cd_rules
@@ -53,7 +53,15 @@ fi
 if [ "$1" ]; then
 	METHOD="$1"
 else
-	METHOD='by-path'
+	case "$ID_BUS" in
+		usb|ieee1394)
+		METHOD='by-id'
+		;;
+
+		*)
+		METHOD='by-path'
+		;;
+	esac
 fi
 
 case "$METHOD" in

[-- Attachment #3: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 226 bytes --]

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2007-03-22 10:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 18:20 [PATCH] Let persistent-cd rules use by-id for usb/firewire Matthias Schwarzott
2007-03-21 22:27 ` Kay Sievers
2007-03-21 22:34 ` Marco d'Itri
2007-03-21 22:55 ` Matthias Schwarzott
2007-03-21 23:16 ` Kay Sievers
2007-03-22 10:03 ` Matthias Schwarzott [this message]
2007-03-22 20:11 ` Kay Sievers

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=200703221103.43118.zzam@gentoo.org \
    --to=zzam@gentoo.org \
    --cc=linux-hotplug@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).