qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011
@ 2011-06-24 16:56 Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 01/13] configure: Don't create symlinks to nonexistent targets Stefan Hajnoczi
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi

(I currently do not have access to my <stefanha@linux.vnet.ibm.com> email
address.)

The following changes since commit 744d3644181ddb16ef5944a0f9217e46961c8c84:

  coreaudio: Fix OSStatus format specifier (2011-06-23 18:56:58 +0400)

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

Jan Kiszka (2):
      Align dummy display to fixed-size active console
      Do not include compatfd for WIN32

Juan Quintela (1):
      exec: last_first_tb was only used in !ONLY_USER case

Marc-Antoine Perennou (1):
      qemu-kvm: fix pulseaudio detection in configure

Markus Armbruster (5):
      sheepdog: qemu_bh_new() can't return null pointer, drop check
      Strip trailing '\n' from error_report()'s first argument
      qemu-img: Don't prepend qemu-img to error messages twice.
      Spell "unkown" correctly in error_report() arguments
      blockdev: Put space after comma in error message

Matthew Fernandez (1):
      Fix comment typos in hw/armv7m.c

Peter Maydell (2):
      configure: Don't create symlinks to nonexistent targets
      MAINTAINERS: Fix typo in email address

Stefan Weil (1):
      w32: Remove redundant definitions of PRI*64

 MAINTAINERS             |    2 +-
 block-migration.c       |    2 +-
 block/qcow2.c           |    2 +-
 block/sheepdog.c        |   90 ++++++++++++++++++++++-------------------------
 blockdev.c              |    2 +-
 configure               |    6 ++-
 console.c               |    9 ++++-
 cpus.c                  |    3 ++
 exec.c                  |   10 ++++--
 hw/armv7m.c             |    4 +-
 hw/lm32_sys.c           |    2 +-
 hw/lm32_timer.c         |    4 +-
 hw/lm32_uart.c          |    4 +-
 hw/milkymist-ac97.c     |    4 +-
 hw/milkymist-memcard.c  |    4 +-
 hw/milkymist-minimac2.c |    6 ++--
 hw/milkymist-pfpu.c     |    4 +-
 hw/milkymist-softusb.c  |    8 ++--
 hw/milkymist-sysctl.c   |    4 +-
 hw/milkymist-tmu2.c     |    8 ++--
 hw/qdev.c               |    2 +-
 hw/strongarm.c          |    4 +-
 hw/usb-ccid.c           |    2 +-
 hw/virtio-serial-bus.c  |   10 +++---
 hw/virtio.c             |    4 +-
 net.c                   |    2 +-
 net/socket.c            |    6 ++--
 qemu-common.h           |    5 ---
 qemu-error.c            |    2 +
 qemu-img.c              |   12 +++---
 30 files changed, 117 insertions(+), 110 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 01/13] configure: Don't create symlinks to nonexistent targets
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 02/13] Align dummy display to fixed-size active console Stefan Hajnoczi
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Anthony Liguori, Stefan Hajnoczi

From: Peter Maydell <peter.maydell@linaro.org>

When we create the symlinks to source tree files, don't create them
if the file is not actually present in the source tree; this will
happen if the file is in a git submodule that wasn't checked out.

This also avoids the odd effect where an in-source-tree configure
will end up creating the missing file as a symlink to itself.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 configure |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 856b41e..4fa9a57 100755
--- a/configure
+++ b/configure
@@ -3479,7 +3479,9 @@ for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.rom $source_p
 done
 mkdir -p $DIRS
 for f in $FILES ; do
-    test -e $f || symlink $source_path/$f $f
+    if [ -e "$source_path/$f" ] && ! [ -e "$f" ]; then
+        symlink "$source_path/$f" "$f"
+    fi
 done
 
 # temporary config to build submodules
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 02/13] Align dummy display to fixed-size active console
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 01/13] configure: Don't create symlinks to nonexistent targets Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 03/13] sheepdog: qemu_bh_new() can't return null pointer, drop check Stefan Hajnoczi
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Anthony Liguori, Stefan Hajnoczi

From: Jan Kiszka <jan.kiszka@siemens.com>

This fixes e.g. '-vga none -monitor vc:120Cx50C'.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 console.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/console.c b/console.c
index 9c6addf..acd8ca1 100644
--- a/console.c
+++ b/console.c
@@ -1349,8 +1349,15 @@ static struct DisplayAllocator default_allocator = {
 static void dumb_display_init(void)
 {
     DisplayState *ds = qemu_mallocz(sizeof(DisplayState));
+    int width = 640;
+    int height = 480;
+
     ds->allocator = &default_allocator;
-    ds->surface = qemu_create_displaysurface(ds, 640, 480);
+    if (is_fixedsize_console()) {
+        width = active_console->g_width;
+        height = active_console->g_height;
+    }
+    ds->surface = qemu_create_displaysurface(ds, width, height);
     register_displaystate(ds);
 }
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 03/13] sheepdog: qemu_bh_new() can't return null pointer, drop check
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 01/13] configure: Don't create symlinks to nonexistent targets Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 02/13] Align dummy display to fixed-size active console Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 04/13] Strip trailing '\n' from error_report()'s first argument Stefan Hajnoczi
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 block/sheepdog.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/block/sheepdog.c b/block/sheepdog.c
index 0392ca8..2180299 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -449,13 +449,7 @@ static int sd_schedule_bh(QEMUBHFunc *cb, SheepdogAIOCB *acb)
     }
 
     acb->bh = qemu_bh_new(cb, acb);
-    if (!acb->bh) {
-        error_report("oom: %d %d\n", acb->aiocb_type, acb->aiocb_type);
-        return -EIO;
-    }
-
     qemu_bh_schedule(acb->bh);
-
     return 0;
 }
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 04/13] Strip trailing '\n' from error_report()'s first argument
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (2 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 03/13] sheepdog: qemu_bh_new() can't return null pointer, drop check Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 05/13] qemu-img: Don't prepend qemu-img to error messages twice Stefan Hajnoczi
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi

From: Markus Armbruster <armbru@redhat.com>

error_report() prepends location, and appends a newline.  The message
constructed from the arguments should not contain a newline.  Fix the
obvious offenders.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 block-migration.c       |    2 +-
 block/qcow2.c           |    2 +-
 block/sheepdog.c        |   84 +++++++++++++++++++++++-----------------------
 hw/milkymist-minimac2.c |    6 ++--
 hw/milkymist-pfpu.c     |    4 +-
 hw/milkymist-softusb.c  |    8 ++--
 hw/milkymist-tmu2.c     |    8 ++--
 hw/qdev.c               |    2 +-
 hw/strongarm.c          |    4 +-
 hw/usb-ccid.c           |    2 +-
 hw/virtio-serial-bus.c  |   10 +++---
 hw/virtio.c             |    4 +-
 net.c                   |    2 +-
 net/socket.c            |    6 ++--
 qemu-error.c            |    2 +
 qemu-img.c              |    4 +-
 16 files changed, 76 insertions(+), 74 deletions(-)

