diff options
author | Markus Armbruster | 2018-02-11 10:35:41 +0100 |
---|---|---|
committer | Eric Blake | 2018-03-02 20:14:09 +0100 |
commit | 5ddeec83eb0284b52bb3d496a49ba1657069ed45 (patch) | |
tree | 6e90cb9f528b9ac1bb75e058c81e0e875fa1d508 /scripts/qapi-visit.py | |
parent | qapi: Streamline boilerplate comment generation (diff) | |
download | qemu-5ddeec83eb0284b52bb3d496a49ba1657069ed45.tar.gz qemu-5ddeec83eb0284b52bb3d496a49ba1657069ed45.tar.xz qemu-5ddeec83eb0284b52bb3d496a49ba1657069ed45.zip |
qapi: Generate up-to-date copyright notice
Each generator carries a copyright notice for the generator itself,
and another one for the files it generates. Only the former have been
updated along the way, the latter have not, and are all out of date.
Fix by copying the generator's copyright notice to the generated files
instead. Note that the fix doesn't copy the "Authors:" part; the
generated files' outdated Authors list goes away without replacement.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180211093607.27351-4-armbru@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
[eblake: Flatten each 'blurb' to one line]
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts/qapi-visit.py')
-rw-r--r-- | scripts/qapi-visit.py | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index 0a367072fb..269227a38e 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -1,16 +1,17 @@ -# -# QAPI visitor generator -# -# Copyright IBM, Corp. 2011 -# Copyright (C) 2014-2016 Red Hat, Inc. -# -# Authors: -# Anthony Liguori <aliguori@us.ibm.com> -# Michael Roth <mdroth@linux.vnet.ibm.com> -# Markus Armbruster <armbru@redhat.com> -# -# This work is licensed under the terms of the GNU GPL, version 2. -# See the COPYING file in the top-level directory. +""" +QAPI visitor generator + +Copyright IBM, Corp. 2011 +Copyright (C) 2014-2018 Red Hat, Inc. + +Authors: + Anthony Liguori <aliguori@us.ibm.com> + Michael Roth <mdroth@linux.vnet.ibm.com> + Markus Armbruster <armbru@redhat.com> + +This work is licensed under the terms of the GNU GPL, version 2. +See the COPYING file in the top-level directory. +""" from qapi import * @@ -334,18 +335,11 @@ for o, a in opts: if o in ('-b', '--builtins'): do_builtins = True -blurb = ''' - * Schema-defined QAPI visitors - * - * Copyright IBM, Corp. 2011 - * - * Authors: - * Anthony Liguori <aliguori@us.ibm.com> -''' +blurb = ' * Schema-defined QAPI visitors' (fdef, fdecl) = open_output(output_dir, do_c, do_h, prefix, 'qapi-visit.c', 'qapi-visit.h', - blurb) + blurb, __doc__) fdef.write(mcgen(''' #include "qemu/osdep.h" |