From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgk08-0001Kf-TY for qemu-devel@nongnu.org; Sun, 04 Sep 2016 22:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgk03-0005lO-KJ for qemu-devel@nongnu.org; Sun, 04 Sep 2016 22:51:11 -0400 From: Fam Zheng Date: Mon, 5 Sep 2016 10:50:43 +0800 Message-Id: <1473043845-13197-2-git-send-email-famz@redhat.com> In-Reply-To: <1473043845-13197-1-git-send-email-famz@redhat.com> References: <1473043845-13197-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v4 1/3] scripts: Allow block module to not define BlockDriver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, pbonzini@redhat.com, Stefan Hajnoczi , Kevin Wolf , Max Reitz Signed-off-by: Fam Zheng --- scripts/modules/module_block.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/modules/module_block.py b/scripts/modules/module_block.py index db4fb54..3f73007 100644 --- a/scripts/modules/module_block.py +++ b/scripts/modules/module_block.py @@ -37,7 +37,6 @@ def add_module(fheader, library, format_name, protocol_name): def process_file(fheader, filename): # This parser assumes the coding style rules are being followed with open(filename, "r") as cfile: - found_something = False found_start = False library, _ = os.path.splitext(os.path.basename(filename)) for line in cfile: @@ -51,16 +50,10 @@ def process_file(fheader, filename): add_module(fheader, library, format_name, protocol_name) found_start = False elif line.find("static BlockDriver") != -1: - found_something = True found_start = True format_name = "" protocol_name = "" - if not found_something: - print("No BlockDriver struct found in " + filename + ". \ - Is this really a module?", file=sys.stderr) - sys.exit(1) - def print_top(fheader): fheader.write('''/* AUTOMATICALLY GENERATED, DO NOT MODIFY */ /* -- 2.7.4