On Sat, May 11, 2024 at 08:57:24PM -0400, Paul M Foster wrote: [...]
> Excellent advice. Thanks. > > Here's an oddity. The following commands are equivalent, according to the > dmesg(1) man page: > > dmesg -n 1 and dmesg -n emerg > > But according to every document I've viewed, "emerg" is code for 0, not 1. > If anyone can explain, I'd be interested. This is funny, yes. It seems intentional, though: https://sources.debian.org/src/util-linux/2.38.1-5/sys-utils/dmesg.c/#L1505 calls parse_level with a second arg of 0, which causes parse_level() https://sources.debian.org/src/util-linux/2.38.1-5/sys-utils/dmesg.c/#L348 to add an offset of 1. No idea what the thought behind this is. Perhaps backward-compat to some forgotten lore? Cheers -- t
signature.asc
Description: PGP signature