From owner-freebsd-current Wed Sep 9 06:46:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA14019 for freebsd-current-outgoing; Wed, 9 Sep 1998 06:46:13 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from critter.freebsd.dk (bademster.cybercity.dk [195.8.135.85]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA13985 for ; Wed, 9 Sep 1998 06:46:10 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.1/8.8.5) with ESMTP id PAA01494; Wed, 9 Sep 1998 15:42:02 +0200 (CEST) To: Andrzej Bialecki cc: freebsd-current@FreeBSD.ORG Subject: Re: Adding sysctl, part II In-reply-to: Your message of "Wed, 09 Sep 1998 14:54:22 +0200." Date: Wed, 09 Sep 1998 15:42:02 +0200 Message-ID: <1492.905348522@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , And rzej Bialecki writes: >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... But you sysctl_proc does run in kernel, clone the code in from the DDB_SHOW procedure... -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "ttyv0" -- What UNIX calls a $20K state-of-the-art, 3D, hi-res color terminal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message