From marc@pc02.labcontrol.com  Mon Jul 27 07:59:11 1998
Received: from pc02.labcontrol.com (pc02.labcontrol.com [194.163.70.133])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA00157
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 27 Jul 1998 07:59:08 -0700 (PDT)
          (envelope-from marc@pc02.labcontrol.com)
Received: (from root@localhost)
	by pc02.labcontrol.com (8.8.8/8.8.7) id QAA26840;
	Mon, 27 Jul 1998 16:57:38 +0200 (CEST)
	(envelope-from marc)
Message-Id: <199807271457.QAA26840@pc02.labcontrol.com>
Date: Mon, 27 Jul 1998 16:57:38 +0200 (CEST)
From: Marc van Woerkom <marc@pc02.labcontrol.com>
Reply-To: lmarc@mail.labcontrol.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: userunfriendly error message from dmesg
X-Send-Pr-Version: 3.2

>Number:         7414
>Category:       bin
>Synopsis:       userunfriendly error message from dmesg
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 27 08:00:01 PDT 1998
>Closed-Date:    Mon Jul 27 11:49:54 PDT 1998
>Last-Modified:  Mon Jul 27 11:54:56 PDT 1998
>Originator:     & van Woerkom
>Release:        FreeBSD 2.2.7-RELEASE i386
>Organization:
>Environment:

	

>Description:

	when using dmesg to check what happened at boot time,
        I got "dmesg: incorrect magic number".
        I mistook this first, as having corrupted my dmesg by accident,
        but people from de-bsd-questions told me, that my kernel was
        older than my dmsg binary, simply.

>How-To-Repeat:

	

>Fix:
	I suggest this patch to clarify things (or put some hint on the man page)

       
*** dmesg.c	Mon Jul 27 15:29:07 1998
--- dmesg.c.original	Thu Jun 25 02:45:59 1998
***************
*** 113,119 ****
  	if (KREAD(nl[X_MSGBUF].n_value, bufp) || KREAD((long)bufp, cur))
  		errx(1, "kvm_read: %s", kvm_geterr(kd));
  	if (cur.msg_magic != MSG_MAGIC)
! 		errx(1, "magic number of kernel message buffer is incorrect");
  	bp = malloc(cur.msg_size);
  	if (!bp)
  		errx(1, "malloc failed");
--- 113,119 ----
  	if (KREAD(nl[X_MSGBUF].n_value, bufp) || KREAD((long)bufp, cur))
  		errx(1, "kvm_read: %s", kvm_geterr(kd));
  	if (cur.msg_magic != MSG_MAGIC)
! 		errx(1, "magic number incorrect");
  	bp = malloc(cur.msg_size);
  	if (!bp)
  		errx(1, "malloc failed");

        Regards,
        Marc


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Mon Jul 27 11:49:54 PDT 1998 
State-Changed-Why:  
Changed in r.1.10 src/sbin/dmesg/dmesg.c 

I used a slightly different message from the one you suggested hoing 
to make the actual problem more suggested, but I'm not sure I actually 
did any better... 
>Unformatted:
