diff options
| author | Peter Maydell | 2019-06-12 14:50:01 +0200 |
|---|---|---|
| committer | Peter Maydell | 2019-06-12 14:50:02 +0200 |
| commit | 59c58f96b270f5edd4ad10954c3a96556cb3a728 (patch) | |
| tree | 005ac413277b8b88a2a580eab2d10d45f25d2fc8 /scripts | |
| parent | Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request'... (diff) | |
| parent | MAINTAINERS: Polish headline decorations (diff) | |
| download | qemu-59c58f96b270f5edd4ad10954c3a96556cb3a728.tar.gz qemu-59c58f96b270f5edd4ad10954c3a96556cb3a728.tar.xz qemu-59c58f96b270f5edd4ad10954c3a96556cb3a728.zip | |
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-06-11-v3' into staging
Miscellaneous patches for 2019-06-11
# gpg: Signature made Wed 12 Jun 2019 12:20:41 BST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-misc-2019-06-11-v3:
MAINTAINERS: Polish headline decorations
MAINTAINERS: Improve section headlines
MAINTAINERS: Remove duplicate entries of qemu-devel@nongnu.org
Clean up a header guard symbols (again)
Supply missing header guards
Clean up a few header guard symbols
scripts/clean-header-guards: Fix handling of trailing comments
Normalize position of header guard
Include qemu-common.h exactly where needed
Include qemu/module.h where needed, drop it from qemu-common.h
qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h
qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/clean-header-guards.pl | 12 | ||||
| -rw-r--r-- | scripts/modules/module_block.py | 2 | ||||
| -rw-r--r-- | scripts/qapi/commands.py | 2 | ||||
| -rw-r--r-- | scripts/qapi/events.py | 1 | ||||
| -rw-r--r-- | scripts/qapi/visit.py | 2 | ||||
| -rw-r--r-- | scripts/tracetool/format/h.py | 1 | ||||
| -rw-r--r-- | scripts/tracetool/format/tcg_helper_c.py | 1 | ||||
| -rw-r--r-- | scripts/tracetool/format/ust_events_h.py | 1 |
8 files changed, 7 insertions, 15 deletions
diff --git a/scripts/clean-header-guards.pl b/scripts/clean-header-guards.pl index 5e67f1998c..f47d673ad5 100755 --- a/scripts/clean-header-guards.pl +++ b/scripts/clean-header-guards.pl @@ -103,7 +103,7 @@ sub preprocess { for my $fname (@ARGV) { my $text = slurp($fname); - $text =~ m,\A(\s*\n|\s*//\N*\n|\s*/\*.*?\*/\s*\n)*|,msg; + $text =~ m,\A(\s*\n|\s*//\N*\n|\s*/\*.*?\*/\s*\n)*|,sg; my $pre = $&; unless ($text =~ /\G(.*\n)/g) { $text =~ /\G.*/; @@ -137,14 +137,16 @@ for my $fname (@ARGV) { } unless ($body =~ m,\A((.*\n)*) - (\s*\#\s*endif\s*(/\*\s*.*\s*\*/\s*)?\n?) - (\n|\s)*\Z,x) { + ([ \t]*\#[ \t]*endif([ \t]*\N*)\n) + ((?s)(\s*\n|\s*//\N*\n|\s*/\*.*?\*/\s*\n)*) + \Z,x) { skipping($fname, "can't find end of header guard"); next; } $body = $1; my $line3 = $3; my $endif_comment = $4; + my $post = $5; my $oldg = $guard; @@ -186,14 +188,14 @@ for my $fname (@ARGV) { my $newl1 = "#ifndef $guard\n"; my $newl2 = "#define $guard\n"; my $newl3 = "#endif\n"; - $newl3 =~ s,\Z, /* $guard */, if defined $endif_comment; + $newl3 =~ s,\Z, /* $guard */, if $endif_comment; if ($line1 ne $newl1 or $line2 ne $newl2 or $line3 ne $newl3) { $pre =~ s/\n*\Z/\n\n/ if $pre =~ /\N/; $body =~ s/\A\n*/\n/; if ($opt_n) { print "$fname would be cleaned up\n" if $opt_v; } else { - unslurp($fname, "$pre$newl1$newl2$body$newl3"); + unslurp($fname, "$pre$newl1$newl2$body$newl3$post"); print "$fname cleaned up\n" if $opt_v; } } diff --git a/scripts/modules/module_block.py b/scripts/modules/module_block.py index 3f73007640..08646af92c 100644 --- a/scripts/modules/module_block.py +++ b/scripts/modules/module_block.py @@ -68,8 +68,6 @@ def print_top(fheader): fheader.write('''#ifndef QEMU_MODULE_BLOCK_H #define QEMU_MODULE_BLOCK_H -#include "qemu-common.h" - static const struct { const char *format_name; const char *protocol_name; diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py index 6d66bf6aa3..b929e07be4 100644 --- a/scripts/qapi/commands.py +++ b/scripts/qapi/commands.py @@ -249,8 +249,6 @@ class QAPISchemaGenCommandVisitor(QAPISchemaModularCVisitor): visit = self._module_basename('qapi-visit', name) self._genc.add(mcgen(''' #include "qemu/osdep.h" -#include "qemu-common.h" -#include "qemu/module.h" #include "qapi/visitor.h" #include "qapi/qmp/qdict.h" #include "qapi/qobject-output-visitor.h" diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py index 2067660be4..b732581046 100644 --- a/scripts/qapi/events.py +++ b/scripts/qapi/events.py @@ -148,7 +148,6 @@ class QAPISchemaGenEventVisitor(QAPISchemaModularCVisitor): visit = self._module_basename('qapi-visit', name) self._genc.add(mcgen(''' #include "qemu/osdep.h" -#include "qemu-common.h" #include "%(prefix)sqapi-emit-events.h" #include "%(events)s.h" #include "%(visit)s.h" diff --git a/scripts/qapi/visit.py b/scripts/qapi/visit.py index 826b8066e1..fd356151d2 100644 --- a/scripts/qapi/visit.py +++ b/scripts/qapi/visit.py @@ -287,7 +287,6 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor): self._add_system_module(None, ' * Built-in QAPI visitors') self._genc.preamble_add(mcgen(''' #include "qemu/osdep.h" -#include "qemu-common.h" #include "qapi/error.h" #include "qapi/qapi-builtin-visit.h" ''')) @@ -303,7 +302,6 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor): visit = self._module_basename('qapi-visit', name) self._genc.preamble_add(mcgen(''' #include "qemu/osdep.h" -#include "qemu-common.h" #include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "%(visit)s.h" diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py index e06f0f27c5..338a2365ee 100644 --- a/scripts/tracetool/format/h.py +++ b/scripts/tracetool/format/h.py @@ -22,7 +22,6 @@ def generate(events, backend, group): '#ifndef TRACE_%s_GENERATED_TRACERS_H' % group.upper(), '#define TRACE_%s_GENERATED_TRACERS_H' % group.upper(), '', - '#include "qemu-common.h"', '#include "trace/control.h"', '') diff --git a/scripts/tracetool/format/tcg_helper_c.py b/scripts/tracetool/format/tcg_helper_c.py index 79aa63eada..1b3522a716 100644 --- a/scripts/tracetool/format/tcg_helper_c.py +++ b/scripts/tracetool/format/tcg_helper_c.py @@ -52,7 +52,6 @@ def generate(events, backend, group): out('/* This file is autogenerated by tracetool, do not edit. */', '', '#include "qemu/osdep.h"', - '#include "qemu-common.h"', '#include "cpu.h"', '#include "exec/helper-proto.h"', '#include "%s"' % header, diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/format/ust_events_h.py index 4e95e9b3f9..b14054ac01 100644 --- a/scripts/tracetool/format/ust_events_h.py +++ b/scripts/tracetool/format/ust_events_h.py @@ -37,7 +37,6 @@ def generate(events, backend, group): ' defined(TRACEPOINT_HEADER_MULTI_READ)', '#define TRACE_%s_GENERATED_UST_H' % group.upper(), '', - '#include "qemu-common.h"', '#include <lttng/tracepoint.h>', '', '/*', |
