tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Jonathan Rozes <jrozes () tufts ! edu>
To: tru64-unix-managers
Subject: Need example of swapctl(2) SC_LIST
Date: Wed, 22 Mar 1995 18:36:50 +0000	[thread overview]
Message-ID: <96075318306622.tru64-unix-managers.marc@archive.invalid> (raw)

Hi--

[This is with OSF/1 3.0]

I'd like to be able to get a list of the currently active swap devices, 
which I should be able to do with swapctl(2)'s SC_LIST command. However, 
I'm always getting ENOMEM back, which according to the man page, means 
there are not enough struct swapent structures. I noticed that the header 
file <sys/swap.h> defines the struct swaptable as follows:

typedef struct swaptable {
	int	swt_n;			/* number of swapents following */
	struct	swapent swt_ent[1];	/* array of swt_n swapents */
} swaptbl_t;

This seems wrong to me. Am I reading this wrong, or does this mean that 
SC_LIST will fail if you have more than one swap device active? If so, 
I'm not sure how to fix it. Any help and/or example code would be muchly 
appreciated...

Thanks,
jonathan

+++ Jonathan Rozes, jrozes@tufts.edu, jrozes@cs.tufts.edu
+++ http://www.tufts.edu/~jrozes/
+++ Mind Over Liver: The liver probably contains 100 million cells, but
    1,000 livers do not add up to a rich inner life. <GDF:SA 09/92>

                 reply	other threads:[~1995-03-22 18:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox