On Fri, 20.02.2004 Sgt B wrote:
> What is this value exaclty?
fd stands for file descriptor. 0, 1 and 2 are the linux standard file
descriptors for standard input (0), standard output (1) and standard
error (2). tty_log_fd creates a new file descriptor, with the function
to redirect any tty logging data to it. You can redirect the file
descriptor itself to a file. An example is: tty_log_fd=3 3>tty_log
> I've tried using 3 and UML boots fine, but no logging is done. The
> file is created, but contains nothing.
Do you have tty logging (CONFIG_TTY_LOG) enabled in the kernel
configuration? Unless this is compiled in the file won't grow over 0
Byte.
> 2 gives me a segfault. 1, however, works!
> If I use 1 for the tty_log_fd= value, it appears that the UML doesn't
> boot. The UML command is run, but UML appears to hang (I don't see UML
> booting). If I check the log file though I can see that the UML is
> booting and running just fine.
> ./linux2_6_1 ubd0=root_fs tty_log_fd=1 1>tty_log
This is because anything that goes to standard output (fd=1) is
redirected into the file tty_log. And in this case this is the whole
boot output. And this has nothing to do with tty logging :)
Conclusion:
tty logging works exactly in the way you described first, with a fd
greater 2, because 0-2 are reserved. Additionally, tty logging must be
enabled in the kernel configuration.
Regards,
Sascha
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
|