Controls and queries the PM parameters.
#include <pm.h>
int pm_control_parameter (ctrl, arg); int ctrl; caddr_t arg;
The pm_control_parameter system call controls and queries the PM parameters.
When the ctrl parameter is PM_CTRL_QUERY_DEVICE_NUMBER, arg is a pointer to an integer where the number of PM aware device drivers is returned.
When the ctrl parameter is PM_CTRL_QUERY_DEVICE_LIST, arg is a pointer to an array of device logical names.
When the ctrl parameter is PM_CTRL_QUERY_DEVICE_INFO, or PM_CTRL_SET_DEVICE_INFO, arg is a pointer to the following pm_device_info_t structure:
struct _pm_device_info { char name[16]; /*device logical name*/ int mode; /*current device PM mode*/ int attribute; /*PM attribute*/ int idle_time; /*device idle time*/ int standby_time; /*device standby time*/ int idle_time1; /*idle time 1 for DPMS */ int idle_time2; /*idle time 2 for DPMS */ char reserve[24]; /*reserved*/ } pm_device_info_t;
When the ctrl parameter is PM_CTRL_SET_HIBERNATION_VOLUME, arg is a pointer to the following pm_hibernation_t structure:
typedef struct _pm_hibernation { dev_t devno; /*major/minor device number*/ long ppnum; /*physical partition number*/ long ppsize; /*physical partition size*/ long snum; /*valid sector list item number*/ pm_sector_t *slist; /*sector list*/ pm_hibernation_t;
typedef struct _pm_sector { long start; /*RBA(Relative Block Address) in sectors*/ long size; /*sector size in sectors(512 bytes)*/ } pm_sector_t;
Note: The functions in AIX 4.1.1 still remain as they were. But they are left only for backward compatibility and may be deleted in the future. New programs should not use them.
PM_SUCCESS | Indicates successful completion. |
PM_ERROR | Indicates an error condition. The variable errno is set to identify the error. |
EINVAL | Invalid argument. |
The pm_control_parameter system call is part of the Base Operation System (BOS) Runtime.
The pm_battery_control (pm_battery_control Subroutine) subroutine.
The pm_control_state (pm_control_state System Call) system call, pm_system_event_query (pm_system_event_query System Call) system call.