diff --git a/block-migration.c b/block-migration.c
index 8d06a23..0936c7d 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -671,7 +671,7 @@ static int block_load(QEMUFile *f, void *opaque, int version_id)
                 bs_prev = bs;
                 total_sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;
                 if (total_sectors <= 0) {
-                    error_report("Error getting length of block device %s\n",
+                    error_report("Error getting length of block device %s",
                                  device_name);
                     return -EINVAL;
                 }
diff --git a/block/qcow2.c b/block/qcow2.c
index 2c51e7c..48e1b95 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -936,7 +936,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
         (1 << cluster_bits) != cluster_size)
     {
         error_report(
-            "Cluster size must be a power of two between %d and %dk\n",
+            "Cluster size must be a power of two between %d and %dk",
             1 << MIN_CLUSTER_BITS, 1 << (MAX_CLUSTER_BITS - 10));
         return -EINVAL;
     }
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 2180299..80d106c 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -444,7 +444,7 @@ static SheepdogAIOCB *sd_aio_setup(BlockDriverState *bs, QEMUIOVector *qiov,
 static int sd_schedule_bh(QEMUBHFunc *cb, SheepdogAIOCB *acb)
 {
     if (acb->bh) {
-        error_report("bug: %d %d\n", acb->aiocb_type, acb->aiocb_type);
+        error_report("bug: %d %d", acb->aiocb_type, acb->aiocb_type);
         return -EIO;
     }
 
@@ -592,7 +592,7 @@ static int connect_to_sdog(const char *addr, const char *port)
 
     ret = getaddrinfo(addr, port, &hints, &res0);
     if (ret) {
-        error_report("unable to get address info %s, %s\n",
+        error_report("unable to get address info %s, %s",
                      addr, strerror(errno));
         return -1;
     }
@@ -622,7 +622,7 @@ static int connect_to_sdog(const char *addr, const char *port)
         goto success;
     }
     fd = -1;
-    error_report("failed connect to %s:%s\n", addr, port);
+    error_report("failed connect to %s:%s", addr, port);
 success:
     freeaddrinfo(res0);
     return fd;
@@ -638,7 +638,7 @@ again:
         if (errno == EINTR || errno == EAGAIN) {
             goto again;
         }
-        error_report("failed to recv a rsp, %s\n", strerror(errno));
+        error_report("failed to recv a rsp, %s", strerror(errno));
         return 1;
     }
 
@@ -697,7 +697,7 @@ static int send_req(int sockfd, SheepdogReq *hdr, void *data,
 
     ret = do_writev(sockfd, iov, sizeof(*hdr) + *wlen, 0);
     if (ret) {
-        error_report("failed to send a req, %s\n", strerror(errno));
+        error_report("failed to send a req, %s", strerror(errno));
         ret = -1;
     }
 
@@ -717,7 +717,7 @@ static int do_req(int sockfd, SheepdogReq *hdr, void *data,
 
     ret = do_read(sockfd, hdr, sizeof(*hdr));
     if (ret) {
-        error_report("failed to get a rsp, %s\n", strerror(errno));
+        error_report("failed to get a rsp, %s", strerror(errno));
         ret = -1;
         goto out;
     }
@@ -729,7 +729,7 @@ static int do_req(int sockfd, SheepdogReq *hdr, void *data,
     if (*rlen) {
         ret = do_read(sockfd, data, *rlen);
         if (ret) {
-            error_report("failed to get the data, %s\n", strerror(errno));
+            error_report("failed to get the data, %s", strerror(errno));
             ret = -1;
             goto out;
         }
@@ -766,7 +766,7 @@ static void send_pending_req(BDRVSheepdogState *s, uint64_t oid, uint32_t id)
         ret = add_aio_request(s, aio_req, acb->qiov->iov,
                               acb->qiov->niov, 0, acb->aiocb_type);
         if (ret < 0) {
-            error_report("add_aio_request is failed\n");
+            error_report("add_aio_request is failed");
             free_aio_req(s, aio_req);
             if (QLIST_EMPTY(&acb->aioreq_head)) {
                 sd_finish_aiocb(acb);
@@ -799,7 +799,7 @@ static void aio_read_response(void *opaque)
     /* read a header */
     ret = do_read(fd, &rsp, sizeof(rsp));
     if (ret) {
-        error_report("failed to get the header, %s\n", strerror(errno));
+        error_report("failed to get the header, %s", strerror(errno));
         return;
     }
 
@@ -810,7 +810,7 @@ static void aio_read_response(void *opaque)
         }
     }
     if (!aio_req) {
-        error_report("cannot find aio_req %x\n", rsp.id);
+        error_report("cannot find aio_req %x", rsp.id);
         return;
     }
 
@@ -846,7 +846,7 @@ static void aio_read_response(void *opaque)
         ret = do_readv(fd, acb->qiov->iov, rsp.data_length,
                        aio_req->iov_offset);
         if (ret) {
-            error_report("failed to get the data, %s\n", strerror(errno));
+            error_report("failed to get the data, %s", strerror(errno));
             return;
         }
         break;
@@ -854,7 +854,7 @@ static void aio_read_response(void *opaque)
 
     if (rsp.result != SD_RES_SUCCESS) {
         acb->ret = -EIO;
-        error_report("%s\n", sd_strerror(rsp.result));
+        error_report("%s", sd_strerror(rsp.result));
     }
 
     rest = free_aio_req(s, aio_req);
@@ -911,7 +911,7 @@ static int get_sheep_fd(BDRVSheepdogState *s)
 
     fd = connect_to_sdog(s->addr, s->port);
     if (fd < 0) {
-        error_report("%s\n", strerror(errno));
+        error_report("%s", strerror(errno));
         return -1;
     }
 
@@ -919,7 +919,7 @@ static int get_sheep_fd(BDRVSheepdogState *s)
 
     ret = set_nodelay(fd);
     if (ret) {
-        error_report("%s\n", strerror(errno));
+        error_report("%s", strerror(errno));
         closesocket(fd);
         return -1;
     }
@@ -1035,7 +1035,7 @@ static int find_vdi_name(BDRVSheepdogState *s, char *filename, uint32_t snapid,
     }
 
     if (rsp->result != SD_RES_SUCCESS) {
-        error_report("cannot get vdi info, %s, %s %d %s\n",
+        error_report("cannot get vdi info, %s, %s %d %s",
                      sd_strerror(rsp->result), filename, snapid, tag);
         ret = -1;
         goto out;
@@ -1063,7 +1063,7 @@ static int add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req,
     uint64_t old_oid = aio_req->base_oid;
 
     if (!nr_copies) {
-        error_report("bug\n");
+        error_report("bug");
     }
 
     memset(&hdr, 0, sizeof(hdr));
@@ -1096,14 +1096,14 @@ static int add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req,
     /* send a header */
     ret = do_write(s->fd, &hdr, sizeof(hdr));
     if (ret) {
-        error_report("failed to send a req, %s\n", strerror(errno));
+        error_report("failed to send a req, %s", strerror(errno));
         return -EIO;
     }
 
     if (wlen) {
         ret = do_writev(s->fd, iov, wlen, aio_req->iov_offset);
         if (ret) {
-            error_report("failed to send a data, %s\n", strerror(errno));
+            error_report("failed to send a data, %s", strerror(errno));
             return -EIO;
         }
     }
@@ -1145,7 +1145,7 @@ static int read_write_object(int fd, char *buf, uint64_t oid, int copies,
 
     ret = do_req(fd, (SheepdogReq *)&hdr, buf, &wlen, &rlen);
     if (ret) {
-        error_report("failed to send a request to the sheep\n");
+        error_report("failed to send a request to the sheep");
         return -1;
     }
 
@@ -1153,7 +1153,7 @@ static int read_write_object(int fd, char *buf, uint64_t oid, int copies,
     case SD_RES_SUCCESS:
         return 0;
     default:
-        error_report("%s\n", sd_strerror(rsp->result));
+        error_report("%s", sd_strerror(rsp->result));
         return -1;
     }
 }
@@ -1206,7 +1206,7 @@ static int sd_open(BlockDriverState *bs, const char *filename, int flags)
 
     fd = connect_to_sdog(s->addr, s->port);
     if (fd < 0) {
-        error_report("failed to connect\n");
+        error_report("failed to connect");
         goto out;
     }
 
@@ -1275,7 +1275,7 @@ static int do_sd_create(char *filename, int64_t vdi_size,
     }
 
     if (rsp->result != SD_RES_SUCCESS) {
-        error_report("%s, %s\n", sd_strerror(rsp->result), filename);
+        error_report("%s, %s", sd_strerror(rsp->result), filename);
         return -EIO;
     }
 
@@ -1302,7 +1302,7 @@ static int sd_create(const char *filename, QEMUOptionParameter *options)
     memset(vdi, 0, sizeof(vdi));
     memset(tag, 0, sizeof(tag));
     if (parse_vdiname(&s, filename, vdi, &snapid, tag) < 0) {
-        error_report("invalid filename\n");
+        error_report("invalid filename");
         return -EINVAL;
     }
 
@@ -1316,7 +1316,7 @@ static int sd_create(const char *filename, QEMUOptionParameter *options)
     }
 
     if (vdi_size > SD_MAX_VDI_SIZE) {
-        error_report("too big image size\n");
+        error_report("too big image size");
         return -EINVAL;
     }
 
@@ -1328,7 +1328,7 @@ static int sd_create(const char *filename, QEMUOptionParameter *options)
         /* Currently, only Sheepdog backing image is supported. */
         drv = bdrv_find_protocol(backing_file);
         if (!drv || strcmp(drv->protocol_name, "sheepdog") != 0) {
-            error_report("backing_file must be a sheepdog image\n");
+            error_report("backing_file must be a sheepdog image");
             return -EINVAL;
         }
 
@@ -1339,7 +1339,7 @@ static int sd_create(const char *filename, QEMUOptionParameter *options)
         s = bs->opaque;
 
         if (!is_snapshot(&s->inode)) {
-            error_report("cannot clone from a non snapshot vdi\n");
+            error_report("cannot clone from a non snapshot vdi");
             bdrv_delete(bs);
             return -EINVAL;
         }
@@ -1379,7 +1379,7 @@ static void sd_close(BlockDriverState *bs)
 
     if (!ret && rsp->result != SD_RES_SUCCESS &&
         rsp->result != SD_RES_VDI_NOT_LOCKED) {
-        error_report("%s, %s\n", sd_strerror(rsp->result), s->name);
+        error_report("%s, %s", sd_strerror(rsp->result), s->name);
     }
 
     qemu_aio_set_fd_handler(s->fd, NULL, NULL, NULL, NULL, NULL);
@@ -1401,10 +1401,10 @@ static int sd_truncate(BlockDriverState *bs, int64_t offset)
     unsigned int datalen;
 
     if (offset < s->inode.vdi_size) {
-        error_report("shrinking is not supported\n");
+        error_report("shrinking is not supported");
         return -EINVAL;
     } else if (offset > SD_MAX_VDI_SIZE) {
-        error_report("too big image size\n");
+        error_report("too big image size");
         return -EINVAL;
     }
 
@@ -1421,7 +1421,7 @@ static int sd_truncate(BlockDriverState *bs, int64_t offset)
     close(fd);
 
     if (ret < 0) {
-        error_report("failed to update an inode.\n");
+        error_report("failed to update an inode.");
         return -EIO;
     }
 
@@ -1494,7 +1494,7 @@ static int sd_create_branch(BDRVSheepdogState *s)
 
     fd = connect_to_sdog(s->addr, s->port);
     if (fd < 0) {
-        error_report("failed to connect\n");
+        error_report("failed to connect");
         goto out;
     }
 
@@ -1612,7 +1612,7 @@ static void sd_readv_writev_bh_cb(void *p)
         ret = add_aio_request(s, aio_req, acb->qiov->iov, acb->qiov->niov,
                               create, acb->aiocb_type);
         if (ret < 0) {
-            error_report("add_aio_request is failed\n");
+            error_report("add_aio_request is failed");
             free_aio_req(s, aio_req);
             acb->ret = -EIO;
             goto out;
@@ -1689,7 +1689,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
 
     if (s->is_snapshot) {
         error_report("You can't create a snapshot of a snapshot VDI, "
-                     "%s (%" PRIu32 ").\n", s->name, s->inode.vdi_id);
+                     "%s (%" PRIu32 ").", s->name, s->inode.vdi_id);
 
         return -EINVAL;
     }
@@ -1712,7 +1712,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
     ret = write_object(fd, (char *)&s->inode, vid_to_vdi_oid(s->inode.vdi_id),
                        s->inode.nr_copies, datalen, 0, 0);
     if (ret < 0) {
-        error_report("failed to write snapshot's inode.\n");
+        error_report("failed to write snapshot's inode.");
         ret = -EIO;
         goto cleanup;
     }
@@ -1720,7 +1720,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
     ret = do_sd_create(s->name, s->inode.vdi_size, s->inode.vdi_id, &new_vid, 1,
                        s->addr, s->port);
     if (ret < 0) {
-        error_report("failed to create inode for snapshot. %s\n",
+        error_report("failed to create inode for snapshot. %s",
                      strerror(errno));
         ret = -EIO;
         goto cleanup;
@@ -1732,7 +1732,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
                       s->inode.nr_copies, datalen, 0);
 
     if (ret < 0) {
-        error_report("failed to read new inode info. %s\n", strerror(errno));
+        error_report("failed to read new inode info. %s", strerror(errno));
         ret = -EIO;
         goto cleanup;
     }
@@ -1771,14 +1771,14 @@ static int sd_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
 
     ret = find_vdi_name(s, vdi, snapid, tag, &vid, 1);
     if (ret) {
-        error_report("Failed to find_vdi_name\n");
+        error_report("Failed to find_vdi_name");
         ret = -ENOENT;
         goto out;
     }
 
     fd = connect_to_sdog(s->addr, s->port);
     if (fd < 0) {
-        error_report("failed to connect\n");
+        error_report("failed to connect");
         goto out;
     }
 
@@ -1796,7 +1796,7 @@ static int sd_snapshot_goto(BlockDriverState *bs, const char *snapshot_id)
     memcpy(&s->inode, buf, sizeof(s->inode));
 
     if (!s->inode.vm_state_size) {
-        error_report("Invalid snapshot\n");
+        error_report("Invalid snapshot");
         ret = -ENOENT;
         goto out;
     }
@@ -1813,7 +1813,7 @@ out:
     qemu_free(buf);
     qemu_free(old_s);
 
-    error_report("failed to open. recover old bdrv_sd_state.\n");
+    error_report("failed to open. recover old bdrv_sd_state.");
 
     return ret;
 }
@@ -1868,7 +1868,7 @@ static int sd_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab)
 
     fd = connect_to_sdog(s->addr, s->port);
     if (fd < 0) {
-        error_report("failed to connect\n");
+        error_report("failed to connect");
         goto out;
     }
 
@@ -1942,7 +1942,7 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data,
         }
 
         if (ret < 0) {
-            error_report("failed to save vmstate %s\n", strerror(errno));
+            error_report("failed to save vmstate %s", strerror(errno));
             ret = -EIO;
             goto cleanup;
         }
diff --git a/hw/milkymist-minimac2.c b/hw/milkymist-minimac2.c
index c4e2818..cd36026 100644
--- a/hw/milkymist-minimac2.c
+++ b/hw/milkymist-minimac2.c
@@ -234,20 +234,20 @@ static void minimac2_tx(MilkymistMinimac2State *s)
     uint8_t *buf = s->tx_buf;
 
     if (txcount < 64) {
-        error_report("milkymist_minimac2: ethernet frame too small (%u < %u)\n",
+        error_report("milkymist_minimac2: ethernet frame too small (%u < %u)",
                 txcount, 64);
         goto err;
     }
 
     if (txcount > MINIMAC2_MTU) {
-        error_report("milkymist_minimac2: MTU exceeded (%u > %u)\n",
+        error_report("milkymist_minimac2: MTU exceeded (%u > %u)",
                 txcount, MINIMAC2_MTU);
         goto err;
     }
 
     if (memcmp(buf, preamble_sfd, 8) != 0) {
         error_report("milkymist_minimac2: frame doesn't contain the preamble "
-                "and/or the SFD (%02x %02x %02x %02x %02x %02x %02x %02x)\n",
+                "and/or the SFD (%02x %02x %02x %02x %02x %02x %02x %02x)",
                 buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
         goto err;
     }
diff --git a/hw/milkymist-pfpu.c b/hw/milkymist-pfpu.c
index 94e6315..306d1ce 100644
--- a/hw/milkymist-pfpu.c
+++ b/hw/milkymist-pfpu.c
@@ -301,7 +301,7 @@ static int pfpu_decode_insn(MilkymistPFPUState *s)
     } break;
 
     default:
-        error_report("milkymist_pfpu: unknown opcode %d\n", op);
+        error_report("milkymist_pfpu: unknown opcode %d", op);
         break;
     }
 
@@ -358,7 +358,7 @@ static void pfpu_start(MilkymistPFPUState *s)
                 /* decode at most MICROCODE_WORDS instructions */
                 if (i++ >= MICROCODE_WORDS) {
                     error_report("milkymist_pfpu: too many instructions "
-                            "executed in microcode. No VECTOUT?\n");
+                            "executed in microcode. No VECTOUT?");
                     break;
                 }
             }
diff --git a/hw/milkymist-softusb.c b/hw/milkymist-softusb.c
index 028f3b7..5ab35c3 100644
--- a/hw/milkymist-softusb.c
+++ b/hw/milkymist-softusb.c
@@ -131,7 +131,7 @@ static inline void softusb_read_dmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->dmem_size) {
         error_report("milkymist_softusb: read dmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
@@ -143,7 +143,7 @@ static inline void softusb_write_dmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->dmem_size) {
         error_report("milkymist_softusb: write dmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
@@ -155,7 +155,7 @@ static inline void softusb_read_pmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->pmem_size) {
         error_report("milkymist_softusb: read pmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
@@ -167,7 +167,7 @@ static inline void softusb_write_pmem(MilkymistSoftUsbState *s,
 {
     if (offset + len >= s->pmem_size) {
         error_report("milkymist_softusb: write pmem out of bounds "
-                "at offset 0x%x, len %d\n", offset, len);
+                "at offset 0x%x, len %d", offset, len);
         return;
     }
 
diff --git a/hw/milkymist-tmu2.c b/hw/milkymist-tmu2.c
index 9cebe31..790cdcb 100644
--- a/hw/milkymist-tmu2.c
+++ b/hw/milkymist-tmu2.c
@@ -352,21 +352,21 @@ static uint32_t tmu2_read(void *opaque, target_phys_addr_t addr)
 static void tmu2_check_registers(MilkymistTMU2State *s)
 {
     if (s->regs[R_BRIGHTNESS] > MAX_BRIGHTNESS) {
-        error_report("milkymist_tmu2: max brightness is %d\n", MAX_BRIGHTNESS);
+        error_report("milkymist_tmu2: max brightness is %d", MAX_BRIGHTNESS);
     }
 
     if (s->regs[R_ALPHA] > MAX_ALPHA) {
-        error_report("milkymist_tmu2: max alpha is %d\n", MAX_ALPHA);
+        error_report("milkymist_tmu2: max alpha is %d", MAX_ALPHA);
     }
 
     if (s->regs[R_VERTICESADDR] & 0x07) {
         error_report("milkymist_tmu2: vertex mesh address has to be 64-bit "
-                "aligned\n");
+                "aligned");
     }
 
     if (s->regs[R_TEXFBUF] & 0x01) {
         error_report("milkymist_tmu2: texture buffer address has to be "
-                "16-bit aligned\n");
+                "16-bit aligned");
     }
 }
 
diff --git a/hw/qdev.c b/hw/qdev.c
index 2987901..292b52f 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -371,7 +371,7 @@ void qdev_init_nofail(DeviceState *dev)
     DeviceInfo *info = dev->info;
 
     if (qdev_init(dev) < 0) {
-        error_report("Initialization of device %s failed\n", info->name);
+        error_report("Initialization of device %s failed", info->name);
         exit(1);
     }
 }
diff --git a/hw/strongarm.c b/hw/strongarm.c
index de08bdf..0e03d61 100644
--- a/hw/strongarm.c
+++ b/hw/strongarm.c
@@ -1536,14 +1536,14 @@ StrongARMState *sa1110_init(unsigned int sdram_size, const char *rev)
     }
 
     if (strncmp(rev, "sa1110", 6)) {
-        error_report("Machine requires a SA1110 processor.\n");
+        error_report("Machine requires a SA1110 processor.");
         exit(1);
     }
 
     s->env = cpu_init(rev);
 
     if (!s->env) {
-        error_report("Unable to find CPU definition\n");
+        error_report("Unable to find CPU definition");
         exit(1);
     }
 
diff --git a/hw/usb-ccid.c b/hw/usb-ccid.c
index 59c6431..524b841 100644
--- a/hw/usb-ccid.c
+++ b/hw/usb-ccid.c
@@ -1240,7 +1240,7 @@ static int ccid_card_init(DeviceState *qdev, DeviceInfo *base)
         return -1;
     }
     if (s->card != NULL) {
-        error_report("Warning: usb-ccid card already full, not adding\n");
+        error_report("Warning: usb-ccid card already full, not adding");
         return -1;
     }
     ret = info->initfn ? info->initfn(card) : ret;
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 9a12104..bff4004 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -337,7 +337,7 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
     switch(cpkt.event) {
     case VIRTIO_CONSOLE_DEVICE_READY:
         if (!cpkt.value) {
-            error_report("virtio-serial-bus: Guest failure in adding device %s\n",
+            error_report("virtio-serial-bus: Guest failure in adding device %s",
                          vser->bus.qbus.name);
             break;
         }
@@ -352,7 +352,7 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
 
     case VIRTIO_CONSOLE_PORT_READY:
         if (!cpkt.value) {
-            error_report("virtio-serial-bus: Guest failure in adding port %u for device %s\n",
+            error_report("virtio-serial-bus: Guest failure in adding port %u for device %s",
                          port->id, vser->bus.qbus.name);
             break;
         }
@@ -741,7 +741,7 @@ static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base)
     plugging_port0 = info->is_console && !find_port_by_id(port->vser, 0);
 
     if (find_port_by_id(port->vser, port->id)) {
-        error_report("virtio-serial-bus: A port already exists at id %u\n",
+        error_report("virtio-serial-bus: A port already exists at id %u",
                      port->id);
         return -1;
     }
@@ -752,7 +752,7 @@ static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base)
         } else {
             port->id = find_free_port_id(port->vser);
             if (port->id == VIRTIO_CONSOLE_BAD_ID) {
-                error_report("virtio-serial-bus: Maximum port limit for this device reached\n");
+                error_report("virtio-serial-bus: Maximum port limit for this device reached");
                 return -1;
             }
         }
@@ -760,7 +760,7 @@ static int virtser_port_qdev_init(DeviceState *qdev, DeviceInfo *base)
 
     max_nr_ports = tswap32(port->vser->config.max_nr_ports);
     if (port->id >= max_nr_ports) {
-        error_report("virtio-serial-bus: Out-of-range port id specified, max. allowed: %u\n",
+        error_report("virtio-serial-bus: Out-of-range port id specified, max. allowed: %u",
                      max_nr_ports - 1);
         return -1;
     }
diff --git a/hw/virtio.c b/hw/virtio.c
index e6043de..cc47a06 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -797,7 +797,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f)
             /* Check it isn't doing very strange things with descriptor numbers. */
             if (nheads > vdev->vq[i].vring.num) {
                 error_report("VQ %d size 0x%x Guest index 0x%x "
-                             "inconsistent with Host index 0x%x: delta 0x%x\n",
+                             "inconsistent with Host index 0x%x: delta 0x%x",
                              i, vdev->vq[i].vring.num,
                              vring_avail_idx(&vdev->vq[i]),
                              vdev->vq[i].last_avail_idx, nheads);
@@ -805,7 +805,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f)
             }
         } else if (vdev->vq[i].last_avail_idx) {
             error_report("VQ %d address 0x0 "
-                         "inconsistent with Host index 0x%x\n",
+                         "inconsistent with Host index 0x%x",
                          i, vdev->vq[i].last_avail_idx);
                 return -1;
 	}
diff --git a/net.c b/net.c
index a104976..66123ad 100644
--- a/net.c
+++ b/net.c
@@ -710,7 +710,7 @@ int qemu_find_nic_model(NICInfo *nd, const char * const *models,
             return i;
     }
 
-    error_report("qemu: Unsupported NIC model: %s", nd->model);
+    error_report("Unsupported NIC model: %s", nd->model);
     return -1;
 }
 
