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

Re: Upgrade script for libata transition



On Tue, Dec 29, 2009 at 02:23:10PM +0100, Marco d'Itri wrote:
> On Dec 29, Ben Hutchings <ben@decadent.org.uk> wrote:
> 
> > I agree the enumeration order is not likely to change for most users.
> > However this will cause problems for people who switch back and forth
> > between different kernel versions (e.g. when testing whether a bug is
> > fixed in unstable).
> I can't see any solution for these people, and not having the device
> change name for the others looks like a more important goal to me.

Is it not possible to add corresponding rules, e.g.:

if ($text =~
        /^ENV{ID_CDROM}=="\?\*",\s*
          ENV{ID_PATH}=="([^"]*)-ide-(\d+):(\d+)",\s*
          SYMLINK+="([^"]+)",\s*
          ENV{GENERATED}="1"\n$/x) {
    $text .= sprintf("ENV{ID_CDROM}==\"?*\", "
                     . "ENV{ID_PATH}==\"%s-scsi-%s:0:0:%s\", "
                     . "SYMLINK\+=\"%s\", ENV{GENERATED}=1\n",
                     $1, $2, $3, $4);
}

Ben.

-- 
Ben Hutchings
When you say `I wrote a program that crashed Windows', people just stare ...
and say `Hey, I got those with the system, *for free*'. - Linus Torvalds

Attachment: signature.asc
Description: Digital signature


Reply to: