Skip to contentSkip to conversation

Trivial patches for 11 to 17 November 2011

GIT PULL New Stefan Hajnoczi 2 participants 7 messages Nov 17, 2011 – Nov 22, 2011

lore
Share & tools
lore
#0 lore raw

These bug fixes and documentation fixes are suitable for 1.0. The purely internal trivial patches are being queued up for 1.1 in the trivial-patches-next tree.

The following changes since commit 3f5bd4e1b874590d3d76e031530799a4610da6dc:

Update version to 1.0-rc2 (2011-11-14 11:26:32 -0600)

are available in the git repository at:
ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Markus Armbruster (1):
monitor: Fix file_completion() to check for stat() failure

Matthias Brugger (1):
Fixing some spelling in docs/libcacard.txt

Stefan Weil (2):
Fix spelling in documentation and comments (similiar -> similar) Fix some spelling bugs in documentation and comments

Vagrant Cascadian (1):

      Fix typo: runnning -> running
 block-migration.c      |    2 +-
 docs/libcacard.txt     |   20 ++++++++++----------
 docs/qapi-code-gen.txt |    2 +-
 hw/mips_mipssim.c      |    2 +-
 monitor.c              |    4 ++--
 qemu-doc.texi          |    4 ++--
 target-i386/kvm.c      |    2 +-
 7 files changed, 18 insertions(+), 18 deletions(-)
Signature · 1 line
1.7.7.1
#1 lore raw

PATCH 1/5 Fix spelling in documentation and comments (similiar -> similar)

From: Stefan Weil <[email protected]>

This bug was detected by codespell.
In mips_mipssim.c a grammatical error was fixed, too.

---
 docs/libcacard.txt |    2 +-
 hw/mips_mipssim.c  |    2 +-
 qemu-doc.texi      |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
docs/libcacard.txt +1 -1
index 5dee6fa..ae010d2 100644
@@ -399,7 +399,7 @@ functions:
       This function will automatically generate the appropriate new reader
       events and add the reader to the list.
 
