Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #269259

Re: Spurious messages at the console

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: Spurious messages at the console
Date 2024-05-12 08:00 +0200
Message-ID <IDapz-cLKZ-1@gated-at.bofh.it> (permalink)
References <ICG89-cteX-3@gated-at.bofh.it> <ICNW1-cy0F-1@gated-at.bofh.it> <ID5Jf-cIHY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Spurious messages at the console Paul M Foster <paulf@quillandmouse.com> - 2024-05-10 23:40 +0200
  Re: Spurious messages at the console <tomas@tuxteam.de> - 2024-05-11 08:00 +0200
    Re: Spurious messages at the console Paul M Foster <paulf@quillandmouse.com> - 2024-05-12 03:00 +0200
      Re: Spurious messages at the console <tomas@tuxteam.de> - 2024-05-12 08:00 +0200
  Re: Spurious messages at the console Michel Verdier <mv524@free.fr> - 2024-05-11 08:30 +0200

csiph-web