From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6EDk-0001HW-1b for qemu-devel@nongnu.org; Tue, 08 Dec 2015 04:06:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6EDg-0006wO-SQ for qemu-devel@nongnu.org; Tue, 08 Dec 2015 04:06:03 -0500 Date: Tue, 8 Dec 2015 15:40:57 +1100 From: David Gibson Message-ID: <20151208044057.GM20139@voom.fritz.box> References: <1449546921-6378-1-git-send-email-eblake@redhat.com> <1449546921-6378-21-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wAI/bQb0EMvlZCHl" Content-Disposition: inline In-Reply-To: <1449546921-6378-21-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [PATCH v7 20/31] spapr_drc: Expose 'null' in qom-get when there is no fdt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Alexander Graf , "open list:sPAPR (pseries)" , qemu-devel@nongnu.org, armbru@redhat.com --wAI/bQb0EMvlZCHl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 07, 2015 at 08:55:10PM -0700, Eric Blake wrote: > Now that the QMP output visitor supports an explicit null > output, we should utilize it to make it easier to diagnose > the difference between a missing fdt vs. a present-but-empty > one. >=20 > (Note that this reverts the behavior of commit ab8bf1d, taking > us back to the behavior of commit 1d10b44; but that this time, > the change is intentional and not an accidental side-effect.) >=20 > Signed-off-by: Eric Blake > Cc: David Gibson Acked-by: David Gibson >=20 > --- > v7: new patch, based on discussion about spapr_drc.c > --- > hw/ppc/spapr_drc.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) >=20 > diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c > index dcce563..0c675ff 100644 > --- a/hw/ppc/spapr_drc.c > +++ b/hw/ppc/spapr_drc.c > @@ -259,11 +259,7 @@ static void prop_get_fdt(Object *obj, Visitor *v, vo= id *opaque, > void *fdt; >=20 > if (!drc->fdt) { > - visit_start_struct(v, NULL, 0, name, &err); > - if (!err) { > - visit_end_struct(v, &err); > - } > - error_propagate(errp, err); > + visit_type_null(v, NULL, errp); > return; > } >=20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --wAI/bQb0EMvlZCHl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWZl9ZAAoJEGw4ysog2bOSR6AQAK3ijHFW2y8xvl6uONfeT+BV mWao785QcxP3aZdQL2xi9dZ9QQ+4eOgmqDJzZYeONTz9Ds0U2AYyIjLGlMbeZeyE BvHMqfunpmByr7I1nfkRAdwulMP6UEXnQc+vlnnS6vmOTe1tisGXSTb0N2VlTbud Rpvn2hqC12SmaGEB9g9G4PKpSdbitdJPSIOw/Pq7Hj46b7g5UkzPEB7dBcYWckuj Yv+m6ikybqn2pBwUOBF2mk2UmUV16gAJIHkScR8DkBMMEmZPvXd1YRMOLGPn7eVi yGXoHYWMLgMd4k9Zzne38MOPuNLDTZXTcwMdDTO4oanlcJ1UMinUyx1JzPQSvGgU XaTijWhulzi+neDxxUViJFwZjDAyZl8BN5WARdBgayGSfOXrvQ23jgd4j7mSsdYi aXp2IY5z7jJmjgI6vmsdTjc/80qZhqg4EcNMtnT3Vb/+q48bUkNGKE5/VrvMwoz/ c/nfmUvxI1kgFNpd5TmZzLJSXb6h5FLqmCp99nrOqEQhgwO0WoqzvzK5VIS9cMcT bI1Z+YLTqUXMKttORSWCUUxMzy9P769v1Btt+XmNIoxELouN/2qQKj//iaK3ttPl vK1eH3D+yANEUZPuX6pdduMdyyDtbiHBoaY5SyPERslKyWmLUG1lqXMtiA46glYA Rp0I7K7Umi4xP3LFgJSj =xKSG -----END PGP SIGNATURE----- --wAI/bQb0EMvlZCHl--