From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075318306622.tru64-unix-managers.marc@archive.invalid> From: Jonathan Rozes Date: Wed, 22 Mar 1995 18:36:50 +0000 To: tru64-unix-managers Subject: Need example of swapctl(2) SC_LIST X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075318306622 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 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.