From: Robert Love <rml@tech9.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: [patch] udev: cool test scripts
Date: Fri, 17 Oct 2003 23:18:48 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106643323718536@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106643177717335@msgid-missing>
On Fri, 2003-10-17 at 18:58, Greg KH wrote:
> Nice, thanks for the patch, I've applied it.
Thanks.
> But the test.block script doesn't catch any partitions on the block
> devices :)
Never happy! But for a fellow Gator...
[19:07:52]root@phantasy:~/src/udev/udev# ./test.block
[19:13:37]root@phantasy:~/src/udev/udev# ls /udev/hd*
ls: /udev/hd*: No such file or directory
[19:13:42]root@phantasy:~/src/udev/udev# ./test.block
[19:13:53]root@phantasy:~/src/udev/udev# ls /udev/hd*
/udev/hda /udev/hda2 /udev/hda4 /udev/hda6 /udev/hdd
/udev/hda1 /udev/hda3 /udev/hda5 /udev/hdc
test.block now recurses /sys/block, looking for partitions. Should add
all drives and all partitions.
Patch is against 003 plus last patch.
Robert Love
test.block | 10 ++++++++++
1 files changed, 10 insertions(+)
diff -urN udev-cvs/test.block udev/test.block
--- udev-cvs/test.block 2003-10-17 19:17:36.299032104 -0400
+++ udev/test.block 2003-10-17 19:18:16.672894344 -0400
@@ -7,6 +7,16 @@
export ACTIONd # 'add' or 'remove'
for i in ${SYSFSDIR}/block/*; do
+ # add each drive
export DEVPATH="/"`echo $i | cut --delimiter='/' --fields=3-`
$BIN block
+
+ # add each partition, on each device
+ for j in $i/*; do
+ if [ -f $j/dev ]; then
+ export DEVPATH="/"`echo $j | \
+ cut --delimiter='/' --fields=3-`
+ $BIN block
+ fi
+ done
done
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
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:[~2003-10-17 23:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-17 22:58 [patch] udev: cool test scripts Greg KH
2003-10-17 23:18 ` Robert Love [this message]
2003-10-18 0:18 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-10-17 22:35 Robert Love
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=marc-linux-hotplug-106643323718536@msgid-missing \
--to=rml@tech9.net \
--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).