[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 139/147] meson: replace create-config with meson configure_fi
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 139/147] meson: replace create-config with meson configure_file |
Date: |
Tue, 11 Aug 2020 18:20:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 8/10/20 7:08 PM, Paolo Bonzini wrote:
> Move the create-config logic to meson.build; create a
> configuration_data object and let meson handle the
> quoting and output.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> Makefile | 2 +-
> block.c | 4 +-
> configure | 9 ++-
> meson.build | 100 ++++++++++++++++++++++---------
> scripts/create_config | 131
> -----------------------------------------
> tests/qtest/bios-tables-test.c | 2 +-
> 6 files changed, 80 insertions(+), 168 deletions(-)
> delete mode 100755 scripts/create_config
>
> diff --git a/Makefile b/Makefile
> index cd4eeb5..1eec727 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -189,7 +189,7 @@ clean: recurse-clean
> rm -f fsdev/*.pod scsi/*.pod
> rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp)
>
> -VERSION ?= $(shell cat VERSION)
> +VERSION = $(shell cat $(SRC_PATH)/VERSION)
>
> dist: qemu-$(VERSION).tar.bz2
>
> diff --git a/block.c b/block.c
> index 67c5028..67ca543 100644
> --- a/block.c
> +++ b/block.c
> @@ -443,13 +443,13 @@ static int bdrv_format_is_whitelisted(const char
> *format_name, bool read_only)
> return 1; /* no whitelist, anything goes */
> }
>
> - for (p = whitelist_rw; *p; p++) {
> + for (p = whitelist_rw; p < &whitelist_rw[ARRAY_SIZE(whitelist_rw)]; p++)
> {
Alexander reported [*] a problem when ARRAY_SIZE(whitelist_rw) == 0 you
access an undefined address:
block.c:442:10: runtime error: index 0 out of bounds for type 'const
char *[0]'
[*] https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg02066.html
> if (!strcmp(format_name, *p)) {
> return 1;
> }
> }
> if (read_only) {
> - for (p = whitelist_ro; *p; p++) {
> + for (p = whitelist_ro; p < &whitelist_ro[ARRAY_SIZE(whitelist_ro)];
> p++) {
Ditto.
> if (!strcmp(format_name, *p)) {
> return 1;
> }
[...]
[PATCH 136/147] meson: build texi doc, Paolo Bonzini, 2020/08/10
[PATCH 137/147] meson: convert check-block, Paolo Bonzini, 2020/08/10
[PATCH 140/147] meson: convert sample plugins, Paolo Bonzini, 2020/08/10
[PATCH 141/147] meson: move SDL and SDL-image detection to meson, Paolo Bonzini, 2020/08/10
[PATCH 138/147] rules.mak: drop unneeded macros, Paolo Bonzini, 2020/08/10
[PATCH 139/147] meson: replace create-config with meson configure_file, Paolo Bonzini, 2020/08/10
- Re: [PATCH 139/147] meson: replace create-config with meson configure_file,
Philippe Mathieu-Daudé <=
Re: [PATCH 139/147] meson: replace create-config with meson configure_file, Paolo Bonzini, 2020/08/11
[PATCH 142/147] meson: convert VNC and dependent libraries to meson, Paolo Bonzini, 2020/08/10
[PATCH 143/147] meson: convert po/, Paolo Bonzini, 2020/08/10
[PATCH 146/147] cflags Signed-off-by: Paolo Bonzini <address@hidden>, Paolo Bonzini, 2020/08/10
[PATCH 147/147] meson: avoid unstable module warning with Meson 0.56.0 or newer, Paolo Bonzini, 2020/08/10
[PATCH 145/147] acceptance: use stable URLs for the Debian and Ubuntu installer, Paolo Bonzini, 2020/08/10