Performs a set of operations on one or two resource sets.
#include <sys/rset.h>
int krs_op (command, rset1, rset2, flags, id)
unsigned int command;
rsethandle_t rset1, rset2;
unsigned int flags;
unsigned int id;
The krs_op subroutine performs the operation specified by the command parameter on resource set rset1, or both resource sets rset1 and rset2.
Item | Description |
---|---|
command | Specifies the operation to apply to the resource
sets identified by rset1 and rset2. One of the following
values, defined in rset.h, can be used:
|
rset1 | Specifies the resource set handle for the first of the resource sets involved in the command operation. |
rset2 | Specifies the resource set handle for the second of the resource sets involved in the command operation. This resource set is also used, on return, to store the result of the operation, and its previous content is lost. The rset2 parameter is ignored on the RS_ISEMPTY, RS_TESTRESOURCE, RS_ADDRESOURCE, and RS_DELRESOURCE commands. |
flags | When combined with the RS_COPY command,
the flags parameter specifies the type of the resources that
will be copied from rset1 to rset2. This parameter is
constructed by logically ORing one or more of the following values,
defined in rset.h:
If none of the above are specified for flags, R_ALL_RESOURCES is assumed. |
id | On the RS_TESTRESOURCE, RS_ADDRESOURCE, and RS_DELRESOURCE commands, the id parameter specifies the index of the resource to be tested, added, or deleted. This parameter is ignored on the other commands. |
Item | Description |
---|---|
0 | Successful completion. The tested condition is not met for the RS_ISEMPTY, RS_ISEQUAL, RS_ISCONTAINED, and RS_TESTRESOURCE commands. |
1 | Successful completion. The tested condition is met for the RS_ISEMPTY, RS_ISEQUAL, RS_ISCONTAINED, and RS_TESTRESOURCE commands. |
-1 | Unsuccessful completion. One or more of the
following are true:
|