-  To create a new card, the virtual card emulator will call a similiar
+  To create a new card, the virtual card emulator will call a similar
   function.
 
            VCard *vcard_new(VCardEmul *card_emul,
hw/mips_mipssim.c +1 -1
index 7407158..b56cba6 100644
@@ -1,7 +1,7 @@
 /*
  * QEMU/mipssim emulation
  *
- * Emulates a very simple machine model similiar to the one use by the
+ * Emulates a very simple machine model similar to the one used by the
  * proprietary MIPS emulator.
  * 
  * Copyright (c) 2007 Thiemo Seufer
qemu-doc.texi +2 -2
index 149e9bd..154b82d 100644
@@ -1749,7 +1749,7 @@ PC Keyboard
 IDE controller
 @end itemize
 
-The mipssim pseudo board emulation provides an environment similiar
+The mipssim pseudo board emulation provides an environment similar
 to what the proprietary MIPS emulator uses for running Linux.
 It supports:
 
@@ -2141,7 +2141,7 @@ Xtensa emulator pseudo board "sim"
 Avnet LX60/LX110/LX200 board
 @end itemize
 
-The sim pseudo board emulation provides an environment similiar
+The sim pseudo board emulation provides an environment similar
 to one provided by the proprietary Tensilica ISS.
 It supports:
 
Signature · 1 line
1.7.7.1
#2 lore raw

PATCH 2/5 Fix some spelling bugs in documentation and comments

In reply to Stefan Hajnoczi

From: Stefan Weil <[email protected]>

These errors were detected by codespell:

remaing -> remaining
soley -> solely
virutal -> virtual
seperate -> separate

libcacard.txt still needs some more patches.

---
 block-migration.c      |    2 +-
 docs/libcacard.txt     |    6 +++---
 docs/qapi-code-gen.txt |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
block-migration.c +1 -1
index 0bff075..5f104864 100644
@@ -521,7 +521,7 @@ static int is_stage2_completed(void)
 
         if ((remaining_dirty / bwidth) <=
             migrate_max_downtime()) {
-            /* finish stage2 because we think that we can finish remaing work
+            /* finish stage2 because we think that we can finish remaining work
                below max_downtime */
 
             return 1;
docs/libcacard.txt +3 -3
index ae010d2..296706a 100644
@@ -281,7 +281,7 @@ create card responses.
         VCardResponse *vcard_make_response(VCard7816Status status);
 
     This is the most basic function to get a response. This function will
-    return a response the consists soley one 2 byte status code. If that status
+    return a response the consists solely one 2 byte status code. If that status
     code is defined in card_7816t.h, then this function is guarrenteed to
     return a response with that status. If a cart type specific status code
     is passed and vcard_make_response fails to allocate the appropriate memory
@@ -327,7 +327,7 @@ and applet.
 
         int vcard_emul_get_login_count(VCard *card);
 
-    This function returns the the number of remaing login attempts for this
+    This function returns the the number of remaining login attempts for this
     card. If the card emulator does not know, or the card does not have a
     way of giving this information, this function returns -1.
 
@@ -373,7 +373,7 @@ functions:
 
   The options structure is built by another function in the virtual card
   interface where a string of virtual card emulator specific strings are
-  mapped to the options. The actual structure is defined by the virutal card
+  mapped to the options. The actual structure is defined by the virtual card
   emulator and is used to determine the configuration of soft cards, or to
   determine which physical cards to present to the guest.
 
docs/qapi-code-gen.txt +1 -1
index c0a9325..5831e37 100644
@@ -14,7 +14,7 @@ To map QMP-defined interfaces to the native C QAPI implementations,
 a JSON-based schema is used to define types and function
 signatures, and a set of scripts is used to generate types/signatures,
 and marshaling/dispatch code. The QEMU Guest Agent also uses these
-scripts, paired with a seperate schema, to generate
+scripts, paired with a separate schema, to generate
 marshaling/dispatch code for the guest agent server running in the
 guest.
 
Signature · 1 line
1.7.7.1
#3 lore raw

PATCH 3/5 Fix typo: runnning -> running

In reply to Stefan Hajnoczi

From: Vagrant Cascadian <[email protected]>

One n too many for running, need we say more.

---
 target-i386/kvm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-i386/kvm.c +1 -1
index ddd115c..5bfc21f 100644
@@ -1845,7 +1845,7 @@ int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
                 code);
         if (host_supports_vmx() && code == VMX_INVALID_GUEST_STATE) {
             fprintf(stderr,
-                    "\nIf you're runnning a guest on an Intel machine without "
+                    "\nIf you're running a guest on an Intel machine without "
                         "unrestricted mode\n"
                     "support, the failure can be most likely due to the guest "
                         "entering an invalid\n"
Signature · 1 line
1.7.7.1
#4 lore raw

PATCH 4/5 Fixing some spelling in docs/libcacard.txt

In reply to Stefan Hajnoczi

From: Matthias Brugger <[email protected]>

---
 docs/libcacard.txt |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
docs/libcacard.txt +6 -6
index 296706a..f7d7519 100644
@@ -170,7 +170,7 @@ public entry point:
                                int cert_count);
 
   The parameters for this are:
-  card       - the virtual card structure which will prepresent this card.
+  card       - the virtual card structure which will represent this card.
   flags      - option flags that may be specific to this card type.
   cert       - array of binary certificates.
   cert_len   - array of lengths of each of the certificates specified in cert.
@@ -179,7 +179,7 @@ public entry point:
   cert_count - number of entries in cert, cert_len, and key arrays.
 
   Any cert, cert_len, or key with the same index are matching sets. That is
-  cert[0] is cert_len[0] long and has the corresponsing private key of key[0].
+  cert[0] is cert_len[0] long and has the corresponding private key of key[0].
 
 The card type emulator is expected to own the VCardKeys, but it should copy
 any raw cert data it wants to save. It can create new applets and add them to
@@ -261,7 +261,7 @@ Prior to processing calling the card type emulator's VCardProcessAPDU function,
    apdu->a_Le   - The expected length of any returned data.
    apdu->a_cla  - The raw apdu class.
    apdu->a_channel - The channel (decoded from the class).
-   apdu->a_secure_messaging_type - The decoded secure messagin type
+   apdu->a_secure_messaging_type - The decoded secure messaging type
                                    (from class).
    apdu->a_type - The decode class type.
    apdu->a_gen_type - the generic class type (7816, PROPRIETARY, RFU, PTS).
@@ -273,7 +273,7 @@ Creating a Response --
 
 The expected result of any APDU call is a response. The card type emulator must
 set *response with an appropriate VCardResponse value if it returns VCARD_DONE.
-Reponses could be as simple as returning a 2 byte status word response, to as
+Responses could be as simple as returning a 2 byte status word response, to as
 complex as returning a block of data along with a 2 byte response. Which is
 returned will depend on the semantics of the APDU. The following functions will
 create card responses.
@@ -282,12 +282,12 @@ create card responses.
 
     This is the most basic function to get a response. This function will
     return a response the consists solely one 2 byte status code. If that status
-    code is defined in card_7816t.h, then this function is guarrenteed to
+    code is defined in card_7816t.h, then this function is guaranteed to
     return a response with that status. If a cart type specific status code
     is passed and vcard_make_response fails to allocate the appropriate memory
     for that response, then vcard_make_response will return a VCardResponse
     of VCARD7816_STATUS_EXC_ERROR_MEMORY. In any case, this function is
-    guarrenteed to return a valid VCardResponse.
+    guaranteed to return a valid VCardResponse.
 
         VCardResponse *vcard_response_new(unsigned char *buf, int len,
                                           VCard7816Status status);
Signature · 1 line
1.7.7.1
#5 lore raw

PATCH 5/5 monitor: Fix file_completion() to check for stat() failure

In reply to Stefan Hajnoczi

From: Markus Armbruster <[email protected]>

stat() can fail for a file name just read with readdir(). Easiest way to trigger is a dangling symbolic link --- look ma, no race! When it fails, file_completion() uses sb.st_mode uninitialized. If the directory bit happens to be set, it appends a "/" to the completed name.

---
 monitor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
monitor.c +2 -2
index 5ea35de..1be222e 100644
@@ -4207,9 +4207,9 @@ static void file_completion(const char *input)
             /* stat the file to find out if it's a directory.
              * In that case add a slash to speed up typing long paths
              */
-            stat(file, &sb);
-            if(S_ISDIR(sb.st_mode))
+            if (stat(file, &sb) == 0 && S_ISDIR(sb.st_mode)) {
                 pstrcat(file, sizeof(file), "/");
+            }
             readline_add_completion(cur_mon->rs, file);
         }
     }
