[BusyBox] [PATCH] devfsd new patch

Tito farmatito at tiscali.it
Mon Nov 22 13:39:05 UTC 2004


On Saturday 20 November 2004 OO:54, Allen Chan wrote:
> Tito,
> 
> I ran the following five tests:
> (1) start devfsd with /etc/devfsd.conf and no /dev/log
> (2) start devfsd with no /etc/devfsd.conf and no /dev/log
> (3) start devfsd with badly linked /etc/devfsd.conf and no /dev/log
> (4) start devfsd with /etc/devfsd.conf and /dev/log
> (5) start devfsd with no /etc/devfsd.conf and /dev/log
> 
> against the following three versions of busybox:
> (a) original - busybox 1.00
> (b) patched - busybox 1.00 with new patch
> (c) errnosave - busybox 1.00 with orig patch saving/restoring errno.
> 
> The failures are summarized as follows:
> * 1a outputs a bad error message
> * 3a outputs the wrong error message
> * 3b outputs the wrong error message
Hi,
for this test case:
"3b outputs the wrong error message" > when (3) starting devfsd with badly linked /etc/devfsd.conf and no /dev/log
(i've set /dev/log to /dev/xlog in msg_logger() to simulate missing /dev/log)
on my box I get:

ls -la /etc/devfsd.conf
lrwxrwxrwx  1 root root 5 Nov 22 14:00 /etc/devfsd.conf -> pippo
ls: /etc/pippo: No such file or directory

root at localhost:/dev/pts/2:/root/Desktop/busybox# devfsd /dev
devfsd v1.3.25  started for /dev
devfsd: read config file: /etc/devfsd.conf: No such file or directory
root at localhost:/dev/pts/2:/root/Desktop/busybox# echo $?
1

which is not too different from the original devfsd behaviour:

root at localhost:/dev/pts/2:/root/Desktop/busybox# devfsd.orig /dev
device management daemon exiting as no /etc/devfsd.conf
root at localhost:/dev/pts/2:/root/Desktop/busybox# echo $?
0

just the exit code is different but this looks not so important to me in this 
case.

> Additionally, here are other differences:
> * 1c outputs a "success" message while 1b is silent an 1a outputs an 
> error message.
Can't reproduce your results in this case:
 (1) start devfsd with /etc/devfsd.conf and no /dev/log
 (i've set /dev/log to /dev/xlog in msg_logger() to simulate missing /dev/log)
devfsd v1.3.25  started for /dev (on stdout)
devfsd: read config file: /etc/devfs/nothing/: No such file or directory (on stderr with OPTIONAL_INCLUDE)
devfsd: read config file: /etc/devfs/nothing/nothing: No such file or directory  (on stderr  with OPTIONAL_INCLUDE)

devfsd.orig /dev
Started device management daemon v1.3.25 for /dev  (on stdout)

no logging to stderr as missing OPTIONAL_INCLUDE entries are not logged.

> * 4a and 4c generate a "success" message in /var/log/messages while 4b 
> generates no message.
> 
Looks to be close to the original devfsd behaviour:
(4) start devfsd with /etc/devfsd.conf and /dev/log

root at localhost:/dev/pts/2:/root/Desktop/busybox# devfsd /dev
devfsd v1.3.25  started for /dev (on stdout)
Nov 22 14:22:22 localhost devfsd: read config file: /etc/devfs/nothing/: No such file or directory (on syslog)
Nov 22 14:22:22 localhost devfsd: read config file: /etc/devfs/nothing/nothing: No such file or directory (on syslog)

root at localhost:/dev/pts/2:/root/Desktop/busybox# devfsd.orig /dev
Started device management daemon v1.3.25 for /dev (on stdout)

no syslog as missing OPTIONAL_INCLUDE entries are not logged.

If you don't have other doubts or suggestions or other test cases we didn't check
so far I will resend the new patch in a few days for CVS.

Thanks for your help, I learned a lot in this thread.

Best regards and Ciao,
Tito






More information about the busybox mailing list