From: Peter Wu <peter@lekensteyn.nl>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PULL 00/16] Block patches
Date: Sat, 17 Jan 2015 11:41:59 +0100 [thread overview]
Message-ID: <1497100.KaIgobZClN@al> (raw)
In-Reply-To: <CAFEAcA-Ageq02CX92dVaSbw_38i8xK91mUD=1XxCc+HhuhtCtw@mail.gmail.com>
On Friday 16 January 2015 16:46:39 Peter Maydell wrote:
> CentOS5:
>
> ../block/dmg.o: In function `dmg_read_plist_xml':
> /home/petmay01/linaro/qemu-for-merges/block/dmg.c:414: undefined
> reference to `g_base64_decode_inplace'
Should have paid more attention to the API docs. Can you try the
following patch? It still passes 4 dmg tests for me
(https://lekensteyn.nl/files/dmg-tests/).
--
Kind regards,
Peter
https://lekensteyn.nl
--
>From 462454e820d2fa5f8eefe7b039d6ea32e4a88d41 Mon Sep 17 00:00:00 2001
From: Peter Wu <peter@lekensteyn.nl>
Date: Sat, 17 Jan 2015 11:34:32 +0100
Subject: [PATCH] block/dmg: fix compatibility with glib 2.12
For compatibility with glib 2.12, use g_base64_decode (which
additionally requires an extra buffer allocation) instead of
g_base64_decode_inplace (which is only available since glib 2.20).
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
---
block/dmg.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/block/dmg.c b/block/dmg.c
index 4e24076..0430f55 100644
--- a/block/dmg.c
+++ b/block/dmg.c
@@ -403,6 +403,7 @@ static int dmg_read_plist_xml(BlockDriverState *bs, DmgHeaderState *ds,
* and line feeds. */
data_end = (char *)buffer;
while ((data_begin = strstr(data_end, "<data>")) != NULL) {
+ guchar *mish;
gsize out_len = 0;
data_begin += 6;
@@ -413,9 +414,9 @@ static int dmg_read_plist_xml(BlockDriverState *bs, DmgHeaderState *ds,
goto fail;
}
*data_end++ = '\0';
- g_base64_decode_inplace(data_begin, &out_len);
- ret = dmg_read_mish_block(s, ds, (uint8_t *)data_begin,
- (uint32_t)out_len);
+ mish = g_base64_decode(data_begin, &out_len);
+ ret = dmg_read_mish_block(s, ds, mish, (uint32_t)out_len);
+ g_free(mish);
if (ret < 0) {
goto fail;
}
--
2.2.2
next prev parent reply other threads:[~2015-01-17 10:42 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 15:36 [Qemu-devel] [PULL 00/16] Block patches Stefan Hajnoczi
2015-01-16 15:36 ` [Qemu-devel] [PULL 01/16] block: add event when disk usage exceeds threshold Stefan Hajnoczi
2015-01-16 15:36 ` [Qemu-devel] [PULL 02/16] block/dmg: properly detect the UDIF trailer Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 03/16] block/dmg: extract mish block decoding functionality Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 04/16] block/dmg: extract processing of resource forks Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 05/16] block/dmg: process a buffer instead of reading ints Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 06/16] block/dmg: validate chunk size to avoid overflow Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 07/16] block/dmg: process XML plists Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 08/16] block/dmg: set virtual size to a non-zero value Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 09/16] block/dmg: fix sector data offset calculation Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 10/16] block/dmg: use SectorNumber from BLKX header Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 11/16] block/dmg: factor out block type check Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 12/16] block/dmg: support bzip2 block entry types Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 13/16] block/dmg: improve zeroes handling Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 14/16] qed: check for header size overflow Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 15/16] qemu-iotests: add 116 invalid QED input file tests Stefan Hajnoczi
2015-01-16 15:37 ` [Qemu-devel] [PULL 16/16] qemu-iotests: Fix supported_oses check Stefan Hajnoczi
2015-01-16 16:46 ` [Qemu-devel] [PULL 00/16] Block patches Peter Maydell
2015-01-17 10:41 ` Peter Wu [this message]
2015-01-20 10:26 ` Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2019-09-16 14:22 Max Reitz
2019-09-16 15:34 ` no-reply
2019-09-17 9:20 ` Peter Maydell
2015-09-04 20:10 Kevin Wolf
2015-09-07 12:18 ` Peter Maydell
2010-11-30 17:58 Kevin Wolf
2010-12-06 13:32 ` Anthony Liguori
2010-12-06 13:41 ` Kevin Wolf
2010-12-06 14:09 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497100.KaIgobZClN@al \
--to=peter@lekensteyn.nl \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.