From nobody Sun Dec 22 06:29:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1684935665; cv=none; d=zohomail.com; s=zohoarc; b=V202hBEpIuQRhUvYZA5NlUHfl6Sy2Limz/UrqYPmtDQFeF5HtRn2YozIL3E/JuYpwfObF3VxZxmznod1rbsUVLCHoAwsNF3AuFmbE7AICRF6iquMODObWr3U8lAhJzSvg5PUpTys2fmnYzcPfKyHOvWe3KIW8lwMN0wJevut5Qw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684935665; 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=PoFcFHhtN//HYJuXe8yUkXS88yzA5U5AjAGE2C88aFE=; b=CmrDaxIrBlPFVOTaYNHRkOeko4OXRKMC3eWGY8w13bqRo0RH3WGAe9s4gwZilsdjtdjfL/Rh54Z9GvmIBzLkDQ2g/C/I7gxag+CNnzMJeyd6pA83FR65XFpPBgnpZtHLqT0pk+FLs/UnKlzAJl7im1hMKfiOYEqFzd3MJKi4Xqg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684935665129192.107649130847; Wed, 24 May 2023 06:41:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1oik-0008OA-Kx; Wed, 24 May 2023 09:40:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1oie-0008D8-CM for qemu-devel@nongnu.org; Wed, 24 May 2023 09:40:01 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1oib-0003lx-Rc for qemu-devel@nongnu.org; Wed, 24 May 2023 09:39:59 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-30a892c45c4so574973f8f.3 for ; Wed, 24 May 2023 06:39:56 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p17-20020a5d4e11000000b003063772a55bsm14538281wrt.61.2023.05.24.06.39.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 06:39:54 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 64B031FFBF; Wed, 24 May 2023 14:39:53 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684935595; x=1687527595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PoFcFHhtN//HYJuXe8yUkXS88yzA5U5AjAGE2C88aFE=; b=LlL26XbmMqIfnVRJ7mQFf7knn5B5u2RUadIjfMQsOyXG6MbF6R+l2RnUtwGnS62/Vx F1sOBi4u4L3ioU94rOtWQPR82AOdW9UieLb35LxDtuUoEKr1/JhPTS5+V+hoQFJPZ6v/ NjzQ3xH3xLpXjrocmcscbKIjIsMlNTRlWl0LIKxyrPqJQDfe+CkIRjuU32slCAG4F08P 5rOq4p7kGJW35FiiG07axucTX1aa58DEj6agRcvMapLUIh1tWuz4/C6dH2S+77izOoCx pbqdwGdpuVBiQtDIQRuMgzOJfQzy2wkk1YPXvLGBN4p9oA7DmJ28jEqInumDapjGYPOg xWIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684935595; x=1687527595; 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=PoFcFHhtN//HYJuXe8yUkXS88yzA5U5AjAGE2C88aFE=; b=N/ZuIAO882Q/7oxZVjYUcYeqVrGlVfntTWrDw4vueh04Fzl0qkWUp/nYfWJkH/G57J no1dNF44Yr/2SlGw7WABIErKH/l9Nj1515AR74YsweJ4QZ4Hzp7Xt4X7IPx7wf0poHjC rdCRtUoWYsdOWGfMLDKh9fFhb3OSNrgGdqtJH8QMFYNqvhDub/mcsebhQgqDZjtbQkNg L3LIpn797YOkf4yBriMoCPxUnRj+A/NVehDkfEfX03sXN0qYJ4kAOEKuq8Rsxv8cbVYm zK/nzbrCJVr8cH5G2/Rux6td+b9Du/CKU/VUaQPc4QkViY6mPX4FyD3kfS8evtN6Q/9D velA== X-Gm-Message-State: AC+VfDxppzchonpyfw52SwVo9Gq3b+NRwYkj8hGFhZumSqzxgwCnt3Ab w5BSbj/N2rZv8e0omzDv78rclg== X-Google-Smtp-Source: ACHHUZ5cwfELyyiwnD3SgO3pqe5iGq3OUgj5BOEuQirsO5OwCqF+nOds3unAu3kRFVqtuKw+F4B52w== X-Received: by 2002:adf:e6cb:0:b0:2d1:3eb9:c3c2 with SMTP id y11-20020adfe6cb000000b002d13eb9c3c2mr12314606wrm.54.1684935595144; Wed, 24 May 2023 06:39:55 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kyle Evans , libvir-list@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Greg Kurz , Eric Blake , Markus Armbruster , Warner Losh , Marcel Apfelbaum , Eduardo Habkost , Michael Roth , Richard Henderson , Christian Schoenebeck , Riku Voipio , Paolo Bonzini , Yanan Wang , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v5 04/10] scripts/qapi: document the tool that generated the file Date: Wed, 24 May 2023 14:39:46 +0100 Message-Id: <20230524133952.3971948-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230524133952.3971948-1-alex.bennee@linaro.org> References: <20230524133952.3971948-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1684935665900100001 This makes it a little easier for developers to find where things where being generated. Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20230523125000.3674739-5-alex.bennee@linaro.org> Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefan Hajnoczi --- 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 @@ =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=3Dstr(os.path.basename(sys.argv[0])), blurb=3Dself._blurb, copyright=3Dself._copyright) =20 def _bottom(self) -> str: @@ -195,7 +197,9 @@ 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 ' + f"{os.path.basename(sys.argv[0])}, DO NOT MODIFY\n\n" ) =20 =20 @contextmanager --=20 2.39.2