Hi John,
[email protected] wrote on Thu, Aug 06, 2020 at 04:28:53PM -0700:
> I was considering making a kernel patch that reported it was
> an exFATfilesystem
Sounds like a layering violation. The table of file system IDs
is in userland - /usr/src/sbin/fdisk/part.c - rather than in the
kernel, so the kernel is hardly a natural place for figuring out
what kind of filesystem is supposed to be on the partition.
> when the mount failed, which you would see if you were onttyC0, or could
> call up with dmesg, as with the kernel messages thathappen when you first
> plug a drive in.
> Is there a concise "philosophy" of when the kernel should print amessage
> post-boot? Just when devices are dynamically configured?
I would put it as follows: kernel printf(9) is for
1. boot messages (before init(8) starts)
(hotplugging hardware is similar even though it happens later)
2. catastrophic kernel failures (like panics)
3. catastrophic hardware failures (like a dying disk)
4. debugging and data collection during active development
System-level errors (in particular from daemons) are usually reported
via syslog(3) instead. Simply user errors like this one are reported
by the application program on stderr.
Yours,
Ingo