From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Test script for udevd binary, Request for Comments!
Date: Fri, 09 Apr 2004 20:52:24 +0000 [thread overview]
Message-ID: <20040409205224.GA1652@vrfy.org> (raw)
In-Reply-To: <3ACA40606221794F80A5670F0AF15F84037B9188@PDSMSX403.ccr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 438 bytes --]
On Fri, Apr 09, 2004 at 10:45:40AM +0000, Nick Yin wrote:
> Kay,
>
> Thank you very much for giving me so much suggestion. I will modify this
> test script following your suggestion. :-)
Nick,
here is the needed change for udevd. You can start udevd in your test
script with a specified UDEV_BIN in the environment. If we get a nice
udevd test script, we can merge the change in the main tree along with
your script :)
good luck,
Kay
[-- Attachment #2: 01-udev_bin-override.patch --]
[-- Type: text/plain, Size: 1092 bytes --]
===== udevd.c 1.30 vs edited =====
--- 1.30/udevd.c Fri Apr 2 22:48:21 2004
+++ edited/udevd.c Fri Apr 9 22:12:22 2004
@@ -60,6 +60,7 @@
static void msg_queue_manager(void);
static void user_sighandler(void);
static void reap_kids(void);
+char *udev_bin;
#ifdef LOG
unsigned char logname[LOGNAME_SIZE];
@@ -146,7 +147,7 @@
switch (pid) {
case 0:
/* child */
- execle(UDEV_BIN, "udev", msg->subsystem, NULL, env);
+ execle(udev_bin, "udev", msg->subsystem, NULL, env);
dbg("exec of child failed");
exit(1);
break;
@@ -399,6 +400,7 @@
const int on = 1;
struct sigaction act;
fd_set readfds;
+ char *s;
init_logging("udevd");
dbg("version %s", UDEV_VERSION);
@@ -457,6 +459,15 @@
/* enable receiving of the sender credentials */
setsockopt(ssock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
+
+ /* possible override of udev binary, used for testing */
+ s = getenv("UDEV_BIN");
+ if (s != NULL) {
+ udev_bin = s;
+ dbg("udev binary is set to '%s'", udev_bin);
+ } else {
+ udev_bin = UDEV_BIN;
+ }
FD_ZERO(&readfds);
FD_SET(ssock, &readfds);
next prev parent reply other threads:[~2004-04-09 20:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-07 10:53 Test script for udevd binary, Request for Comments! Yin, Hu
2004-04-08 14:16 ` Kay Sievers
2004-04-08 16:22 ` Sabharwal, Atul
2004-04-08 20:49 ` Kay Sievers
2004-04-09 10:45 ` Nick Yin
2004-04-09 20:52 ` Kay Sievers [this message]
2004-04-10 4:39 ` Nick Yin
2004-04-10 14:04 ` Kay Sievers
2004-04-10 14:48 ` Nick Yin
2004-04-13 10:34 ` Yin, Hu
2004-04-13 13:25 ` Kay Sievers
2004-04-13 13:51 ` Nick Yin
2004-04-14 3:11 ` Yin, Hu
2004-04-14 12:18 ` Kay Sievers
2004-04-14 15:24 ` Nick Yin
2004-04-14 15:33 ` Kay Sievers
2004-04-15 1:03 ` Yin, Hu
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=20040409205224.GA1652@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.