From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Warner Losh" <imp@bsdimp.com>, "Kyle Evans" <kevans@freebsd.org>,
"Laurent Vivier" <laurent@vivier.eu>
Subject: [PATCH v2 1/3] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc
Date: Wed, 24 Apr 2024 19:33:30 +0200 [thread overview]
Message-ID: <20240424173333.96148-2-philmd@linaro.org> (raw)
In-Reply-To: <20240424173333.96148-1-philmd@linaro.org>
Since commit 139c1837db ("meson: rename included C source files
to .c.inc"), QEMU standard procedure for included C files is to
use *.c.inc.
Besides, since commit 6a0057aa22 ("docs/devel: make a statement
about includes") this is documented in the Coding Style:
If you do use template header files they should be named with
the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
being included for expansion.
Therefore rename "hw/elf_ops.h" as "hw/elf_ops.h.inc".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/{elf_ops.h => elf_ops.h.inc} | 0
bsd-user/elfload.c | 2 +-
hw/core/loader.c | 4 ++--
linux-user/elfload.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
rename include/hw/{elf_ops.h => elf_ops.h.inc} (100%)
diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h.inc
similarity index 100%
rename from include/hw/elf_ops.h
rename to include/hw/elf_ops.h.inc
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index baf2f63d2f..833fa3bd05 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -383,7 +383,7 @@ static const char *lookup_symbolxx(struct syminfo *s, uint64_t orig_addr)
return "";
}
-/* FIXME: This should use elf_ops.h */
+/* FIXME: This should use elf_ops.h.inc */
static int symcmp(const void *s0, const void *s1)
{
struct elf_sym *sym0 = (struct elf_sym *)s0;
diff --git a/hw/core/loader.c b/hw/core/loader.c
index b8e52f3fb0..2f8105d7de 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -305,7 +305,7 @@ static void *load_at(int fd, off_t offset, size_t size)
#define elf_word uint32_t
#define elf_sword int32_t
#define bswapSZs bswap32s
-#include "hw/elf_ops.h"
+#include "hw/elf_ops.h.inc"
#undef elfhdr
#undef elf_phdr
@@ -327,7 +327,7 @@ static void *load_at(int fd, off_t offset, size_t size)
#define elf_sword int64_t
#define bswapSZs bswap64s
#define SZ 64
-#include "hw/elf_ops.h"
+#include "hw/elf_ops.h.inc"
const char *load_elf_strerror(ssize_t error)
{
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 60cf55b36c..0c3ddce971 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3671,7 +3671,7 @@ static const char *lookup_symbolxx(struct syminfo *s, uint64_t orig_addr)
return "";
}
-/* FIXME: This should use elf_ops.h */
+/* FIXME: This should use elf_ops.h.inc */
static int symcmp(const void *s0, const void *s1)
{
struct elf_sym *sym0 = (struct elf_sym *)s0;
--
2.41.0
next prev parent reply other threads:[~2024-04-24 17:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 17:33 [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Philippe Mathieu-Daudé
2024-04-24 17:33 ` Philippe Mathieu-Daudé [this message]
2024-04-24 17:33 ` [PATCH v2 2/3] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 3/3] accel/tcg: Rename helper-head.h -> helper-head.h.inc Philippe Mathieu-Daudé
2024-04-24 22:11 ` [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240424173333.96148-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--cc=laurent@vivier.eu \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).