From nobody Wed Jan 15 11:15:51 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1685120071; cv=none; d=zohomail.com; s=zohoarc; b=aAW80apVtHjQepaznqL5xyThJjyH0GWmI4S0PBDStUz7brz+wOoq0pV4rW4bXfMwhpPC1mN1oueWebYeDc63XtIUOHGT8QCl60HjBl3/18UIk4jENcUK5AkLLMhKl//Mn3kC1xFspYfmkmDaPGR0WJqFewOJQNxxEGE9CVYeGeI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685120071; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dadaeGJAraoXdJKWnEyRjK7/UkylBjw/4fB2pIOhIDM=; b=n+Fb9clbUn2KOsKCKkVp8/1QkWkCRi5iK/O3XqZjURR/ZK1sFp4GaJxQQA1RUghR5KGBszN3Qh/wD7U5t+4EDK9tkat9zzB5CaQ0I+CyPB6pE5wVonBzTV5/xk/nrMjQdzQcaQKwqcuN1hYpUnj0WeRCjKI6ehCt2/2RIiUkd+s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1685120071898847.7448015142481; Fri, 26 May 2023 09:54:31 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-38-h1usxL8zNDK794Ir3d-m_g-1; Fri, 26 May 2023 12:54:26 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5DF633C17C62; Fri, 26 May 2023 16:54:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BF2D40CFD45; Fri, 26 May 2023 16:54:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2811919465A4; Fri, 26 May 2023 16:54:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 10FBE19465A8 for ; Fri, 26 May 2023 16:54:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id F293A9D7A; Fri, 26 May 2023 16:54:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB0239E60 for ; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F0E71C08DC1 for ; Fri, 26 May 2023 16:54:09 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-340-nRc5NZfWOEi7X999n5bNXA-1; Fri, 26 May 2023 12:54:05 -0400 Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-30adb83aa69so487490f8f.2 for ; Fri, 26 May 2023 09:54:05 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z11-20020adff1cb000000b003093a412310sm5657661wro.92.2023.05.26.09.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 09:54:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4F2A91FFBC; Fri, 26 May 2023 17:54:03 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685120070; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dadaeGJAraoXdJKWnEyRjK7/UkylBjw/4fB2pIOhIDM=; b=BrLEfrLJwoQwYoJdHQef9AcmGMkctGQZ/VOy5RZDLuRfrtDx/97NBYZiNsHrmM4UMUV9ao Q7LsUZbk6BYlQ3uGOAtfYKxKJbu6xTtY6kExg4hAjXqRueveOLuIGfDkzy5MjTlsDpuXSO csbzYc/XPb96xs0GUhA4n3WJ4lqf1kU= X-MC-Unique: h1usxL8zNDK794Ir3d-m_g-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: nRc5NZfWOEi7X999n5bNXA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685120044; x=1687712044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dadaeGJAraoXdJKWnEyRjK7/UkylBjw/4fB2pIOhIDM=; b=R+Hk2GHoWhOtQlcGA7c+0wlOYrHt+A4cuvfTPDhPVBd7E4kWCwnADpDBpgY+6SpEYE fRIYM//c7Bwzibi1fO3QgbIuJrNRuNiptuh1boijt3fBbdeQqhDkpPzZnxtL/AvsnmEK wW2VZ0vY0nrir8NX8Iul/SfiFfNgFewDVOz+5dmTtmAMRDpPaPh3oioeadjKyXsOcZbm pVFSu8Cre3Nm1zounW/hXqR0MRBHnoeTi6IJ6Vk4deuWWGVLIyvm2RZWgKHPh98bEziP X3UfPOlgWLkB2myVopYyCYh//Kg8vWUFLi1ejYtTHqCcj1E4mkaBeBOs1BCvhGFU2N1Y huQA== X-Gm-Message-State: AC+VfDzHOzsw2xSLHGffAGocRkTW8DclcJgbGwLSJT3Pm1NwJINghcgj GGK6ZAbEQj1Ehv9G5881NawESA== X-Google-Smtp-Source: ACHHUZ6KBWKapKxFU8P0MpmVEBimzJdG8lkT0qQtKV+ucDkIYu3eCmSpXiOwYBl2WLlHzmza4OYbrg== X-Received: by 2002:a5d:4cc2:0:b0:306:36e7:db27 with SMTP id c2-20020a5d4cc2000000b0030636e7db27mr1909674wrt.16.1685120044687; Fri, 26 May 2023 09:54:04 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v6 04/11] scripts/qapi: document the tool that generated the file Date: Fri, 26 May 2023 17:53:54 +0100 Message-Id: <20230526165401.574474-5-alex.bennee@linaro.org> In-Reply-To: <20230526165401.574474-1-alex.bennee@linaro.org> References: <20230526165401.574474-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , libvir-list@redhat.com, Kyle Evans , Riku Voipio , Richard Henderson , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Michael Roth , Paolo Bonzini , Christian Schoenebeck , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1685120072999100001 This makes it a little easier for developers to find where things where being generated. Reviewed-by: Richard Henderson Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Signed-off-by: Alex Benn=C3=A9e Message-Id: <20230524133952.3971948-5-alex.bennee@linaro.org> --- v6 - use Markus' suggestion for prettier wrapping lines - drop un-needed str() --- scripts/qapi/gen.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index 8f8f784f4a..70bc576a10 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -13,6 +13,7 @@ =20 from contextlib import contextmanager import os +import sys import re from typing import ( Dict, @@ -162,7 +163,7 @@ def __init__(self, fname: str, blurb: str, pydoc: str): =20 def _top(self) -> str: return mcgen(''' -/* AUTOMATICALLY GENERATED, DO NOT MODIFY */ +/* AUTOMATICALLY GENERATED by %(tool)s DO NOT MODIFY */ =20 /* %(blurb)s @@ -174,6 +175,7 @@ def _top(self) -> str: */ =20 ''', + tool=3Dos.path.basename(sys.argv[0]), blurb=3Dself._blurb, copyright=3Dself._copyright) =20 def _bottom(self) -> str: @@ -195,7 +197,10 @@ def _bottom(self) -> str: =20 class QAPIGenTrace(QAPIGen): def _top(self) -> str: - return super()._top() + '# AUTOMATICALLY GENERATED, DO NOT MODIFY\= n\n' + return (super()._top() + + '# AUTOMATICALLY GENERATED by ' + + os.path.basename(sys.argv[0]) + + ', DO NOT MODIFY\n\n') =20 =20 @contextmanager --=20 2.39.2