qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] quorum: Only compile when supported
@ 2016-06-28  1:47 Fam Zheng
  2016-06-28  8:17 ` Alberto Garcia
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Fam Zheng @ 2016-06-28  1:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Max Reitz, Alberto Garcia, qemu-block

This was the only exceptional module init function that does something
else than a simple list of bdrv_register() calls, in all the block
drivers.

The qcrypto_hash_supports is actually a static check, determined at
compile time.  Follow the block-job-$(CONFIG_FOO) convention for
consistency.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 block/Makefile.objs | 2 +-
 block/quorum.c      | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/block/Makefile.objs b/block/Makefile.objs
index 44a5416..c87d605 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -3,7 +3,7 @@ block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-c
 block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
 block-obj-y += qed-check.o
 block-obj-$(CONFIG_VHDX) += vhdx.o vhdx-endian.o vhdx-log.o
-block-obj-y += quorum.o
+block-obj-$(CONFIG_GNUTLS_HASH) += quorum.o
 block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
 block-obj-y += block-backend.o snapshot.o qapi.o
 block-obj-$(CONFIG_WIN32) += raw-win32.o win32-aio.o
diff --git a/block/quorum.c b/block/quorum.c
index 331b726..18fbed8 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -1113,10 +1113,6 @@ static BlockDriver bdrv_quorum = {
 
 static void bdrv_quorum_init(void)
 {
-    if (!qcrypto_hash_supports(QCRYPTO_HASH_ALG_SHA256)) {
-        /* SHA256 hash support is required for quorum device */
-        return;
-    }
     bdrv_register(&bdrv_quorum);
 }
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-07-06  0:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-28  1:47 [Qemu-devel] [PATCH] quorum: Only compile when supported Fam Zheng
2016-06-28  8:17 ` Alberto Garcia
2016-07-02 12:36 ` Max Reitz
2016-07-04 11:43   ` Alberto Garcia
2016-07-05  7:03   ` Fam Zheng
2016-07-05  7:58 ` Sascha Silbe
2016-07-05  8:11   ` Fam Zheng
2016-07-05  8:20   ` Alberto Garcia
2016-07-05  9:15     ` Sascha Silbe
2016-07-05  8:45 ` Daniel P. Berrange
2016-07-05  8:57   ` Fam Zheng
2016-07-05  9:35     ` Daniel P. Berrange
2016-07-06  0:56       ` Fam Zheng
2016-07-05  9:18   ` Alberto Garcia
2016-07-05  9:26     ` Daniel P. Berrange
2016-07-05 10:05       ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).