From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: +rule: query device inode by Major and Minor - am i inventing brand new bycicle ?
Date: Mon, 15 Aug 2005 13:40:20 +0000 [thread overview]
Message-ID: <20050815134020.GB24373@vrfy.org> (raw)
In-Reply-To: <4300318B.8040505@nm.ru>
On Mon, Aug 15, 2005 at 10:09:15AM +0400, Arioch wrote:
> I made (and attached) a tiny rule, and hope it will be interesting to
> some of you.
> See attach.
> I made it with two thought in background:
>
> 1) Some drivers with incomplete SYSFS support (namely, wbsd on my box)
> publiches major and minor, but not the device inode name :-(
> If i wantr to find it from script - how ? ls -lR | grep ? BRR! :-) Hate
> RegExp's :-)
You mean the device 'node', the file in /dev, right?
What does publish major/minor mean? That the driver does not create an
entry in /sys/block/*?
> 2) On my box pktsetup (packet-mode CD-RW burning helper, part of
> udfhelper) creates two block device per drive! I wanted to catch this.
> After all it seems that it creates second inode by mknod, not kernel
> call and UDEV. But surprisingly i saw a number of other duplicate inodes
> with the identical major-minor
What nodes exactly have the same major/minor? That setup may need to be
fixed.
> So, as i want to be famous, would You, please, considering including
> this rule into UDEV examples ? :-)
We don't provide a dead example file anymore. Nobody cared about that file,
it was outdated and some people expected this as "the default" udev file
and complained about the entries, so I just deleted it. Instead we carry
a lot of distro rules as examples now. So you need to convince a distro to
ship your rule to get it included. Good luck! :)
> Ouugh, almost forgot to state a wish:
> Can there be on more key for rules ?
> Similar to RETURN, but matching not string form stdout, but the return
> code of program ( $? ) ?
You mean similar to "RESULT"?
> Why - cause i wanted to do if/else/then.
> I run a program to check if a symlink already exists - then i run
> another program to check if it does not exists !
PROGRAM!="..." should catch non-zero exit's. You also can jump with GOTO="..."
to a LABEL="..." line (see the persistent disk rules examples).
> And i cannot use /bin/ls or /bin/readlink and then use RESULT - it puts
> its output onto stderr if file not found, which seems to make UDEV
> ignore that rule inn the future (i could not find this in man, but i
> guess it is said somewhere on some wiki - but i'm still offline) . As
> well, stderr is not intercepted and user sees that unpretty sign of my
> sillyness :)
> And i didn't want to create a separate file (bash script) for such a
> simple task.
Yes stderr is ignored. You will need to fork a shell for that to catch.
> To end this mindflow, if i mentioned man's, i'd like to say that i saw a
> typo in the "man udev".
> When describing "=" operation, there is word "iNplicit" instead of
> "iMplicit". If it is not my English - it is is a typo :-)
Will fix that. Thanks!
Thanks,
Kay
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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
next prev parent reply other threads:[~2005-08-15 13:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 6:09 +rule: query device inode by Major and Minor - am i inventing brand Arioch
2005-08-15 13:40 ` Kay Sievers [this message]
2005-08-16 10:52 ` +rule: query device inode by Major and Minor - am i inventing Arioch
2005-08-16 17:13 ` Arioch
2005-08-16 18:18 ` Arioch
2005-08-16 18:29 ` +rule: query device inode by Major and Minor - am i inventing brand new bycicle ? Kay Sievers
2005-08-16 18:50 ` +rule: query device inode by Major and Minor - am i inventing Arioch
2005-08-16 21:28 ` +rule: query device inode by Major and Minor - am i inventing brand new bycicle ? Greg KH
2005-08-17 8:07 ` +rule: query device inode by Major and Minor - am i inventing Arioch
2005-08-18 17:59 ` +rule: query device inode by Major and Minor - am i inventing brand new bycicle ? Greg KH
2005-08-18 21:04 ` +rule: query device inode by Major and Minor - am i inventing Arioch
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=20050815134020.GB24373@vrfy.org \
--to=kay.sievers@vrfy.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).