mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
locking: Add const char * parameter to avoid ugly typecasts
This commit is contained in:
parent
76f5bcabe6
commit
e55ff49cbc
@ -66,6 +66,7 @@ typedef enum {
|
||||
|
||||
enum {
|
||||
VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
|
||||
VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
|
||||
VIR_LOCK_MANAGER_PARAM_TYPE_INT,
|
||||
VIR_LOCK_MANAGER_PARAM_TYPE_LONG,
|
||||
VIR_LOCK_MANAGER_PARAM_TYPE_UINT,
|
||||
@ -84,6 +85,7 @@ struct _virLockManagerParam {
|
||||
unsigned long long ul;
|
||||
double d;
|
||||
char *str;
|
||||
const char *cstr;
|
||||
unsigned char uuid[16];
|
||||
} value;
|
||||
};
|
||||
|
@ -99,6 +99,9 @@ static void virLockManagerLogParams(size_t nparams,
|
||||
case VIR_LOCK_MANAGER_PARAM_TYPE_STRING:
|
||||
VIR_DEBUG(" key=%s type=string value=%s", params[i].key, params[i].value.str);
|
||||
break;
|
||||
case VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING:
|
||||
VIR_DEBUG(" key=%s type=cstring value=%s", params[i].key, params[i].value.cstr);
|
||||
break;
|
||||
case VIR_LOCK_MANAGER_PARAM_TYPE_UUID:
|
||||
virUUIDFormat(params[i].value.uuid, uuidstr);
|
||||
VIR_DEBUG(" key=%s type=uuid value=%s", params[i].key, uuidstr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user