guest_power_state_current()

Return the current power state of the guest system

Synopsis:

#include <qvm/guest.h>
int guest_power_state_current(guest_power_state_cmd_t cmd,
                              unsigned base,
                              unsigned nresult,
                              uint64_t *result)

Arguments:

cmd
The guest power state command. This variable must be one of the following flag/bit combinations:
base
The starting index of an array with the resulting uint64_t values (currently this must be set to 0).
nresult
The number of entries provided in the result array.
result
A pointer to an array for storing the power state information.

Description:

This function retrieves information on the guest power state. To use this function you must have called guest_power_state_notify_create() to create a structure to hold the power state information, and guest_power_state_notify_register() to register it.

Returns:

If successful, the number of result elements filled in; otherwise, a negative errno value.

Page updated: