tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Need example of swapctl(2) SC_LIST
@ 1995-03-22 18:36 Jonathan Rozes
  0 siblings, 0 replies; only message in thread
From: Jonathan Rozes @ 1995-03-22 18:36 UTC (permalink / raw)
  To: tru64-unix-managers

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>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-03-22 18:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-22 18:36 Need example of swapctl(2) SC_LIST Jonathan Rozes

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