Signature · 1 line
1.7.7.1
#6 lore raw
In reply to Stefan Hajnoczi
Quoted 7 lines · Stefan Hajnoczi

These bug fixes and documentation fixes are suitable for 1.0. The purely internal trivial patches are being queued up for 1.1 in the trivial-patches-next tree.

The following changes since commit 3f5bd4e1b874590d3d76e031530799a4610da6dc:

   Update version to 1.0-rc2 (2011-11-14 11:26:32 -0600)

Pulled. Thanks.

Regards,

Anthony Liguori

Quoted 26 lines

are available in the git repository at:
ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches

Markus Armbruster (1):
monitor: Fix file_completion() to check for stat() failure

Matthias Brugger (1):
Fixing some spelling in docs/libcacard.txt

Stefan Weil (2):
Fix spelling in documentation and comments (similiar -> similar) Fix some spelling bugs in documentation and comments

Vagrant Cascadian (1):

       Fix typo: runnning ->  running
  block-migration.c      |    2 +-
  docs/libcacard.txt     |   20 ++++++++++----------
  docs/qapi-code-gen.txt |    2 +-
  hw/mips_mipssim.c      |    2 +-
  monitor.c              |    4 ++--
  qemu-doc.texi          |    4 ++--
  target-i386/kvm.c      |    2 +-
  7 files changed, 18 insertions(+), 18 deletions(-)