From: Rob L. <ro...@la...> - 2005-03-04 03:28:20
|
On Thursday 03 March 2005 01:43 pm, Jeff Dike wrote: > ro...@la... said: > > Well, just in case your job was too easy, here's one more. Using the > > "quiet" option shows a couple of lines being printed out by printf > > that should be printed out by printk (so they'll _shut_up_ when you > > ask it to). > > Those are printfs for a reason. Early boot mesages (before the kernel is > actually running) won't be seen if they are printk-d and the thing crashes > before the console is initialized. The messages will be stuck in the > printk buffer, and you will be none the wiser. > > So, they can be made quiet if you really want, but that's not the way. I suspected there was a reason, nice to know what it is. It would be nice if they could be made quiet, because I'm in the process of doing a gross hack to run an independent process wrapped in UML. Basically, my nefarious scheme is to add the squashfs patch to UML, append a squashfs image to the end of the UML executable, and have a cpio ramfs init script search through /proc/self/exe for the 32 bytes that were at the start of the squashfs (which includes a 4 byte magic signature thingy) to determine offset to pass to "losetup -o $OFFSET /dev/loop0 /proc/self/exe", and then mount /dev/loop0 / and run the executable I want out of that filesystem. And there's a cheap and dirty way to get a self contained program running under UML. (I hope to actually have an example working this evening using 2.6.11.) The down side is that UML (even with the quiet option) just won't shut up about its init stuff. Hence me looking into cleaning that up... > Jeff Rob |