Skip to content

Commit

Permalink
hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc
Browse files Browse the repository at this point in the history
Since commit 139c183 ("meson: rename included C source files
to .c.inc"), QEMU standard procedure for included C files is to
use *.c.inc.

Besides, since commit 6a0057a ("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é <[email protected]>
Acked-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
philmd committed Apr 25, 2024
1 parent e0ddabc commit 159fb79
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bsd-user/elfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions hw/core/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
{
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion linux-user/elfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -3572,7 +3572,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;
Expand Down

0 comments on commit 159fb79

Please sign in to comment.