-
Notifications
You must be signed in to change notification settings - Fork 579
Description
The following note about term emulator vs. console seems to suggest that in a virtual console we always see the output of printk
(or pr_info
, or others) in the terminal. It doesn't seem to be the case. I always have to check sudo dmesg
to find whatever I print from within the module.
Furthermore the note mention journalctl
, but that shows the action of insmod
and rmmod
that I perform, not the output of the printing functions; again, that is shown in dmesg
, which is unfortunately used but not presented first, just like journalctl
.
I'm still at the beginning (I've read up to chapter 5.6 "Device Drivers"), but I think this is exactly what gives value to my comment.
Should I have better understanding in the future, I'll try to improve this wording myself, if somebody will not have done it yet.
Lines 167 to 180 in 7b38f37
\item Using X Window System. | |
\label{sec:using_x} | |
It is highly recommended that you extract, compile and load all the examples this guide discusses from a console. | |
You should not be working on this stuff in X Window System. | |
Modules can not print to the screen like \cpp|printf()| can, but they can log information and warnings, which ends up being printed on your screen, but only on a console. | |
If you \sh|insmod| a module from an xterm, the information and warnings will be logged, but only to your systemd journal. | |
You will not see it unless you look through your \sh|journalctl| . | |
See \ref{sec:helloworld} for details. | |
To have immediate access to this information, do all your work from the console. | |
\end{enumerate} | |
\section{Headers} | |
\label{sec:headers} |