From 12f30833b91f80f12ba5bc86305eabec0e0e66c6 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 13:37:13 +0100 Subject: [PATCH 01/11] sh7750: Remove redundant 'struct' from MemoryRegionOps The 'struct' is not needed, and all other MemoryRegionOps don't use it. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- hw/sh7750.c | 2 +- hw/sh_intc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sh7750.c b/hw/sh7750.c index 4f4d8e7d05..e7129283d1 100644 --- a/hw/sh7750.c +++ b/hw/sh7750.c @@ -712,7 +712,7 @@ static void sh7750_mmct_write(void *opaque, target_phys_addr_t addr, } } -static const struct MemoryRegionOps sh7750_mmct_ops = { +static const MemoryRegionOps sh7750_mmct_ops = { .read = sh7750_mmct_read, .write = sh7750_mmct_write, .endianness = DEVICE_NATIVE_ENDIAN, diff --git a/hw/sh_intc.c b/hw/sh_intc.c index b24ec77582..7d31ced858 100644 --- a/hw/sh_intc.c +++ b/hw/sh_intc.c @@ -283,7 +283,7 @@ static void sh_intc_write(void *opaque, target_phys_addr_t offset, #endif } -static const struct MemoryRegionOps sh_intc_ops = { +static const MemoryRegionOps sh_intc_ops = { .read = sh_intc_read, .write = sh_intc_write, .endianness = DEVICE_NATIVE_ENDIAN, From 441dd5ebd5001deec3930273904e8079a36592ee Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 13:47:09 +0100 Subject: [PATCH 02/11] qom: Fix spelling in documentation This fixes a new spelling issue which was detected by codespell. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- include/qemu/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/object.h b/include/qemu/object.h index 69e4b7b282..dd7f3c06c8 100644 --- a/include/qemu/object.h +++ b/include/qemu/object.h @@ -288,7 +288,7 @@ struct Object * implementing an explicit class type if they are not adding additional * virtual functions. * @class_init: This function is called after all parent class initialization - * has occured to allow a class to set its default virtual method pointers. + * has occurred to allow a class to set its default virtual method pointers. * This is also the function to use to override virtual methods from a parent * class. * @class_finalize: This function is called during class destruction and is From beae9d79906c657f584f7e1e173ab8935d320969 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 13:47:10 +0100 Subject: [PATCH 03/11] qmp: Fix spelling fourty -> forty This was found by codespell. Signed-off-by: Stefan Weil Acked-by: Luiz Capitulino Signed-off-by: Stefan Hajnoczi --- test-qmp-output-visitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-qmp-output-visitor.c b/test-qmp-output-visitor.c index c94c208125..5452cd43bc 100644 --- a/test-qmp-output-visitor.c +++ b/test-qmp-output-visitor.c @@ -221,8 +221,8 @@ static void test_visitor_out_struct_nested(TestOutputVisitorData *data, QObject *obj; QDict *qdict, *dict1, *dict2, *dict3, *userdef; const char *string = "user def string"; - const char *strings[] = { "fourty two", "fourty three", "fourty four", - "fourty five" }; + const char *strings[] = { "forty two", "forty three", "forty four", + "forty five" }; ud2 = g_malloc0(sizeof(*ud2)); ud2->string0 = g_strdup(strings[0]); From 75d1234103d47e59311203bf5e73f85b2e0fd983 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 14:01:42 +0100 Subject: [PATCH 04/11] block/vmdk: Fix warning from splint (comparision of unsigned value) l1_entry_sectors will never be less than 0. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- block/vmdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vmdk.c b/block/vmdk.c index 5623ac10cd..45c003a0f1 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -453,7 +453,7 @@ static int vmdk_open_vmdk4(BlockDriverState *bs, } l1_entry_sectors = le32_to_cpu(header.num_gtes_per_gte) * le64_to_cpu(header.granularity); - if (l1_entry_sectors <= 0) { + if (l1_entry_sectors == 0) { return -EINVAL; } l1_size = (le64_to_cpu(header.capacity) + l1_entry_sectors - 1) From 1c467855da1c5568e8968fe1b9dd3b4ad9f8637a Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 14:11:46 +0100 Subject: [PATCH 05/11] Fix sign of sscanf format specifiers All values read by sscanf are unsigned, so replace %d by %u. This signed / unsigned mismatch was detected by splint. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- cursor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cursor.c b/cursor.c index efc5917029..76e262caf7 100644 --- a/cursor.c +++ b/cursor.c @@ -15,7 +15,8 @@ static QEMUCursor *cursor_parse_xpm(const char *xpm[]) uint8_t idx; /* parse header line: width, height, #colors, #chars */ - if (sscanf(xpm[line], "%d %d %d %d", &width, &height, &colors, &chars) != 4) { + if (sscanf(xpm[line], "%u %u %u %u", + &width, &height, &colors, &chars) != 4) { fprintf(stderr, "%s: header parse error: \"%s\"\n", __FUNCTION__, xpm[line]); return NULL; From ba79c88604e3b602967705a66f683ff892980111 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 14:54:17 +0100 Subject: [PATCH 06/11] libcacard: Use format specifier %u instead of %d for unsigned values splint reported warnings for those code statements. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- libcacard/vscclient.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index e317a25faf..0adae132f8 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c @@ -66,7 +66,7 @@ send_msg( qemu_mutex_lock(&write_lock); if (verbose > 10) { - printf("sending type=%d id=%d, len =%d (0x%x)\n", + printf("sending type=%d id=%u, len =%u (0x%x)\n", type, reader_id, length, length); } @@ -167,7 +167,7 @@ event_thread(void *arg) case VEVENT_READER_REMOVE: /* future, tell qemu that an old CCID reader has been removed */ if (verbose > 10) { - printf(" READER REMOVE: %d\n", reader_id); + printf(" READER REMOVE: %u\n", reader_id); } send_msg(VSC_ReaderRemove, reader_id, NULL, 0); break; @@ -178,7 +178,7 @@ event_thread(void *arg) vreader_power_on(event->reader, atr, &atr_len); /* ATR call functions as a Card Insert event */ if (verbose > 10) { - printf(" CARD INSERT %d: ", reader_id); + printf(" CARD INSERT %u: ", reader_id); print_byte_array(atr, atr_len); } send_msg(VSC_ATR, reader_id, atr, atr_len); @@ -186,7 +186,7 @@ event_thread(void *arg) case VEVENT_CARD_REMOVE: /* Card removed */ if (verbose > 10) { - printf(" CARD REMOVE %d:\n", reader_id); + printf(" CARD REMOVE %u:\n", reader_id); } send_msg(VSC_CardRemove, reader_id, NULL, 0); break; @@ -256,7 +256,7 @@ do_command(void) reader ? vreader_get_name(reader) : "invalid reader", error); } else { - printf("no reader by id %d found\n", reader_id); + printf("no reader by id %u found\n", reader_id); } } else if (strncmp(string, "remove", 6) == 0) { if (string[6] == ' ') { @@ -269,7 +269,7 @@ do_command(void) reader ? vreader_get_name(reader) : "invalid reader", error); } else { - printf("no reader by id %d found\n", reader_id); + printf("no reader by id %u found\n", reader_id); } } else if (strncmp(string, "select", 6) == 0) { if (string[6] == ' ') { @@ -280,11 +280,11 @@ do_command(void) reader = vreader_get_reader_by_id(reader_id); } if (reader) { - printf("Selecting reader %d, %s\n", reader_id, + printf("Selecting reader %u, %s\n", reader_id, vreader_get_name(reader)); default_reader_id = reader_id; } else { - printf("Reader with id %d not found\n", reader_id); + printf("Reader with id %u not found\n", reader_id); } } else if (strncmp(string, "debug", 5) == 0) { if (string[5] == ' ') { @@ -303,7 +303,7 @@ do_command(void) if (reader_id == -1) { continue; } - printf("%3d %s %s\n", reader_id, + printf("%3u %s %s\n", reader_id, vreader_card_is_present(reader) == VREADER_OK ? "CARD_PRESENT" : " ", vreader_get_name(reader)); @@ -563,7 +563,7 @@ main( mhHeader.reader_id = ntohl(mhHeader.reader_id); mhHeader.length = ntohl(mhHeader.length); if (verbose) { - printf("Header: type=%d, reader_id=%d length=%d (0x%x)\n", + printf("Header: type=%d, reader_id=%u length=%d (0x%x)\n", mhHeader.type, mhHeader.reader_id, mhHeader.length, mhHeader.length); } From 0ea5c0cdb0d87b5848cbe749598716bc62fd334a Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 25 Feb 2012 14:57:03 +0100 Subject: [PATCH 07/11] vnc: Add break statement This was not a bug, but it is not common practice to omit the break statement from the last case statement before an empty default case. Any change of the default case would introduce a bug. This was reported as a warning by splint. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- ui/vnc-enc-hextile-template.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc-enc-hextile-template.h b/ui/vnc-enc-hextile-template.h index b9f9f5ef89..a7310e1947 100644 --- a/ui/vnc-enc-hextile-template.h +++ b/ui/vnc-enc-hextile-template.h @@ -175,6 +175,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs, /* we really don't have to invalidate either the bg or fg but we've lost the old values. oh well. */ } + break; default: break; } From 93148aa5c341810b0ecefdbe4e760fddb38d9085 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 26 Feb 2012 18:46:12 +0100 Subject: [PATCH 08/11] Spelling fixes in comments (it's -> its) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * it's -> its (fixed for all files) * dont -> don't (only fixed in a line which was touched by the previous fix) * distrub -> disturb (fixed in the same line) Reviewed-by: Andreas Färber Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- configure | 2 +- hw/exynos4210_mct.c | 2 +- hw/usb-ccid.c | 2 +- include/qemu/object.h | 4 ++-- kvm-all.c | 2 +- libcacard/vscclient.c | 2 +- linux-user/signal.c | 2 +- qemu-file.h | 2 +- target-mips/op_helper.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/configure b/configure index a5eb8323e9..e19b6e3b5d 100755 --- a/configure +++ b/configure @@ -232,7 +232,7 @@ for opt do done # OS specific # Using uname is really, really broken. Once we have the right set of checks -# we can eliminate it's usage altogether +# we can eliminate its usage altogether. cc="${CC-${cross_prefix}gcc}" ar="${AR-${cross_prefix}ar}" diff --git a/hw/exynos4210_mct.c b/hw/exynos4210_mct.c index 01e3fb8a3b..7474fcf802 100644 --- a/hw/exynos4210_mct.c +++ b/hw/exynos4210_mct.c @@ -888,7 +888,7 @@ static void exynos4210_ltick_event(void *opaque) static uint64_t time2[2] = {0}; #endif - /* Call tick_timer event handler, it will update it's tcntb and icntb */ + /* Call tick_timer event handler, it will update its tcntb and icntb. */ exynos4210_ltick_timer_event(&s->tick_timer); /* get tick_timer cnt */ diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c index ce01e343c6..ced687f288 100644 --- a/hw/usb-ccid.c +++ b/hw/usb-ccid.c @@ -5,7 +5,7 @@ * * Written by Alon Levy, with contributions from Robert Relyea. * - * Based on usb-serial.c, see it's copyright and attributions below. + * Based on usb-serial.c, see its copyright and attributions below. * * This work is licensed under the terms of the GNU GPL, version 2.1 or later. * See the COPYING file in the top-level directory. diff --git a/include/qemu/object.h b/include/qemu/object.h index dd7f3c06c8..ec2d2943c2 100644 --- a/include/qemu/object.h +++ b/include/qemu/object.h @@ -124,7 +124,7 @@ typedef struct InterfaceInfo InterfaceInfo; * * Once all of the parent classes have been initialized, #TypeInfo::class_init * is called to let the class being instantiated provide default initialize for - * it's virtual functions. Here is how the above example might be modified + * its virtual functions. Here is how the above example might be modified * to introduce an overridden virtual function: * * @@ -527,7 +527,7 @@ Type type_register_static(const TypeInfo *info); * type_register: * @info: The #TypeInfo of the new type * - * Unlike type_register_static(), this call does not require @info or it's + * Unlike type_register_static(), this call does not require @info or its * string members to continue to exist after the call returns. * * Returns: 0 on failure, the new #Type on success. diff --git a/kvm-all.c b/kvm-all.c index 77eadf608f..549828ae54 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -35,7 +35,7 @@ #include #endif -/* KVM uses PAGE_SIZE in it's definition of COALESCED_MMIO_MAX */ +/* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */ #define PAGE_SIZE TARGET_PAGE_SIZE //#define DEBUG_KVM diff --git a/libcacard/vscclient.c b/libcacard/vscclient.c index 0adae132f8..b64c93dd69 100644 --- a/libcacard/vscclient.c +++ b/libcacard/vscclient.c @@ -129,7 +129,7 @@ event_thread(void *arg) vevent_delete(event); continue; } - /* this reader hasn't been told it's status from qemu yet, wait for + /* this reader hasn't been told its status from qemu yet, wait for * that status */ while (pending_reader != NULL) { qemu_cond_wait(&pending_reader_condition, &pending_reader_lock); diff --git a/linux-user/signal.c b/linux-user/signal.c index 79a39dcd7f..cefd2ff3ce 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -2700,7 +2700,7 @@ get_sigframe(struct target_sigaction *ka, CPUState *regs, size_t frame_size) sp = regs->active_tc.gpr[29]; /* - * FPU emulator may have it's own trampoline active just + * FPU emulator may have its own trampoline active just * above the user stack, 16-bytes before the next lowest * 16 byte boundary. Try to avoid trashing it. */ diff --git a/qemu-file.h b/qemu-file.h index 8da10213d9..31b83f6bb3 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -47,7 +47,7 @@ typedef int (QEMUFileGetBufferFunc)(void *opaque, uint8_t *buf, */ typedef int (QEMUFileCloseFunc)(void *opaque); -/* Called to determine if the file has exceeded it's bandwidth allocation. The +/* Called to determine if the file has exceeded its bandwidth allocation. The * bandwidth capping is a soft limit, not a hard limit. */ typedef int (QEMUFileRateLimit)(void *opaque); diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index c51b9cb6f0..87e9799ba3 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -1930,7 +1930,7 @@ target_ulong helper_evpe(void) do { if (other_cpu != env - /* If the VPE is WFI, dont distrub it's sleep. */ + /* If the VPE is WFI, don't disturb its sleep. */ && !mips_vpe_is_wfi(other_cpu)) { /* Enable the VPE. */ other_cpu->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP); From 4a84ebe6a6b64c823e33876e3cda3c0813b2e1bb Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 27 Feb 2012 22:57:24 +0100 Subject: [PATCH 09/11] libcacard: Spelling and grammar fixes in documentation * it's -> its * it's -> it is (that's no fix, but makes future checks easier) * this functions -> this function * replacable -> replaceable * reader's -> readers * logins into -> logs into v2: Also replace 'aid' by 'AID' (thanks to Peter Maydell for this hint). v3: Fix sentence (contributed by Alon Levy / Robert Relyea). Cc: Alon Levy Cc: Robert Relyea Cc: Peter Maydell Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- docs/libcacard.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/libcacard.txt b/docs/libcacard.txt index f7d7519f3a..8db421d3a9 100644 --- a/docs/libcacard.txt +++ b/docs/libcacard.txt @@ -10,7 +10,7 @@ such as signing, card removal/insertion, etc. are mapped to real, physical cards which are shared with the client machine the emulator is running on, or the cards could be pure software constructs. -The emulator is structured to allow multiple replacable or additional pieces, +The emulator is structured to allow multiple replaceable or additional pieces, so it can be easily modified for future requirements. The primary envisioned modifications are: @@ -32,7 +32,7 @@ be emulated as well, including PIV, newer versions of CAC, PKCS #15, etc. -------------------- Replacing the Socket Based Virtual Reader Interface. -The current implementation contains a replacable module vscclient.c. The +The current implementation contains a replaceable module vscclient.c. The current vscclient.c implements a sockets interface to the virtual ccid reader on the guest. CCID commands that are pertinent to emulation are passed across the socket, and their responses are passed back along that same socket. @@ -42,7 +42,7 @@ implements a program with a main entry. It also handles argument parsing for the emulator. An application that wants to use the virtual reader can replace vscclient.c -with it's own implementation that connects to it's own CCID reader. The calls +with its own implementation that connects to its own CCID reader. The calls that the CCID reader can call are: VReaderList * vreader_get_reader_list(); @@ -72,12 +72,12 @@ that the CCID reader can call are: VReader * vreader_list_get_reader(VReaderListEntry *) This function returns the reader stored in the reader List entry. Caller gets - a new reference to a reader. The caller must free it's reference when it is + a new reference to a reader. The caller must free its reference when it is finished with vreader_free(). void vreader_free(VReader *reader); - This function frees a reference to a reader. Reader's are reference counted + This function frees a reference to a reader. Readers are reference counted and are automatically deleted when the last reference is freed. void vreader_list_delete(VReaderList *list); @@ -87,7 +87,7 @@ that the CCID reader can call are: VReaderStatus vreader_power_on(VReader *reader, char *atr, int *len); - This functions simulates a card power on. Virtual cards do not care about + This function simulates a card power on. A virtual card does not care about the actual voltage and other physical parameters, but it does care that the card is actually on or off. Cycling the card causes the card to reset. If the caller provides enough space, vreader_power_on will return the ATR of @@ -104,7 +104,7 @@ that the CCID reader can call are: unsigned char *receive_buf, int receive_buf_len); - This functions send a raw apdu to a card and returns the card's response. + This function sends a raw apdu to a card and returns the card's response. The CCID front end should return the response back. Most of the emulation is driven from these APDUs. @@ -217,10 +217,10 @@ the card using the following functions: VCardStatus vcard_add_applet(VCard *card, VCardApplet *applet); Add an applet onto the list of applets attached to the card. Once an applet - has been added, it can be selected by it's aid, and then commands will be - routed to it VCardProcessAPDU function. This function adopts the applet the - passed int applet. Note: 2 applets with the same AID should not be added to - the same card. It's permissible to add more than one applet. Multiple applets + has been added, it can be selected by its AID, and then commands will be + routed to it VCardProcessAPDU function. This function adopts the applet that + is passed into it. Note: 2 applets with the same AID should not be added to + the same card. It is permissible to add more than one applet. Multiple applets may have the same VCardPRocessAPDU entry point. The certs and keys should be attached to private data associated with one or @@ -335,7 +335,7 @@ and applet. VCard7816Status vcard_emul_login(VCard *card, unsigned char *pin, int pin_len); - This function logins into the card and return the standard 7816 status + This function logs into the card and returns the standard 7816 status word depending on the success or failure of the call. void vcard_emul_delete_key(VCardKey *key); @@ -424,7 +424,7 @@ functions: cert_len, and keys are all arrays of length cert_count. These are the the same of the parameters xxxx_card_init() accepts. - Finally the card is associated with it's reader by the call: + Finally the card is associated with its reader by the call: VReaderStatus vreader_insert_card(VReader *vreader, VCard *vcard); From 82246040eaaeec8c53e87b2beff5488f6078bf35 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 5 Mar 2012 07:22:31 +0100 Subject: [PATCH 10/11] osdep: Remove local definition of macro offsetof The macro offsetof is defined in stddef.h. It is conforming to the standards C89, C99 and POSIX.1-2001 (see man page), so it is a sufficiently old standard. Therefore chances are very high that QEMU never needs a local definition of this macro. osdep.h already includes stddef.h, so this patch simply removes the unneeded code from the files configure and osdep.h. If we ever need the local definition again, it should be added to compiler.h (the macro is usually provided with the compiler, it is not OS specific). Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- configure | 14 -------------- osdep.h | 3 --- 2 files changed, 17 deletions(-) diff --git a/configure b/configure index e19b6e3b5d..ed3d907911 100755 --- a/configure +++ b/configure @@ -2524,17 +2524,6 @@ if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \ fi ########################################## -# check if the compiler defines offsetof - -need_offsetof=yes -cat > $TMPC << EOF -#include -int main(void) { struct s { int f; }; return offsetof(struct s, f); } -EOF -if compile_prog "" "" ; then - need_offsetof=no -fi - # spice probe if test "$spice" != "no" ; then cat > $TMPC << EOF @@ -3199,9 +3188,6 @@ fi if test "$tcg_interpreter" = "yes" ; then echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak fi -if test "$need_offsetof" = "yes" ; then - echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak -fi if test "$fdatasync" = "yes" ; then echo "CONFIG_FDATASYNC=y" >> $config_host_mak fi diff --git a/osdep.h b/osdep.h index 432b91ea72..0350383711 100644 --- a/osdep.h +++ b/osdep.h @@ -26,9 +26,6 @@ #define unlikely(x) __builtin_expect(!!(x), 0) #endif -#ifdef CONFIG_NEED_OFFSETOF -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *) 0)->MEMBER) -#endif #ifndef container_of #define container_of(ptr, type, member) ({ \ const typeof(((type *) 0)->member) *__mptr = (ptr); \ From 979ae168e5fac830fcf8ca63fed732051af0611a Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Wed, 7 Mar 2012 12:16:29 +0000 Subject: [PATCH 11/11] configure: Quote the configure args printed in config.log Use the same mechanism we use for printing the configure command line to config-host.mak to print it to config.log. This fixes a bug where the config.log version didn't quote arguments with spaces. Signed-off-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ed3d907911..66a65d9d45 100755 --- a/configure +++ b/configure @@ -22,7 +22,9 @@ rm -f config.log # Print a helpful header at the top of config.log echo "# QEMU configure log $(date)" >> config.log -echo "# produced by $0 $*" >> config.log +printf "# Configured with:" >> config.log +printf " '%s'" "$0" "$@" >> config.log +echo >> config.log echo "#" >> config.log compile_object() {