mirror of https://gitee.com/openkylin/libvirt.git
locking: Use bit shift for flag values not constant values.
So far it hasn't bitten us, but if the next value wasn't 4, then the logic used to check flag bits would have issues.
This commit is contained in:
parent
47b70b8793
commit
0e3e00a183
|
@ -23,8 +23,8 @@
|
|||
# define __VIR_LOCK_DRIVER_LOCKD_H__
|
||||
|
||||
enum virLockSpaceProtocolAcquireResourceFlags {
|
||||
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1,
|
||||
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2,
|
||||
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = (1 << 0),
|
||||
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = (1 << 1),
|
||||
};
|
||||
|
||||
#endif /* __VIR_LOCK_DRIVER_LOCKD_H__ */
|
||||
|
|
Loading…
Reference in New Issue