提交 0e3e00a1 编写于 作者: J John Ferlan

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.
上级 47b70b87
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
# define __VIR_LOCK_DRIVER_LOCKD_H__ # define __VIR_LOCK_DRIVER_LOCKD_H__
enum virLockSpaceProtocolAcquireResourceFlags { enum virLockSpaceProtocolAcquireResourceFlags {
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1, VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = (1 << 0),
VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2, VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = (1 << 1),
}; };
#endif /* __VIR_LOCK_DRIVER_LOCKD_H__ */ #endif /* __VIR_LOCK_DRIVER_LOCKD_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册