diff --git a/net/socket.c b/net/socket.c
index 7337f4f..bc1bf58 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -530,7 +530,7 @@ int net_init_socket(QemuOpts *opts,
             qemu_opt_get(opts, "connect") ||
             qemu_opt_get(opts, "mcast") ||
             qemu_opt_get(opts, "localaddr")) {
-            error_report("listen=, connect=, mcast= and localaddr= is invalid with fd=\n");
+            error_report("listen=, connect=, mcast= and localaddr= is invalid with fd=");
             return -1;
         }
 
@@ -550,7 +550,7 @@ int net_init_socket(QemuOpts *opts,
             qemu_opt_get(opts, "connect") ||
             qemu_opt_get(opts, "mcast") ||
             qemu_opt_get(opts, "localaddr")) {
-            error_report("fd=, connect=, mcast= and localaddr= is invalid with listen=\n");
+            error_report("fd=, connect=, mcast= and localaddr= is invalid with listen=");
             return -1;
         }
 
@@ -566,7 +566,7 @@ int net_init_socket(QemuOpts *opts,
             qemu_opt_get(opts, "listen") ||
             qemu_opt_get(opts, "mcast") ||
             qemu_opt_get(opts, "localaddr")) {
-            error_report("fd=, listen=, mcast= and localaddr= is invalid with connect=\n");
+            error_report("fd=, listen=, mcast= and localaddr= is invalid with connect=");
             return -1;
         }
 
