[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: |
Alexander Bulekov |
Subject: |
Re: [PATCH 139/147] meson: replace create-config with meson configure_file |
Date: |
Tue, 11 Aug 2020 13:12:02 -0400 |
User-agent: |
NeoMutt/20180716 |
On 200811 1825, Philippe Mathieu-Daudé wrote:
> On 8/11/20 6:20 PM, Philippe Mathieu-Daudé wrote:
> > 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:
>
> The question is why CONFIG_BDRV_RW_WHITELIST & CONFIG_BDRV_RO_WHITELIST
> aren't generated by meson.build...
Something like this?
diff --git a/meson.build b/meson.build
index 300256bf70..d06fa56190 100644
--- a/meson.build
+++ b/meson.build
@@ -378,6 +378,8 @@ foreach k, v: config_host
if arrays.contains(k)
if v != ''
v = '"' + '", "'.join(v.split()) + '", '
+ else
+ v = 'NULL'
endif
config_host_data.set(k, v)
elif k == 'ARCH'
>
> >
> > 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;
> >> }
> > [...]
> >
>
- Re: [PATCH 135/147] meson: sphinx-build, (continued)
- [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, 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
[PATCH 144/147] meson: update build-system documentation, Paolo Bonzini, 2020/08/10
Re: [PATCH 000/147] Meson integration for 5.2, Peter Maydell, 2020/08/10