* [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error @ 2017-08-18 18:47 Alistair Francis 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a Alistair Francis ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: Alistair Francis @ 2017-08-18 18:47 UTC (permalink / raw) To: qemu-devel, armbru; +Cc: alistair.francis, alistair23, pbonzini As discussed with Paolo and Markus let's combine libqemustub.a into libqemuutil.a to avoid circular dependencies. Alistair Francis (2): Makefile: Remove libqemustub.a Convert remaining single line fprintf() to warn_report() Makefile | 7 +++---- Makefile.target | 2 +- docs/devel/build-system.txt | 14 +++++--------- tests/Makefile.include | 8 ++++---- util/cutils.c | 3 ++- 5 files changed, 15 insertions(+), 19 deletions(-) -- 2.11.0 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a 2017-08-18 18:47 [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Alistair Francis @ 2017-08-18 18:47 ` Alistair Francis 2017-08-18 19:29 ` Philippe Mathieu-Daudé 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report() Alistair Francis 2017-09-11 9:57 ` [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Paolo Bonzini 2 siblings, 1 reply; 9+ messages in thread From: Alistair Francis @ 2017-08-18 18:47 UTC (permalink / raw) To: qemu-devel, armbru; +Cc: alistair.francis, alistair23, pbonzini Using two libraries (libqemuutil.a and libqemustub.a) would sometimes result in circular dependencies. To avoid these issues let's just combine both into a single library that functions as both. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> --- Makefile | 7 +++---- Makefile.target | 2 +- docs/devel/build-system.txt | 14 +++++--------- tests/Makefile.include | 6 +++--- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 81447b1f08..f111e93c63 100644 --- a/Makefile +++ b/Makefile @@ -344,7 +344,7 @@ subdir-dtc:dtc/libfdt dtc/tests dtc/%: mkdir -p $@ -$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(chardev-obj-y) \ +$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) @@ -364,12 +364,11 @@ Makefile: $(version-obj-y) ###################################################################### # Build libraries -libqemustub.a: $(stub-obj-y) -libqemuutil.a: $(util-obj-y) $(trace-obj-y) +libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y) ###################################################################### -COMMON_LDADDS = libqemuutil.a libqemustub.a +COMMON_LDADDS = libqemuutil.a qemu-img.o: qemu-img-cmds.h diff --git a/Makefile.target b/Makefile.target index 7f42c45db8..0a80caf79c 100644 --- a/Makefile.target +++ b/Makefile.target @@ -193,7 +193,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y) $(QEMU_PROG_BUILD): config-devices.mak -COMMON_LDADDS = ../libqemuutil.a ../libqemustub.a +COMMON_LDADDS = ../libqemuutil.a # build either PROG or PROGW $(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt index 2af1e668c5..5f32e53248 100644 --- a/docs/devel/build-system.txt +++ b/docs/devel/build-system.txt @@ -232,15 +232,11 @@ The utility code that is used by all binaries is built into a static archive called libqemuutil.a, which is then linked to all the binaries. In order to provide hooks that are only needed by some of the binaries, code in libqemuutil.a may depend on other functions that are -not fully implemented by all QEMU binaries. To deal with this there is a -second library called libqemustub.a which provides dummy stubs for all -these functions. These will get lazy linked into the binary if the real -implementation is not present. In this way, the libqemustub.a static -library can be thought of as a portable implementation of the weak -symbols concept. All binaries should link to both libqemuutil.a and -libqemustub.a. e.g. - - qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a libqemustub.a +not fully implemented by all QEMU binaries. To deal with this there are +dummy stubs for all these functions in libqemuutil.a. +All binaries should link to both libqemuutil.a and libqemustub.a. e.g. + + qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a Windows platform portability diff --git a/tests/Makefile.include b/tests/Makefile.include index 37c1bed683..80527a8763 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -553,7 +553,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests # Deps that are common to various different sets of tests below -test-util-obj-y = libqemuutil.a libqemustub.a +test-util-obj-y = libqemuutil.a test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y) test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \ tests/test-qapi-event.o tests/test-qmp-introspect.o \ @@ -608,8 +608,8 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \ $(test-io-obj-y) tests/test-timed-average$(EXESUF): tests/test-timed-average.o $(test-util-obj-y) tests/test-base64$(EXESUF): tests/test-base64.o \ - libqemuutil.a libqemustub.a -tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o libqemustub.a + libqemuutil.a +tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o $(test-util-obj-y) tests/test-logging$(EXESUF): tests/test-logging.o $(test-util-obj-y) -- 2.11.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a Alistair Francis @ 2017-08-18 19:29 ` Philippe Mathieu-Daudé 2017-08-18 20:39 ` Alistair Francis 0 siblings, 1 reply; 9+ messages in thread From: Philippe Mathieu-Daudé @ 2017-08-18 19:29 UTC (permalink / raw) To: Alistair Francis, qemu-devel, armbru; +Cc: alistair23, pbonzini Hi Alistair, On 08/18/2017 03:47 PM, Alistair Francis wrote: > Using two libraries (libqemuutil.a and libqemustub.a) would sometimes > result in circular dependencies. To avoid these issues let's just > combine both into a single library that functions as both. > > Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> > --- > > Makefile | 7 +++---- > Makefile.target | 2 +- > docs/devel/build-system.txt | 14 +++++--------- > tests/Makefile.include | 6 +++--- > 4 files changed, 12 insertions(+), 17 deletions(-) > > diff --git a/Makefile b/Makefile > index 81447b1f08..f111e93c63 100644 > --- a/Makefile > +++ b/Makefile > @@ -344,7 +344,7 @@ subdir-dtc:dtc/libfdt dtc/tests > dtc/%: > mkdir -p $@ > > -$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(chardev-obj-y) \ > +$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ > $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) > > ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) > @@ -364,12 +364,11 @@ Makefile: $(version-obj-y) > ###################################################################### > # Build libraries > > -libqemustub.a: $(stub-obj-y) > -libqemuutil.a: $(util-obj-y) $(trace-obj-y) > +libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y) > > ###################################################################### > > -COMMON_LDADDS = libqemuutil.a libqemustub.a > +COMMON_LDADDS = libqemuutil.a > > qemu-img.o: qemu-img-cmds.h > > diff --git a/Makefile.target b/Makefile.target > index 7f42c45db8..0a80caf79c 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -193,7 +193,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y) > > $(QEMU_PROG_BUILD): config-devices.mak > > -COMMON_LDADDS = ../libqemuutil.a ../libqemustub.a > +COMMON_LDADDS = ../libqemuutil.a > > # build either PROG or PROGW > $(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) > diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt > index 2af1e668c5..5f32e53248 100644 > --- a/docs/devel/build-system.txt > +++ b/docs/devel/build-system.txt > @@ -232,15 +232,11 @@ The utility code that is used by all binaries is built into a > static archive called libqemuutil.a, which is then linked to all the > binaries. In order to provide hooks that are only needed by some of the > binaries, code in libqemuutil.a may depend on other functions that are > -not fully implemented by all QEMU binaries. To deal with this there is a > -second library called libqemustub.a which provides dummy stubs for all > -these functions. These will get lazy linked into the binary if the real > -implementation is not present. In this way, the libqemustub.a static > -library can be thought of as a portable implementation of the weak > -symbols concept. All binaries should link to both libqemuutil.a and > -libqemustub.a. e.g. > - > - qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a libqemustub.a > +not fully implemented by all QEMU binaries. To deal with this there are > +dummy stubs for all these functions in libqemuutil.a. > +All binaries should link to both libqemuutil.a and libqemustub.a. e.g. still libqemustub.a > + > + qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a changed a bit: The utility code that is used by all binaries is built into a static archive called libqemuutil.a, which is then linked to all the binaries. In order to provide hooks that are only needed by some of the binaries, code in libqemuutil.a may depend on other functions that are not fully implemented by all QEMU binaries. Dummy stubs for all these functions are also provided by this library, and will get lazy linked into the binary if the real implementation is not present. In this way, this static library can be thought of as a portable implementation of the weak symbols concept. All binaries should link to libqemuutil.a. e.g. qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a This or removing "libqemustub.a": Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > Windows platform portability > diff --git a/tests/Makefile.include b/tests/Makefile.include > index 37c1bed683..80527a8763 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -553,7 +553,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests > > > # Deps that are common to various different sets of tests below > -test-util-obj-y = libqemuutil.a libqemustub.a > +test-util-obj-y = libqemuutil.a > test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y) > test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \ > tests/test-qapi-event.o tests/test-qmp-introspect.o \ > @@ -608,8 +608,8 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \ > $(test-io-obj-y) > tests/test-timed-average$(EXESUF): tests/test-timed-average.o $(test-util-obj-y) > tests/test-base64$(EXESUF): tests/test-base64.o \ > - libqemuutil.a libqemustub.a > -tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o libqemustub.a > + libqemuutil.a > +tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o $(test-util-obj-y) > > tests/test-logging$(EXESUF): tests/test-logging.o $(test-util-obj-y) > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a 2017-08-18 19:29 ` Philippe Mathieu-Daudé @ 2017-08-18 20:39 ` Alistair Francis 0 siblings, 0 replies; 9+ messages in thread From: Alistair Francis @ 2017-08-18 20:39 UTC (permalink / raw) To: Philippe Mathieu-Daudé Cc: Alistair Francis, qemu-devel@nongnu.org Developers, Markus Armbruster, Paolo Bonzini On Fri, Aug 18, 2017 at 12:29 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote: > Hi Alistair, > > > On 08/18/2017 03:47 PM, Alistair Francis wrote: >> >> Using two libraries (libqemuutil.a and libqemustub.a) would sometimes >> result in circular dependencies. To avoid these issues let's just >> combine both into a single library that functions as both. >> >> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> >> --- >> >> Makefile | 7 +++---- >> Makefile.target | 2 +- >> docs/devel/build-system.txt | 14 +++++--------- >> tests/Makefile.include | 6 +++--- >> 4 files changed, 12 insertions(+), 17 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index 81447b1f08..f111e93c63 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -344,7 +344,7 @@ subdir-dtc:dtc/libfdt dtc/tests >> dtc/%: >> mkdir -p $@ >> -$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) >> $(chardev-obj-y) \ >> +$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \ >> $(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY)) >> ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS)) >> @@ -364,12 +364,11 @@ Makefile: $(version-obj-y) >> ###################################################################### >> # Build libraries >> -libqemustub.a: $(stub-obj-y) >> -libqemuutil.a: $(util-obj-y) $(trace-obj-y) >> +libqemuutil.a: $(util-obj-y) $(trace-obj-y) $(stub-obj-y) >> ###################################################################### >> -COMMON_LDADDS = libqemuutil.a libqemustub.a >> +COMMON_LDADDS = libqemuutil.a >> qemu-img.o: qemu-img-cmds.h >> diff --git a/Makefile.target b/Makefile.target >> index 7f42c45db8..0a80caf79c 100644 >> --- a/Makefile.target >> +++ b/Makefile.target >> @@ -193,7 +193,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y) >> $(QEMU_PROG_BUILD): config-devices.mak >> -COMMON_LDADDS = ../libqemuutil.a ../libqemustub.a >> +COMMON_LDADDS = ../libqemuutil.a >> # build either PROG or PROGW >> $(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) >> diff --git a/docs/devel/build-system.txt b/docs/devel/build-system.txt >> index 2af1e668c5..5f32e53248 100644 >> --- a/docs/devel/build-system.txt >> +++ b/docs/devel/build-system.txt >> @@ -232,15 +232,11 @@ The utility code that is used by all binaries is >> built into a >> static archive called libqemuutil.a, which is then linked to all the >> binaries. In order to provide hooks that are only needed by some of the >> binaries, code in libqemuutil.a may depend on other functions that are >> -not fully implemented by all QEMU binaries. To deal with this there is a >> -second library called libqemustub.a which provides dummy stubs for all >> -these functions. These will get lazy linked into the binary if the real >> -implementation is not present. In this way, the libqemustub.a static >> -library can be thought of as a portable implementation of the weak >> -symbols concept. All binaries should link to both libqemuutil.a and >> -libqemustub.a. e.g. >> - >> - qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a libqemustub.a >> +not fully implemented by all QEMU binaries. To deal with this there are >> +dummy stubs for all these functions in libqemuutil.a. >> +All binaries should link to both libqemuutil.a and libqemustub.a. e.g. > > > still libqemustub.a Ah, I missed this. I'll fix this up. > >> + >> + qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a > > > changed a bit: > > The utility code that is used by all binaries is built into a > static archive called libqemuutil.a, which is then linked to all the > binaries. In order to provide hooks that are only needed by some of the > binaries, code in libqemuutil.a may depend on other functions that are > not fully implemented by all QEMU binaries. Dummy stubs for all these > functions are also provided by this library, and will get lazy linked > into the binary if the real implementation is not present. In this way, > this static library can be thought of as a portable implementation of > the weak symbols concept. All binaries should link to libqemuutil.a. e.g. > > qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a > > This or removing "libqemustub.a": > Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Thanks! Alistair > > >> Windows platform portability >> diff --git a/tests/Makefile.include b/tests/Makefile.include >> index 37c1bed683..80527a8763 100644 >> --- a/tests/Makefile.include >> +++ b/tests/Makefile.include >> @@ -553,7 +553,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests >> # Deps that are common to various different sets of tests below >> -test-util-obj-y = libqemuutil.a libqemustub.a >> +test-util-obj-y = libqemuutil.a >> test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y) >> test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \ >> tests/test-qapi-event.o tests/test-qmp-introspect.o \ >> @@ -608,8 +608,8 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \ >> $(test-io-obj-y) >> tests/test-timed-average$(EXESUF): tests/test-timed-average.o >> $(test-util-obj-y) >> tests/test-base64$(EXESUF): tests/test-base64.o \ >> - libqemuutil.a libqemustub.a >> -tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o >> hw/core/ptimer.o libqemustub.a >> + libqemuutil.a >> +tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o >> hw/core/ptimer.o $(test-util-obj-y) >> tests/test-logging$(EXESUF): tests/test-logging.o $(test-util-obj-y) >> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report() 2017-08-18 18:47 [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Alistair Francis 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a Alistair Francis @ 2017-08-18 18:47 ` Alistair Francis 2017-08-18 19:31 ` Philippe Mathieu-Daudé 2017-09-11 9:57 ` [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Paolo Bonzini 2 siblings, 1 reply; 9+ messages in thread From: Alistair Francis @ 2017-08-18 18:47 UTC (permalink / raw) To: qemu-devel, armbru; +Cc: alistair.francis, alistair23, pbonzini Convert any remaining uses of fprintf(stderr, "warning:"... to use warn_report() instead. This helps standardise on a single method of printing warnings to the user. All of the warnings were changed using this command: find ./* -type f -exec sed -i 's|fprintf(.*".*warning[,:] |warn_report("|Ig' {} + The #include lines and chagnes to the test Makefile were manually updated to allow the code to compile. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> --- This was split out of my original series fixing QEMU warnings. tests/Makefile.include | 2 +- util/cutils.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 80527a8763..91d5a4544f 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -584,7 +584,7 @@ tests/test-iov$(EXESUF): tests/test-iov.o $(test-util-obj-y) tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o $(test-util-obj-y) $(test-crypto-obj-y) tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/xbzrle.o migration/page_cache.o $(test-util-obj-y) -tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o +tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o $(test-util-obj-y) tests/test-int128$(EXESUF): tests/test-int128.o tests/rcutorture$(EXESUF): tests/rcutorture.o $(test-util-obj-y) tests/test-rcu-list$(EXESUF): tests/test-rcu-list.o $(test-util-obj-y) diff --git a/util/cutils.c b/util/cutils.c index 1534682083..b33ede83d1 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -30,6 +30,7 @@ #include "qemu/iov.h" #include "net/net.h" #include "qemu/cutils.h" +#include "qemu/error-report.h" void strpadcpy(char *buf, int buf_size, const char *str, char pad) { @@ -601,7 +602,7 @@ int parse_debug_env(const char *name, int max, int initial) return initial; } if (debug < 0 || debug > max || errno != 0) { - fprintf(stderr, "warning: %s not in [0, %d]", name, max); + warn_report("%s not in [0, %d]", name, max); return initial; } return debug; -- 2.11.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report() 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report() Alistair Francis @ 2017-08-18 19:31 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 9+ messages in thread From: Philippe Mathieu-Daudé @ 2017-08-18 19:31 UTC (permalink / raw) To: Alistair Francis, qemu-devel, armbru; +Cc: alistair23, pbonzini On 08/18/2017 03:47 PM, Alistair Francis wrote: > Convert any remaining uses of fprintf(stderr, "warning:"... > to use warn_report() instead. This helps standardise on a single > method of printing warnings to the user. > > All of the warnings were changed using this command: > find ./* -type f -exec sed -i 's|fprintf(.*".*warning[,:] |warn_report("|Ig' {} + > > The #include lines and chagnes to the test Makefile were manually line, changes > updated to allow the code to compile. > > Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > This was split out of my original series fixing QEMU warnings. > > tests/Makefile.include | 2 +- > util/cutils.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tests/Makefile.include b/tests/Makefile.include > index 80527a8763..91d5a4544f 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -584,7 +584,7 @@ tests/test-iov$(EXESUF): tests/test-iov.o $(test-util-obj-y) > tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o $(test-util-obj-y) $(test-crypto-obj-y) > tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o > tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/xbzrle.o migration/page_cache.o $(test-util-obj-y) > -tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o > +tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o $(test-util-obj-y) > tests/test-int128$(EXESUF): tests/test-int128.o > tests/rcutorture$(EXESUF): tests/rcutorture.o $(test-util-obj-y) > tests/test-rcu-list$(EXESUF): tests/test-rcu-list.o $(test-util-obj-y) > diff --git a/util/cutils.c b/util/cutils.c > index 1534682083..b33ede83d1 100644 > --- a/util/cutils.c > +++ b/util/cutils.c > @@ -30,6 +30,7 @@ > #include "qemu/iov.h" > #include "net/net.h" > #include "qemu/cutils.h" > +#include "qemu/error-report.h" > > void strpadcpy(char *buf, int buf_size, const char *str, char pad) > { > @@ -601,7 +602,7 @@ int parse_debug_env(const char *name, int max, int initial) > return initial; > } > if (debug < 0 || debug > max || errno != 0) { > - fprintf(stderr, "warning: %s not in [0, %d]", name, max); > + warn_report("%s not in [0, %d]", name, max); > return initial; > } > return debug; > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error 2017-08-18 18:47 [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Alistair Francis 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a Alistair Francis 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report() Alistair Francis @ 2017-09-11 9:57 ` Paolo Bonzini 2017-09-11 16:36 ` Alistair Francis 2 siblings, 1 reply; 9+ messages in thread From: Paolo Bonzini @ 2017-09-11 9:57 UTC (permalink / raw) To: Alistair Francis, qemu-devel, armbru; +Cc: alistair23 On 18/08/2017 20:47, Alistair Francis wrote: > As discussed with Paolo and Markus let's combine libqemustub.a into > libqemuutil.a to avoid circular dependencies. > > Alistair Francis (2): > Makefile: Remove libqemustub.a > Convert remaining single line fprintf() to warn_report() > > Makefile | 7 +++---- > Makefile.target | 2 +- > docs/devel/build-system.txt | 14 +++++--------- > tests/Makefile.include | 8 ++++---- > util/cutils.c | 3 ++- > 5 files changed, 15 insertions(+), 19 deletions(-) > Queued, thanks (with Philippe's adjustments to the comments). Paolo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error 2017-09-11 9:57 ` [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Paolo Bonzini @ 2017-09-11 16:36 ` Alistair Francis 2017-09-11 20:06 ` Alistair Francis 0 siblings, 1 reply; 9+ messages in thread From: Alistair Francis @ 2017-09-11 16:36 UTC (permalink / raw) To: Paolo Bonzini Cc: Alistair Francis, qemu-devel@nongnu.org Developers, Markus Armbruster On Mon, Sep 11, 2017 at 2:57 AM, Paolo Bonzini <pbonzini@redhat.com> wrote: > On 18/08/2017 20:47, Alistair Francis wrote: >> As discussed with Paolo and Markus let's combine libqemustub.a into >> libqemuutil.a to avoid circular dependencies. >> >> Alistair Francis (2): >> Makefile: Remove libqemustub.a >> Convert remaining single line fprintf() to warn_report() >> >> Makefile | 7 +++---- >> Makefile.target | 2 +- >> docs/devel/build-system.txt | 14 +++++--------- >> tests/Makefile.include | 8 ++++---- >> util/cutils.c | 3 ++- >> 5 files changed, 15 insertions(+), 19 deletions(-) >> > > Queued, thanks (with Philippe's adjustments to the comments). Thanks Paolo. I actually sent a new version with Philippe's comments, it's included as part of the "More warning reporting fixed" series. Version 5 of that has been reviewed by Markus, I will send it out today. Can you take that instead? Thanks, Alistair > > Paolo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error 2017-09-11 16:36 ` Alistair Francis @ 2017-09-11 20:06 ` Alistair Francis 0 siblings, 0 replies; 9+ messages in thread From: Alistair Francis @ 2017-09-11 20:06 UTC (permalink / raw) To: Alistair Francis Cc: Paolo Bonzini, qemu-devel@nongnu.org Developers, Markus Armbruster On Mon, Sep 11, 2017 at 9:36 AM, Alistair Francis <alistair.francis@xilinx.com> wrote: > On Mon, Sep 11, 2017 at 2:57 AM, Paolo Bonzini <pbonzini@redhat.com> wrote: >> On 18/08/2017 20:47, Alistair Francis wrote: >>> As discussed with Paolo and Markus let's combine libqemustub.a into >>> libqemuutil.a to avoid circular dependencies. >>> >>> Alistair Francis (2): >>> Makefile: Remove libqemustub.a >>> Convert remaining single line fprintf() to warn_report() >>> >>> Makefile | 7 +++---- >>> Makefile.target | 2 +- >>> docs/devel/build-system.txt | 14 +++++--------- >>> tests/Makefile.include | 8 ++++---- >>> util/cutils.c | 3 ++- >>> 5 files changed, 15 insertions(+), 19 deletions(-) >>> >> >> Queued, thanks (with Philippe's adjustments to the comments). > > Thanks Paolo. > > I actually sent a new version with Philippe's comments, it's included > as part of the "More warning reporting fixed" series. > > Version 5 of that has been reviewed by Markus, I will send it out > today. Can you take that instead? Ah, I meant version 4. The series should be very close to being merged. If you want that whole series can go in or you can take this and I can rebase the larger series. Whatever is easiest for you. Thanks, Alistair > > Thanks, > Alistair > >> >> Paolo ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-09-11 20:07 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-08-18 18:47 [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Alistair Francis 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 1/2] Makefile: Remove libqemustub.a Alistair Francis 2017-08-18 19:29 ` Philippe Mathieu-Daudé 2017-08-18 20:39 ` Alistair Francis 2017-08-18 18:47 ` [Qemu-devel] [PATCH v1 2/2] Convert remaining single line fprintf() to warn_report() Alistair Francis 2017-08-18 19:31 ` Philippe Mathieu-Daudé 2017-09-11 9:57 ` [Qemu-devel] [PATCH v1 0/2] Remove libqemustub.a in order to improve error Paolo Bonzini 2017-09-11 16:36 ` Alistair Francis 2017-09-11 20:06 ` Alistair Francis
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).