cmpt_getbynum.3 (2010 09)

c
cmpt_getbynum(3) cmpt_getbynum(3)
perror("cmpt_setent failed");
exit(1);
}
/* get entries until a NULL returned */
while ( pair = cmpt_getent(&state) )
{
printf("\nCompartment Nnumber : %d Name : %s\n",
pair->cmpt_num, pair->cmpt_name);
}
if (errno == 0)
{
printf("\nAll Entries printed\n");
} else {
printf("\nError getting compartment entry\n");
}
cmpt_endent();
}
DEPENDENCIES
These functions are a part of the
libsec library, which can be linked with your executable with the
-lsec option.
SEE ALSO
compartments(4), compartments(5).
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3