[BusyBox] [PATCH] devfsd - last minute fix n2

Tito farmatito at tiscali.it
Sat Nov 20 02:03:21 UTC 2004


Hi Allen,
On Friday 19 November 2004 OO:24, Allen Chan wrote:
> This revised patch does not fix the original problem.  This is because 
> the error message is generated during the bb_verror_msg() call inside 
extern void bb_verror_msg(const char *s, va_list p)
{
	fflush(stdout);
	fprintf(stderr, "%s: ", bb_applet_name);
	vfprintf(stderr, s, p);
}

This is strange as the man pages don't report errno setting for fflush, fprintf and vfprintf.
The only call in msg_logger() that can change errno seems to be access().
So if you restore or zero errno after access is called or at the end of the msg_logger your problem
should be solved or am i missing something important here?

> msg_logger(), so that errno must be restored before bb_verror_msg() 
> is called in order to not generate the false error message.
> 

I'm running patched busybox devfsd (renamed to /sbin/devfsd) in this moment,
without syslogd and klogd and without /dev/log and it works for me.

  PID TTY          TIME CMD
    1 ?        00:00:01 init
    2 ?        00:00:00 ksoftirqd/0
    3 ?        00:00:00 events/0
    4 ?        00:00:00 khelper
   20 ?        00:00:00 kblockd/0
   40 ?        00:00:00 kapmd
   42 ?        00:00:00 pdflush
   43 ?        00:00:00 pdflush
   45 ?        00:00:00 aio/0
   44 ?        00:00:00 kswapd0
  118 ?        00:00:00 kseriod
  379 ?        00:00:00 kjournald
  578 ?        00:00:00 minilogd
  635 ?        00:00:00 devfsd
  736 ?        00:00:00 khubd
 1123 ?        00:00:00 scsi_eh_0
 1124 ?        00:00:00 usb-storage
 1200 ?        00:00:00 scsi_eh_1
 1201 ?        00:00:00 usb-storage
 1332 ?        00:00:00 kjournald
 1333 ?        00:00:00 kjournald
 1343 ?        00:00:00 kjournald
 1344 ?        00:00:00 kjournald
 1345 ?        00:00:00 kjournald
 1346 ?        00:00:00 kjournald
 1347 ?        00:00:00 kjournald
 3785 ?        00:00:00 xfs
 3809 ?        00:00:00 dbus-daemon-1
 3834 ?        00:00:00 irattach
 3843 ?        00:00:00 kIrDAd
 3869 ?        00:00:00 xinetd
 3925 ?        00:00:00 cupsd
 4165 ?        00:00:00 master
 4170 ?        00:00:00 pickup
 4171 ?        00:00:00 qmgr
 4172 ?        00:00:00 tlsmgr
 4463 ?        00:00:00 miniserv.pl
 4554 ?        00:00:00 login
 4562 tty2     00:00:00 mingetty
 4563 tty3     00:00:00 mingetty
 4564 tty4     00:00:00 mingetty
 4565 tty5     00:00:00 mingetty
 4566 tty6     00:00:00 mingetty
 4793 tty1     00:00:00 bash
 4859 tty1     00:00:00 ps

devfsd /dev
devfsd v1.3.25  started for /dev

 
Ciao,
Tito



More information about the busybox mailing list