From patchwork Fri Oct 7 13:42:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 679265 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sr9t82GdKz9sCZ for ; Sat, 8 Oct 2016 00:51:44 +1100 (AEDT) Received: from localhost ([::1]:35827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsVYk-0005p4-G6 for incoming@patchwork.ozlabs.org; Fri, 07 Oct 2016 09:51:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsVQn-0007aG-0Q for qemu-devel@nongnu.org; Fri, 07 Oct 2016 09:43:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsVQl-0004RM-3d for qemu-devel@nongnu.org; Fri, 07 Oct 2016 09:43:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsVQf-0004Kh-9R; Fri, 07 Oct 2016 09:43:13 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA5CF7EA8C; Fri, 7 Oct 2016 13:43:12 +0000 (UTC) Received: from noname.redhat.com (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u97Dh1IN021464; Fri, 7 Oct 2016 09:43:11 -0400 From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 7 Oct 2016 15:42:57 +0200 Message-Id: <1475847779-7336-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1475847779-7336-1-git-send-email-kwolf@redhat.com> References: <1475847779-7336-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 07 Oct 2016 13:43:12 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 08/10] scripts: Allow block module to not define BlockDriver X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1473043845-13197-2-git-send-email-famz@redhat.com Reviewed-by: Stefan Hajnoczi Signed-off-by: Max Reitz --- 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 */ /*