diff --git a/qemu-error.c b/qemu-error.c
index 41c191d..4b20d28 100644
--- a/qemu-error.c
+++ b/qemu-error.c
@@ -193,6 +193,8 @@ void error_print_loc(void)
 
 /*
  * Print an error message to current monitor if we have one, else to stderr.
+ * Format arguments like sprintf().  The result should not contain
+ * newlines.
  * Prepend the current location and append a newline.
  * It's wrong to call this in a QMP monitor.  Use qerror_report() there.
  */
diff --git a/qemu-img.c b/qemu-img.c
index 4f162d1..1a37828 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -690,12 +690,12 @@ static int img_convert(int argc, char **argv)
 
     if (snapshot_name != NULL) {
         if (bs_n > 1) {
-            error_report("No support for concatenating multiple snapshot\n");
+            error_report("No support for concatenating multiple snapshot");
             ret = -1;
             goto out;
         }
         if (bdrv_snapshot_load_tmp(bs[0], snapshot_name) < 0) {
-            error_report("Failed to load snapshot\n");
+            error_report("Failed to load snapshot");
             ret = -1;
             goto out;
         }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 05/13] qemu-img: Don't prepend qemu-img to error messages twice.
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (3 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 04/13] Strip trailing '\n' from error_report()'s first argument Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 06/13] Spell "unkown" correctly in error_report() arguments Stefan Hajnoczi
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi

