Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Sep 1998 14:54:22 +0200 (CEST)
From:      Andrzej Bialecki <abial@nask.pl>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Adding sysctl, part II 
Message-ID:  <Pine.BSF.4.02A.9809091411140.21222-100000@korin.warman.org.pl>
In-Reply-To: <1006.905339048@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 9 Sep 1998, Poul-Henning Kamp wrote:

> 
> >Well, I kind of figured out I probably need to use SYSCTL_PROC, and
> >applied the following patch to machdep.c:
> 
> Look at the 
> 	DDB_SHOW_COMMAND(msgbuf, db_show_msgbuf)
> 	{
> 
> at the bottom of kern/subr_prf.c

Ah! I see it now - I should be glad it didn't explode in my face...

It's still unclear to me, however, what should I do to retrieve not only
the struct msgbuf (which the msgbufp points to), but the buffer itself as
well. If I understand this correctly, once I retrieved the struct msgbuf
contents, the msgbufp->msg_ptr is useless because it points to the data in
kernel space, so I need to make another call to retrieve the buffer
contents, right? The code in subr_prf.c can do this because it works in
kernel space all the time, but I can't...

Andrzej Bialecki

--------------------   ++-------++  -------------------------------------
 <abial@nask.pl>       ||PicoBSD||   FreeBSD in your pocket? Go and see:
 Research & Academic   |+-------+|       "Small & Embedded FreeBSD"
 Network in Poland     | |TT~~~| |    http://www.freebsd.org/~picobsd/
--------------------   ~-+==---+-+  -------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9809091411140.21222-100000>