Producing nice text output while suspending without messing thelogs.
From: Nigel Cunningham
Date: Sun Oct 10 2004 - 20:26:34 EST
Hi all.
First, apologies to those CC'd if they don't think this is relevant to
them - I'm guessing who to CC).
Suspend2 can produce potentially produce quite a lot of output, not all
of which you want to see in your logs. (Compare Pavel's ^Hs from the
spinning bar). To get around this, I used to use vt_console_print to
output the stuff that shouldn't be logged. Some people, however (don't
remember who now), said I should be opening /dev/console and using that
instead. I made the switch and it didn't caused any problems until the
other day, when one user had /dev/console open while trying to suspend.
When suspend tried to open /dev/console as well, it hung, of course.
This makes me want to raise the issue again.
I guess the problem is really that suspend is a bit of a combination of
kernel and user space: all of the main work that it does can't be done
in userspace, but we (well some people at least!) want Linux to look
good while it does it's suspend to disk and resuming. (And we don't want
the logs filled with lots of junk in the process). I realise that some
people don't care what their screen and logs look like, so long as the
suspend & resume work. That's fine, but I want to cater for those who do
care as well, and think that since this will be a very visible part of
the kernel, it ought to look good (think ignorant desktop user). To that
end, I'm going to ignore anyone who simply wants to argue that this
stuff doesn't belong in the kernel.
Having said all of that, I want to raise the issue again: Is it really
necessary for suspend to use /dev/console to display output that
shouldn't be logged? Could the code use the vt_console_print, gotoxy and
blank/unblank_console functions - or some abstraction of them to do it's
drawing?
Regards,
Nigel
--
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901
Many today claim to be tolerant. True tolerance, however, can cope with others
being intolerant.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/