Hi,
The libvirt documentation under
http://libvirt.org/html/libvirt-libvirt.html#virSchedParameter
fails to list the "value" member, even though that is kind of essential for
using the struct.
This is what the documentation says:
struct virSchedParameter{
charfield[VIR_DOMAIN_SCHED_FIELD_LENGTH] field : parameter name
int type : parameter type
}
This is how it looks in the actual header file:
typedef struct _virSchedParameter virSchedParameter;
struct _virSchedParameter {
char field[VIR_DOMAIN_SCHED_FIELD_LENGTH]; /* parameter name */
int type; /* parameter type */
union {
int i; /* data for integer case */
unsigned int ui; /* data for unsigned integer case */
long long int l; /* data for long long integer case */
unsigned long long int ul; /* data for unsigned long long integer
case */
double d; /* data for double case */
char b; /* data for char case */
} value; /* parameter value */
};
This one had me scratching my head for a while, because the way it is
documented, it's absolutely not clear how the struct is supposed to be used.
Only after studying the virsh source code for a while did I notice that this
struct apparently has more members than the documentation lets on...
Guido