Re: ARMS WAVING!!! Proposal to fix /proc dainbrammage.

Mark H. Wood (mwood@IUPUI.Edu)
Mon, 2 Nov 1998 13:33:07 -0500 (EST)


On Mon, 2 Nov 1998, Hans Eric Sandström wrote:
> It seems to me that you are reinventing the /dev/kstat interface that is
> present in Solaris. Just do a man kstat on a solaris box...

Well, if this is addressed to me, what I am reinventing (for those who
haven't guessed) is the VMS SYS$GETSYI() and SYS$GETJPI() calls. You hand
the system a list of buffers, with their sizes and the "names" of the
quantities you'd like to have them filled with. When control returns,
zero or more of the buffers are filled and the returned condition code
tells you if there was a problem and, if so, what it was. The list is
terminated with a null item-code kind of like an ASCIZ string. Like so:

struct SYISTUFF
{
short item;
short size;
void *buffer;
long *length;
};
...
char foobuf[255];
unsigned long bazbuf;
struct SYISTUFF getstuff = {
{ SYI$_FOO, sizeof foobuf, foobuf, &foolen },
{ SYI$_BAZ, sizeof bazbuf, bazbuf, &bazlen },
{ 0,0,0,0 }
};
status = SYS$GETSYI(&getstuff);

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
Some things are not improved when made "graphical".  Imagine how crude
Kilmer's "Trees" would be if reduced to comic-book form.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/