qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH v15 02/21] block: Define BLK_PERM_MAX


From: Fam Zheng
Subject: [Qemu-block] [PATCH v15 02/21] block: Define BLK_PERM_MAX
Date: Wed, 26 Apr 2017 11:33:54 +0800

This is the order of the largest possible permission.

Signed-off-by: Fam Zheng <address@hidden>
---
 include/block/block.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/block/block.h b/include/block/block.h
index eb0565d..a798f10 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -224,6 +224,8 @@ enum {
     BLK_PERM_ALL                = 0x1f,
 };
 
+#define BLK_PERM_MAX (64 - clz64((uint64_t)BLK_PERM_ALL))
+
 char *bdrv_perm_names(uint64_t perm);
 
 /* disk I/O throttling */
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]