Trivial branch patches
The following changes since commit 8482ff2eb3bb95020eb2f370a9b3ea26511e41df:
Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging (2019-05-02 12:04:51 +0100)
are available in the Git repository at:
git://github.com/vivier/qemu.git tags/trivial-branch-pull-request
for you to fetch changes up to 2d2023c3b99edb33ad4bb9791f70456ea1a1c049:
sockets: avoid string truncation warnings when copying UNIX path (2019-05-03 13:03:04 +0200)
----------------------------------------------------------------
Pull request trivial branch 2019-05-03
----------------------------------------------------------------
Aruna Jayasena (1):
Header cleanups
Daniel P. Berrangé (1):
sockets: avoid string truncation warnings when copying UNIX path
Dr. David Alan Gilbert (1):
configure: fix pam test warning
Marc-André Lureau (1):
doc: fix the configuration path
Philippe Mathieu-Daudé (3):
hw/net/pcnet: Use qemu_log_mask(GUEST_ERROR) instead of printf
Makefile: Let the 'clean' rule remove qemu-ga.exe on Windows hosts hw/sparc/leon3: Allow load of uImage firmwares
Stefan Weil (1):
Update configure
Thomas Huth (1):
net: Print output of "-net nic, model=help" to stdout instead of
stderr
Wei Yang (3):
CODING_STYLE: specify the indent rule for multiline code
CODING_STYLE: indent example code as all others
qom: use object_new_with_type in object_new_with_propv
qemu-ga.texi | 4 ++-- configure | 5 ++--- Makefile | 11 +++++---- include/exec/cpu-common.h | 3 --- hw/net/pcnet.c | 4 +++- hw/sparc/leon3.c | 4 ++++ net/net.c | 7 +++--- qom/object.c | 2 +- util/qemu-sockets.c | 12 ++++++---- CODING_STYLE | 47 +++++++++++++++++++++++++++++++++++---- 10 files changed, 74 insertions(+), 25 deletions(-)
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v2 02/12] CODING_STYLE: specify the indent rule for multiline code
From: Wei Yang <[email protected]>
We didn't specify the indent rule for multiline code here, which may mislead users. And in current code, the code use various styles.
Add this rule in CODING_STYLE to make sure this is clear to every one.
Message-Id: <[email protected]>
--- CODING_STYLE | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
CODING_STYLE +39 -0
@@ -29,6 +29,45 @@ Spaces of course are superior to tabs because: Do not leave whitespace dangling off the ends of lines. +1.1 Multiline Indent + +There are several places where indent is necessary: + + - if/else + - while/for + - function definition & call + +When breaking up a long line to fit within line width, we need a proper indent +for the following lines. + +In case of if/else, while/for, align the secondary lines just after the +opening parenthesis of the first. + +For example: + + if (a == 1 && + b == 2) { + + while (a == 1 && + b == 2) { + +In case of function, there are several variants: + + * 4 spaces indent from the beginning + * align the secondary lines just after the opening parenthesis of the + first + +For example: + + do_something(x, y, + z); + + do_something(x, y, + z); + + do_something(x, do_another(y, + z)); + 2. Line width Lines should be 80 characters; try not to make them longer.
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v2 01/12] hw/net/pcnet: Use qemu_log_mask(GUEST_ERROR) instead of printf
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Avoid to clutter stdout until explicitly requested (with -d guest_errors):
$ qemu-system-mips -M malta -m 512 -kernel vmlinux-3.2.0-4-4kc-malta Bad SWSTYLE=0x04
Message-Id: <[email protected]>
--- hw/net/pcnet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
hw/net/pcnet.c +3 -1
@@ -36,6 +36,7 @@*/ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/qdev.h" #include "net/net.h" #include "net/eth.h"
@@ -1501,7 +1502,8 @@ static void pcnet_bcr_writew(PCNetState *s, uint32_t rap, uint32_t val) val |=0x0300 ;break ;default : -printf ("Bad SWSTYLE=0x%02x\n" , val &0xff ); +qemu_log_mask (LOG_GUEST_ERROR ,"pcnet: Bad SWSTYLE=0x%02x\n" , + val &0xff ); val =0x0200 ;break ; }
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v2 03/12] CODING_STYLE: indent example code as all others
In reply to Laurent VivierFrom: Wei Yang <[email protected]>
All the example code are indented with four spaces except this one.
Fix this by adding four spaces here.
Message-Id: <[email protected]>
--- CODING_STYLE | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
CODING_STYLE +4 -4
@@ -147,10 +147,10 @@ block to a separate function altogether. When comparing a variable for (in)equality with a constant, list the constant on the right, as in: -if (a == 1) { - /* Reads like: "If a equals 1" */ - do_something(); -} + if (a == 1) { + /* Reads like: "If a equals 1" */ + do_something(); + } Rationale: Yoda conditions (as in 'if (1 == a)') are awkward to read. Besides, good compilers already warn users when '==' is mis-typed as '=',
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v2 05/12] qom: use object_new_with_type in object_new_with_propv
In reply to Laurent VivierFrom: Wei Yang <[email protected]>
Function object_new_with_propv already get the Type of the object, so we could leverage object_new_with_type here.
Message-Id: <[email protected]>
--- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qom/object.c +1 -1
@@ -679,7 +679,7 @@ Object *object_new_with_propv(const char *typename,error_setg (errp,"object type '%s' is abstract" , typename);return NULL ; } - obj =object_new (typename); + obj =object_new_with_type (klass->type);if (object_set_propv (obj, &local_err, vargs) <0 ) { goto error;
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v2 06/12] configure: fix pam test warning
In reply to Laurent VivierFrom: "Dr. David Alan Gilbert" <[email protected]>
The pam test generates a warning on Fedora 29 with -O3 compilation because the headers declare that the pam_conversation pointer to pam_start must be non-NULL. Change it to use the same 0 initialised structure as we actually use in qauthz.
Message-Id: <[email protected]>
--- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
@@ -2940,9 +2940,9 @@ if test "$auth_pam" != "no"; then int main(void) { const char *service_name = "qemu"; const char *user = "frank"; - const struct pam_conv *pam_conv = NULL; + const struct pam_conv pam_conv = { 0 }; pam_handle_t *pamh = NULL; - pam_start(service_name, user, pam_conv, &pamh); + pam_start(service_name, user, &pam_conv, &pamh); return 0; } EOF
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v2 07/12] Update configure
In reply to Laurent VivierFrom: Stefan Weil <[email protected]>
The last *.aml file was removed in commit 13b1881aacc7e5018773bd545bbaf8d5476699ee.
Message-Id: <[email protected]>
--- configure | 1 - 1 file changed, 1 deletion(-)
configure +0 -1
@@ -7880,7 +7880,6 @@ LINKS="$LINKS python" for bios_file in \ $source_path/pc-bios/*.bin \ $source_path/pc-bios/*.lid \ - $source_path/pc-bios/*.aml \ $source_path/pc-bios/*.rom \ $source_path/pc-bios/*.dtb \ $source_path/pc-bios/*.img \
Signature · 1 line
2.20.1
[Qemu-devel] [PULL v2 04/12] doc: fix the configuration path
In reply to Laurent VivierFrom: Marc-André Lureau <[email protected]>
Use a CONFDIR variable to show the configured sysconf path in the generated documentations (html, man pages etc).
Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1644985
Message-Id: <[email protected]>
--- qemu-ga.texi | 4 ++-- Makefile | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-)
qemu-ga.texi +2 -2
@@ -30,7 +30,7 @@ set user's password @end itemize qemu-ga will read a system configuration file on startup (located at -@file{/etc/qemu/qemu-ga.conf} by default), then parse remaining +@file{@value{CONFDIR}/qemu-ga.conf} by default), then parse remaining configuration options on the command line. For the same key, the last option wins, but the lists accumulate (see below for configuration file format).
@@ -58,7 +58,7 @@ file format). Enable fsfreeze hook. Accepts an optional argument that specifies script to run on freeze/thaw. Script will be called with 'freeze'/'thaw' arguments accordingly (default is - @samp{/etc/qemu/fsfreeze-hook}). If using -F with an argument, do + @samp{@value{CONFDIR}/fsfreeze-hook}). If using -F with an argument, do not follow -F with a space (for example: @samp{-F/var/run/fsfreezehook.sh}).
Makefile +6 -3
@@ -899,11 +899,14 @@ ui/shader.o: $(SRC_PATH)/ui/shader.c \ MAKEINFO=makeinfo MAKEINFOINCLUDES= -I docs -I $(<D) -I $(@D) MAKEINFOFLAGS=--no-split --number-sections $(MAKEINFOINCLUDES) -TEXI2PODFLAGS=$(MAKEINFOINCLUDES) "-DVERSION=$(VERSION)" +TEXI2PODFLAGS=$(MAKEINFOINCLUDES) -DVERSION="$(VERSION)" -DCONFDIR="$(qemu_confdir)" TEXI2PDFFLAGS=$(if $(V),,--quiet) -I $(SRC_PATH) $(MAKEINFOINCLUDES) -docs/version.texi: $(SRC_PATH)/VERSION - $(call quiet-command,echo "@set VERSION $(VERSION)" > $@,"GEN","$@") +docs/version.texi: $(SRC_PATH)/VERSION config-host.mak + $(call quiet-command,(\ + echo "@set VERSION $(VERSION)" && \ + echo "@set CONFDIR $(qemu_confdir)" \ + )> $@,"GEN","$@") %.html: %.texi docs/version.texi $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --no-headers \
Signature · 1 line
2.20.1
Quoted 46 lines · Laurent Vivier
The following changes since commit
8482ff2eb3bb95020eb2f370a9b3ea26511e41df:Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging (2019-05-02 12:04:51 +0100)
are available in the Git repository at:
git://github.com/vivier/qemu.gittags/trivial-branch-pull-requestfor you to fetch changes up to
2d2023c3b99edb33ad4bb9791f70456ea1a1c049:sockets: avoid string truncation warnings when copying UNIX path (2019-05-03 13:03:04 +0200)
----------------------------------------------------------------
Pull request trivial branch 2019-05-03----------------------------------------------------------------
Aruna Jayasena (1):
Header cleanupsDaniel P. Berrangé (1):
sockets: avoid string truncation warnings when copying UNIX pathDr. David Alan Gilbert (1):
configure: fix pam test warningMarc-André Lureau (1):
doc: fix the configuration pathPhilippe Mathieu-Daudé (3):
hw/net/pcnet: Useqemu_log_mask(GUEST_ERROR)instead of printf
Makefile: Let the 'clean' rule remove qemu-ga.exe on Windows hosts hw/sparc/leon3: Allow load of uImage firmwaresStefan Weil (1):
Update configureThomas Huth (1):
net: Print output of "-net nic, model=help" to stdout instead of
stderrWei Yang (3):
CODING_STYLE: specify the indent rule for multiline code
CODING_STYLE: indent example code as all others
qom: useobject_new_with_typeinobject_new_with_propv
Quoted 12 lines
qemu-ga.texi | 4 ++-- configure | 5 ++--- Makefile | 11 +++++---- include/exec/cpu-common.h | 3 --- hw/net/pcnet.c | 4 +++- hw/sparc/leon3.c | 4 ++++ net/net.c | 7 +++--- qom/object.c | 2 +- util/qemu-sockets.c | 12 ++++++---- CODING_STYLE | 47 +++++++++++++++++++++++++++++++++++---- 10 files changed, 74 insertions(+), 25 deletions(-)
Forget this series, the send has been aborted for an unknown reason.
Thanks,
Laurent