diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2025-09-16 09:16:33 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2025-09-16 13:31:40 -0400 |
| commit | 69e22a5e20518fbb68b892b2189d525cf9d90a3d (patch) | |
| tree | 4ea01a2ad25b6aa553455f977ee9a53b94a3f3e6 | |
| parent | acf7882d194562983fd7a85df5d4b99d15c81766 (diff) | |
| download | focaccia-qemu-69e22a5e20518fbb68b892b2189d525cf9d90a3d.tar.gz focaccia-qemu-69e22a5e20518fbb68b892b2189d525cf9d90a3d.zip | |
tracetool: avoid space after "*" in arg types
QEMU code style is to have no whitespace between "*" and the arg name. Since generated trace code will soon be added to git, make it comply with code style. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20250916081638.764020-4-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| -rw-r--r-- | scripts/tracetool/__init__.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 2ae2e562d6..0f33758870 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -170,10 +170,16 @@ class Arguments: def __str__(self): """String suitable for declaring function arguments.""" + def onearg(t, n): + if t[-1] == '*': + return "".join([t, n]) + else: + return " ".join([t, n]) + if len(self._args) == 0: return "void" else: - return ", ".join([ " ".join([t, n]) for t,n in self._args ]) + return ", ".join([ onearg(t, n) for t,n in self._args ]) def __repr__(self): """Evaluable string representation for this object.""" |