wpar_print_err Subroutine
Purpose
Writes error messages of a specific WPAR into a file.
Library
libwparlog.a
Syntax
Description
The wpar_print_err interface writes all the error messages of a WPAR logged using the wparerr, wpar_err, and kwpar_err into the given file. The file should be opened in write or append mode. The interface cannot be called from inside WPAR.
Parameters
| Item | Description |
|---|---|
| kcid | CID of the WPAR. The CID can be obtained from the WPAR name using the getcorralid system call. |
| file | File that stores the error messages. |
Return Values
| Item | Description |
|---|---|
| 0 | Successful completion |
| -1 | Failure |
Error codes
| Item | Description |
|---|---|
| ENOMEM | Not enough memory |
| EPERM | No permission to log message into the specified WPAR |
| EINVAL | Invalid parameter |
Example
/*To write messages of WPAR with cid 4 into stderr.
*/
wpar_print_err(4, stderr);