From: Markus Armbruster <armbru@redhat.com>

error_report() prepends the location already.  Example:

$ qemu-img convert -6
qemu-img: qemu-img: option -6 is deprecated, please use '-o compat6' instead!

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 qemu-img.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index 1a37828..32628b3 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -304,11 +304,11 @@ static int img_create(int argc, char **argv)
             fmt = optarg;
             break;
         case 'e':
-            error_report("qemu-img: option -e is deprecated, please use \'-o "
+            error_report("option -e is deprecated, please use \'-o "
                   "encryption\' instead!");
             return 1;
         case '6':
-            error_report("qemu-img: option -6 is deprecated, please use \'-o "
+            error_report("option -6 is deprecated, please use \'-o "
                   "compat6\' instead!");
             return 1;
         case 'o':
@@ -633,11 +633,11 @@ static int img_convert(int argc, char **argv)
             compress = 1;
             break;
         case 'e':
-            error_report("qemu-img: option -e is deprecated, please use \'-o "
+            error_report("option -e is deprecated, please use \'-o "
                   "encryption\' instead!");
             return 1;
         case '6':
-            error_report("qemu-img: option -6 is deprecated, please use \'-o "
+            error_report("option -6 is deprecated, please use \'-o "
                   "compat6\' instead!");
             return 1;
         case 'o':
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 06/13] Spell "unkown" correctly in error_report() arguments
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (4 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 05/13] qemu-img: Don't prepend qemu-img to error messages twice Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 07/13] blockdev: Put space after comma in error message Stefan Hajnoczi
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/lm32_sys.c          |    2 +-
 hw/lm32_timer.c        |    4 ++--
 hw/lm32_uart.c         |    4 ++--
 hw/milkymist-ac97.c    |    4 ++--
 hw/milkymist-memcard.c |    4 ++--
 hw/milkymist-sysctl.c  |    4 ++--
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/hw/lm32_sys.c b/hw/lm32_sys.c
index 427b05f..e5ff962 100644
--- a/hw/lm32_sys.c
+++ b/hw/lm32_sys.c
@@ -83,7 +83,7 @@ static void sys_write(void *opaque, target_phys_addr_t addr, uint32_t value)
         break;
 
     default:
-        error_report("lm32_sys: write access to unkown register 0x"
+        error_report("lm32_sys: write access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
diff --git a/hw/lm32_timer.c b/hw/lm32_timer.c
index ed28984..49cbb22 100644
--- a/hw/lm32_timer.c
+++ b/hw/lm32_timer.c
@@ -86,7 +86,7 @@ static uint32_t timer_read(void *opaque, target_phys_addr_t addr)
         r = (uint32_t)ptimer_get_count(s->ptimer);
         break;
     default:
-        error_report("lm32_timer: read access to unkown register 0x"
+        error_report("lm32_timer: read access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
@@ -124,7 +124,7 @@ static void timer_write(void *opaque, target_phys_addr_t addr, uint32_t value)
                 TARGET_FMT_plx, addr << 2);
         break;
     default:
-        error_report("lm32_timer: write access to unkown register 0x"
+        error_report("lm32_timer: write access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
diff --git a/hw/lm32_uart.c b/hw/lm32_uart.c
index e225087..09090e9 100644
--- a/hw/lm32_uart.c
+++ b/hw/lm32_uart.c
@@ -149,7 +149,7 @@ static uint32_t uart_read(void *opaque, target_phys_addr_t addr)
                 TARGET_FMT_plx, addr << 2);
         break;
     default:
-        error_report("lm32_uart: read access to unkown register 0x"
+        error_report("lm32_uart: read access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
@@ -185,7 +185,7 @@ static void uart_write(void *opaque, target_phys_addr_t addr, uint32_t value)
                 TARGET_FMT_plx, addr << 2);
         break;
     default:
-        error_report("lm32_uart: write access to unkown register 0x"
+        error_report("lm32_uart: write access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
diff --git a/hw/milkymist-ac97.c b/hw/milkymist-ac97.c
index 6c9e318..6104732 100644
--- a/hw/milkymist-ac97.c
+++ b/hw/milkymist-ac97.c
@@ -103,7 +103,7 @@ static uint32_t ac97_read(void *opaque, target_phys_addr_t addr)
         break;
 
     default:
-        error_report("milkymist_ac97: read access to unkown register 0x"
+        error_report("milkymist_ac97: read access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
@@ -152,7 +152,7 @@ static void ac97_write(void *opaque, target_phys_addr_t addr, uint32_t value)
         break;
 
     default:
-        error_report("milkymist_ac97: write access to unkown register 0x"
+        error_report("milkymist_ac97: write access to unknown register 0x"
                 TARGET_FMT_plx, addr);
         break;
     }
diff --git a/hw/milkymist-memcard.c b/hw/milkymist-memcard.c
index 06077af..22dc377 100644
--- a/hw/milkymist-memcard.c
+++ b/hw/milkymist-memcard.c
@@ -154,7 +154,7 @@ static uint32_t memcard_read(void *opaque, target_phys_addr_t addr)
         break;
 
     default:
-        error_report("milkymist_memcard: read access to unkown register 0x"
+        error_report("milkymist_memcard: read access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
@@ -210,7 +210,7 @@ static void memcard_write(void *opaque, target_phys_addr_t addr, uint32_t value)
         break;
 
     default:
-        error_report("milkymist_memcard: write access to unkown register 0x"
+        error_report("milkymist_memcard: write access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
diff --git a/hw/milkymist-sysctl.c b/hw/milkymist-sysctl.c
index 6bd0cb9..7b2d544 100644
--- a/hw/milkymist-sysctl.c
+++ b/hw/milkymist-sysctl.c
@@ -119,7 +119,7 @@ static uint32_t sysctl_read(void *opaque, target_phys_addr_t addr)
         break;
 
     default:
-        error_report("milkymist_sysctl: read access to unkown register 0x"
+        error_report("milkymist_sysctl: read access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
@@ -189,7 +189,7 @@ static void sysctl_write(void *opaque, target_phys_addr_t addr, uint32_t value)
         break;
 
     default:
-        error_report("milkymist_sysctl: write access to unkown register 0x"
+        error_report("milkymist_sysctl: write access to unknown register 0x"
                 TARGET_FMT_plx, addr << 2);
         break;
     }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 07/13] blockdev: Put space after comma in error message
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (5 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 06/13] Spell "unkown" correctly in error_report() arguments Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 08/13] MAINTAINERS: Fix typo in email address Stefan Hajnoczi
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi

From: Markus Armbruster <armbru@redhat.com>

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 blockdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 1502575..7d579d6 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -293,7 +293,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)
 
     if ((buf = qemu_opt_get(opts, "trans")) != NULL) {
         if (!cyls) {
-            error_report("'%s' trans must be used with cyls,heads and secs",
+            error_report("'%s' trans must be used with cyls, heads and secs",
                          buf);
             return NULL;
         }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 08/13] MAINTAINERS: Fix typo in email address
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (6 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 07/13] blockdev: Put space after comma in error message Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 09/13] Fix comment typos in hw/armv7m.c Stefan Hajnoczi
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Anthony Liguori, Stefan Hajnoczi

From: Peter Maydell <peter.maydell@linaro.org>

Fix a typo in one of the copies of Aurelien Jarno's email address.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 MAINTAINERS |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 35d4496..6115e4e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -480,7 +480,7 @@ S: Maintained
 F: tcg/ia64/
 
 MIPS target
-M: Aurelien Jarno <aurelien@aurel32.ne>
+M: Aurelien Jarno <aurelien@aurel32.net>
 S: Maintained
 F: tcg/mips/
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 09/13] Fix comment typos in hw/armv7m.c
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (7 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 08/13] MAINTAINERS: Fix typo in email address Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 10/13] Do not include compatfd for WIN32 Stefan Hajnoczi
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi, Matthew Fernandez

From: Matthew Fernandez <matthew.fernandez@gmail.com>

Fix a couple of typos in comments.

Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>
Acked-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/armv7m.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/armv7m.c b/hw/armv7m.c
index 72d010a..83f3393 100644
--- a/hw/armv7m.c
+++ b/hw/armv7m.c
@@ -4,7 +4,7 @@
  * Copyright (c) 2006-2007 CodeSourcery.
  * Written by Paul Brook
  *
- * This code is licenced under the GPL.
+ * This code is licensed under the GPL.
  */
 
 #include "sysbus.h"
@@ -14,7 +14,7 @@
 
 /* Bitbanded IO.  Each word corresponds to a single bit.  */
 
-/* Get the byte address of the real memory for a bitband acess.  */
+/* Get the byte address of the real memory for a bitband access.  */
 static inline uint32_t bitband_addr(void * opaque, uint32_t addr)
 {
     uint32_t res;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 10/13] Do not include compatfd for WIN32
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (8 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 09/13] Fix comment typos in hw/armv7m.c Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 11/13] w32: Remove redundant definitions of PRI*64 Stefan Hajnoczi
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Anthony Liguori, Stefan Hajnoczi

From: Jan Kiszka <jan.kiszka@siemens.com>

sigset_t, used by that header, is not available in mingw32 environments.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 cpus.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/cpus.c b/cpus.c
index 0699f37..ded2100 100644
--- a/cpus.c
+++ b/cpus.c
@@ -34,7 +34,10 @@
 
 #include "qemu-thread.h"
 #include "cpus.h"
+
+#ifndef _WIN32
 #include "compatfd.h"
+#endif
 
 #ifdef SIGRTMIN
 #define SIG_IPI (SIGRTMIN+4)
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 11/13] w32: Remove redundant definitions of PRI*64
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (9 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 10/13] Do not include compatfd for WIN32 Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 12/13] exec: last_first_tb was only used in !ONLY_USER case Stefan Hajnoczi
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi

From: Stefan Weil <weil@mail.berlios.de>

The PRI*64 macros are defined in MinGW's inttypes.h since 2002,
so they are not needed in qemu-common.h (which includes inttypes.h).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 qemu-common.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/qemu-common.h b/qemu-common.h
index 109498d..abd7a75 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -112,11 +112,6 @@ static inline char *realpath(const char *path, char *resolved_path)
     _fullpath(resolved_path, path, _MAX_PATH);
     return resolved_path;
 }
-
-#define PRId64 "I64d"
-#define PRIx64 "I64x"
-#define PRIu64 "I64u"
-#define PRIo64 "I64o"
 #endif
 
 /* FIXME: Remove NEED_CPU_H.  */
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 12/13] exec: last_first_tb was only used in !ONLY_USER case
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (10 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 11/13] w32: Remove redundant definitions of PRI*64 Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 13/13] qemu-kvm: fix pulseaudio detection in configure Stefan Hajnoczi
  2011-06-27 19:54 ` [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Anthony Liguori
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi, Juan Quintela

From: Juan Quintela <quintela@redhat.com>

Once there, use a better variable name.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 exec.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/exec.c b/exec.c
index b03b5be..7236281 100644
--- a/exec.c
+++ b/exec.c
@@ -1208,12 +1208,16 @@ static inline void tb_alloc_page(TranslationBlock *tb,
                                  unsigned int n, tb_page_addr_t page_addr)
 {
     PageDesc *p;
-    TranslationBlock *last_first_tb;
+#ifndef CONFIG_USER_ONLY
+    bool page_already_protected;
+#endif
 
     tb->page_addr[n] = page_addr;
     p = page_find_alloc(page_addr >> TARGET_PAGE_BITS, 1);
     tb->page_next[n] = p->first_tb;
-    last_first_tb = p->first_tb;
+#ifndef CONFIG_USER_ONLY
+    page_already_protected = p->first_tb != NULL;
+#endif
     p->first_tb = (TranslationBlock *)((long)tb | n);
     invalidate_page_bitmap(p);
 
@@ -1249,7 +1253,7 @@ static inline void tb_alloc_page(TranslationBlock *tb,
     /* if some code is already present, then the pages are already
        protected. So we handle the case where only the first TB is
        allocated in a physical page */
-    if (!last_first_tb) {
+    if (!page_already_protected) {
         tlb_protect_code(page_addr);
     }
 #endif
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH 13/13] qemu-kvm: fix pulseaudio detection in configure
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (11 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 12/13] exec: last_first_tb was only used in !ONLY_USER case Stefan Hajnoczi
@ 2011-06-24 16:56 ` Stefan Hajnoczi
  2011-06-27 19:54 ` [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Anthony Liguori
  13 siblings, 0 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2011-06-24 16:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Marc-Antoine Perennou, Stefan Hajnoczi

From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>

pulse/simple.h does not include stdlib.h
We cannot use NULL since it may not be defined
Use 0 instead

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 4fa9a57..a311071 100755
--- a/configure
+++ b/configure
@@ -1638,7 +1638,7 @@ for drv in $audio_drv_list; do
 
     pa)
     audio_drv_probe $drv pulse/simple.h "-lpulse-simple -lpulse" \
-        "pa_simple *s = NULL; pa_simple_free(s); return 0;"
+        "pa_simple *s = 0; pa_simple_free(s); return 0;"
     libs_softmmu="-lpulse -lpulse-simple $libs_softmmu"
     audio_pt_int="yes"
     ;;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011
  2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
                   ` (12 preceding siblings ...)
  2011-06-24 16:56 ` [Qemu-devel] [PATCH 13/13] qemu-kvm: fix pulseaudio detection in configure Stefan Hajnoczi
@ 2011-06-27 19:54 ` Anthony Liguori
  13 siblings, 0 replies; 15+ messages in thread
From: Anthony Liguori @ 2011-06-27 19:54 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Stefan Hajnoczi

On 06/24/2011 11:56 AM, Stefan Hajnoczi wrote:
> (I currently do not have access to my<stefanha@linux.vnet.ibm.com>  email
> address.)
>
> The following changes since commit 744d3644181ddb16ef5944a0f9217e46961c8c84:
>
>    coreaudio: Fix OSStatus format specifier (2011-06-23 18:56:58 +0400)
>
> are available in the git repository at:
>    ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches


Pulled.  Thanks.

Regards,

Anthony Liguori

>
> Jan Kiszka (2):
>        Align dummy display to fixed-size active console
>        Do not include compatfd for WIN32
>
> Juan Quintela (1):
>        exec: last_first_tb was only used in !ONLY_USER case
>
> Marc-Antoine Perennou (1):
>        qemu-kvm: fix pulseaudio detection in configure
>
> Markus Armbruster (5):
>        sheepdog: qemu_bh_new() can't return null pointer, drop check
>        Strip trailing '\n' from error_report()'s first argument
>        qemu-img: Don't prepend qemu-img to error messages twice.
>        Spell "unkown" correctly in error_report() arguments
>        blockdev: Put space after comma in error message
>
> Matthew Fernandez (1):
>        Fix comment typos in hw/armv7m.c
>
> Peter Maydell (2):
>        configure: Don't create symlinks to nonexistent targets
>        MAINTAINERS: Fix typo in email address
>
> Stefan Weil (1):
>        w32: Remove redundant definitions of PRI*64
>
>   MAINTAINERS             |    2 +-
>   block-migration.c       |    2 +-
>   block/qcow2.c           |    2 +-
>   block/sheepdog.c        |   90 ++++++++++++++++++++++-------------------------
>   blockdev.c              |    2 +-
>   configure               |    6 ++-
>   console.c               |    9 ++++-
>   cpus.c                  |    3 ++
>   exec.c                  |   10 ++++--
>   hw/armv7m.c             |    4 +-
>   hw/lm32_sys.c           |    2 +-
>   hw/lm32_timer.c         |    4 +-
>   hw/lm32_uart.c          |    4 +-
>   hw/milkymist-ac97.c     |    4 +-
>   hw/milkymist-memcard.c  |    4 +-
>   hw/milkymist-minimac2.c |    6 ++--
>   hw/milkymist-pfpu.c     |    4 +-
>   hw/milkymist-softusb.c  |    8 ++--
>   hw/milkymist-sysctl.c   |    4 +-
>   hw/milkymist-tmu2.c     |    8 ++--
>   hw/qdev.c               |    2 +-
>   hw/strongarm.c          |    4 +-
>   hw/usb-ccid.c           |    2 +-
>   hw/virtio-serial-bus.c  |   10 +++---
>   hw/virtio.c             |    4 +-
>   net.c                   |    2 +-
>   net/socket.c            |    6 ++--
>   qemu-common.h           |    5 ---
>   qemu-error.c            |    2 +
>   qemu-img.c              |   12 +++---
>   30 files changed, 117 insertions(+), 110 deletions(-)
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-06-27 19:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-24 16:56 [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 01/13] configure: Don't create symlinks to nonexistent targets Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 02/13] Align dummy display to fixed-size active console Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 03/13] sheepdog: qemu_bh_new() can't return null pointer, drop check Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 04/13] Strip trailing '\n' from error_report()'s first argument Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 05/13] qemu-img: Don't prepend qemu-img to error messages twice Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 06/13] Spell "unkown" correctly in error_report() arguments Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 07/13] blockdev: Put space after comma in error message Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 08/13] MAINTAINERS: Fix typo in email address Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 09/13] Fix comment typos in hw/armv7m.c Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 10/13] Do not include compatfd for WIN32 Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 11/13] w32: Remove redundant definitions of PRI*64 Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 12/13] exec: last_first_tb was only used in !ONLY_USER case Stefan Hajnoczi
2011-06-24 16:56 ` [Qemu-devel] [PATCH 13/13] qemu-kvm: fix pulseaudio detection in configure Stefan Hajnoczi
2011-06-27 19:54 ` [Qemu-devel] [PULL 00/13] Trivial patches for June 16 to June 24 2011 Anthony Liguori

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).