From patchwork Tue May 23 12:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 684910 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1697721wrt; Tue, 23 May 2023 05:50:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ED5a/Mg8a8ktEgf8wSfRYBfArntn31xRgELDGvxmchA9QEDiI2wcxenJWoX8sbwWslTi6 X-Received: by 2002:a05:6214:509b:b0:623:9ac1:a4c4 with SMTP id kk27-20020a056214509b00b006239ac1a4c4mr22517757qvb.42.1684846230077; Tue, 23 May 2023 05:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684846230; cv=none; d=google.com; s=arc-20160816; b=05eKM3uMtds34SY5gR+Xv7q1kL7IYpqUAIi5d3sZH80earWtFNzlAvN/ZUiGP9dRD6 ELd6PBySZED1lo2/00tlEDXsBhPE9RUBBKSDXw9OdPPQ6Os6SG+M6sKuSyk+Nx1tUMGD o5MEhNHhpk+Q7rEvF44ldFM3KxJ/UwzE52lyegM+xGu/WFSWi2ofSRqahcaJHOm5dxQf wUwS6Nl/F5Bb5433Yx4HBeJQmhTiBfZS186NH12FzfpbEqt2CtE/tM+P+EhIu1sRb3x3 msQwp2SiRIxuDv9Q96pIgnDaIDAgQoBw1oaeyzd4rghvBmUIj6Mge8wvm641/lpGm6kl L7wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:sender:errors-to:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to:delivered-to:dkim-signature; bh=00n5aVndIwSHvOX6LssWty7GpzeSEYjdv0l8Fp9wGrU=; b=gEVG4gw0tUu+VSA/zyPcYID7+arsQuShkfKWTx/NUSlrsCZq5kP9YbIJH0fX/gVH3S W40ylvfABShmrulLu79m3NfHoTnC5Km0xrR+NdIgJ0lNH9IcCCmEyPm5mk5FpvP824wX JEMlf4xXoNZh6W17OfnOFfMgczAV0iCRw1cXkq3aiGOrUylLqwo7ykYUFRXfF6h3LAqQ j8f9E/851vGBrtCpcj0qIqe/jNT/JyxCg25WOqsd+EI0oxJe25LXrAZxdqjCSY07bORm 2m2w9kOmH4oknYIean96HqFTQlknrPmuuCUpmlUrM/3OYhTda4HKHTgTbtb1OeiJ8+T8 yszw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ddk9YIjS; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com. [170.10.129.124]) by mx.google.com with ESMTPS id e6-20020a0562140d8600b005f7d2dac697si5062937qve.278.2023.05.23.05.50.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:30 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ddk9YIjS; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684846229; 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=00n5aVndIwSHvOX6LssWty7GpzeSEYjdv0l8Fp9wGrU=; b=ddk9YIjS+rI1wmkA0cglk6ONOLYqGlJFbcapV/ToxydITsqUVbG35Xoeq8OIN0UMx6P9Y2 DYPkLDYB+spdyxVzs7sg5qbyHtSLZ0ecV74XxE3G0W/1nj9bChGc3DaqpWCwJOJ5lH7rqS ZVmuWPbT5EF3VDyNafoykSYtEEANe2c= 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-97-5i3__enFNdGA7LQyipo2Qw-1; Tue, 23 May 2023 08:50:27 -0400 X-MC-Unique: 5i3__enFNdGA7LQyipo2Qw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D38B3847092; Tue, 23 May 2023 12:50: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 55D7640D1CF; Tue, 23 May 2023 12:50: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 96CF31946A44; Tue, 23 May 2023 12:50:18 +0000 (UTC) X-Original-To: libvir-list@listman.corp.redhat.com Delivered-To: libvir-list@listman.corp.redhat.com Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9BD6E19465BA for ; Tue, 23 May 2023 12:50:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7BDA040CFD46; Tue, 23 May 2023 12:50:08 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 749FF40CFD45 for ; Tue, 23 May 2023 12:50:08 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (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 58E9685A5B5 for ; Tue, 23 May 2023 12:50:08 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-399-1HtIdUq4Mly0ZdlTJEwA6w-1; Tue, 23 May 2023 08:50:04 -0400 X-MC-Unique: 1HtIdUq4Mly0ZdlTJEwA6w-1 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3f6094cb2d2so10376575e9.2 for ; Tue, 23 May 2023 05:50:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684846203; x=1687438203; 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=00n5aVndIwSHvOX6LssWty7GpzeSEYjdv0l8Fp9wGrU=; b=UYFSQ6b8M4tGnYjg5mIkxz7tIW+spuTXOlWzJ47LfsBJ1OfQ3Rgna+hGMWwvdaQMoA xcbmKmMq2323PpMqr9j+wzUDK6MlYtTqET7DxO5mhtiYmOSUwiSS0WqP81ZaYsDZrXZx xZy8JjFhDkJG0GUtMfpxewmZQ/7fQcpAOLDKCm6EoR9qsdvy/n7SpbKKUU59KpgHyLI/ WyUCyw30nJI4pQRhoeERh2dUlhHUhZmi8oyoGfcqL1IB0DL0scGPrpWv43Uejig/U4EX oNiDWrIwtXa8LnUWEQIzgVznzfImUh/XLQYvrJsFX2HZ+6Sagp1ICQ579PASr5Oj8bNG 7ImA== X-Gm-Message-State: AC+VfDyikXjuESjGzuLXawEdU1T+yQGygpNN/VLObdRymShcW1LF01VC ymXfAS0sPvUI+W3jEGbdm+o+zA== X-Received: by 2002:a5d:62d0:0:b0:309:51c5:3bf6 with SMTP id o16-20020a5d62d0000000b0030951c53bf6mr10999718wrv.23.1684846203460; Tue, 23 May 2023 05:50:03 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id q3-20020adff783000000b002e61e002943sm10960332wrp.116.2023.05.23.05.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 05:50:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 657EA1FFBF; Tue, 23 May 2023 13:50:01 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org, Stefan Hajnoczi Subject: [PATCH v4 04/10] scripts/qapi: document the tool that generated the file Date: Tue, 23 May 2023 13:49:54 +0100 Message-Id: <20230523125000.3674739-5-alex.bennee@linaro.org> In-Reply-To: <20230523125000.3674739-1-alex.bennee@linaro.org> References: <20230523125000.3674739-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.1 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_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , libvir-list@redhat.com, Michael Roth , Riku Voipio , Christian Schoenebeck , Markus Armbruster , Greg Kurz , Yanan Wang , Marcel Apfelbaum , Kyle Evans , Paolo Bonzini , Richard Henderson , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org This makes it a little easier for developers to find where things where being generated. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230505155336.137393-5-alex.bennee@linaro.org> --- v4 - expand out os.path.basename(sys.argv[0]) --- scripts/qapi/gen.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index 8f8f784f4a..2ea27ef31c 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -13,6 +13,7 @@ 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): def _top(self) -> str: return mcgen(''' -/* AUTOMATICALLY GENERATED, DO NOT MODIFY */ +/* AUTOMATICALLY GENERATED by %(tool)s DO NOT MODIFY */ /* %(blurb)s @@ -174,6 +175,7 @@ def _top(self) -> str: */ ''', + tool=str(os.path.basename(sys.argv[0])), blurb=self._blurb, copyright=self._copyright) def _bottom(self) -> str: @@ -195,7 +197,9 @@ def _bottom(self) -> str: class QAPIGenTrace(QAPIGen): def _top(self) -> str: - return super()._top() + '# AUTOMATICALLY GENERATED, DO NOT MODIFY\n\n' + return super()._top() + ( + '# AUTOMATICALLY GENERATED by ' + f"{os.path.basename(sys.argv[0])}, DO NOT MODIFY\n\n" ) @contextmanager