From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvqaY-0004lK-KP for qemu-devel@nongnu.org; Tue, 02 Dec 2014 11:46:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvqaT-0007O7-MK for qemu-devel@nongnu.org; Tue, 02 Dec 2014 11:46:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvqaT-0007MP-ED for qemu-devel@nongnu.org; Tue, 02 Dec 2014 11:46:05 -0500 Message-ID: <547DECC3.8030402@redhat.com> Date: Tue, 02 Dec 2014 09:45:55 -0700 From: Eric Blake MIME-Version: 1.0 References: <1417099720-16428-1-git-send-email-mreitz@redhat.com> <1417099720-16428-2-git-send-email-mreitz@redhat.com> <547C9058.5050708@redhat.com> <547D8233.7040600@redhat.com> In-Reply-To: <547D8233.7040600@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TmXFo23oKtheLHUGNbpvATfK30fighkjN" Subject: Re: [Qemu-devel] [PATCH v2 01/13] block: Make essential BlockDriver objects public List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TmXFo23oKtheLHUGNbpvATfK30fighkjN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/02/2014 02:11 AM, Max Reitz wrote: >>> -static BlockDriver bdrv_qcow2 =3D { >>> +BlockDriver *bdrv_qcow2 =3D &(BlockDriver){ >> Do we want any use of 'const', to avoid accidental manipulation of the= >> pointer and/or pointed-to contents? >=20 > Sounds good at first, but for instance qemu_opts_create() (which is > often called with bdrv_qcow2->create_opts and the like) don't take a > const pointer. We could fix all those functions, but trying to fix the > const-ness of the block layer sounds like really tedious work to me... > Also, bdrv_find_format() returns a non-const pointer so it's at least > not more broken than it was before. Fair enough - no need to hold up this patch on what would turn into a much larger task of chasing const-correctness. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TmXFo23oKtheLHUGNbpvATfK30fighkjN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUfezDAAoJEKeha0olJ0NqGxYH/A+gvY4Hy2+WRA56eO60BbO7 /zhxsOshXpNlinYFe5K6KvlqJYk1sACMUKwMAlH4E59pJtUpEoDPl/zUQxXrWddT FSyVSey0aXw+U8s/OaEuVmTMJBnGXhZrIh1Nyvjoa9snd4No6dAEg/w7hqxIU3iV A2W8Gy9qawDncvJc1RsO+tZKalm42lH2sOMvGMxxrUYKotZCx7OGWAVUO6IBum61 rf7S4ecHywzZBL35YPljtqFKmIHg4PBVxEJl+v1jy+PaHQIH3/x9a5RUHGBUuCWx bQr/W6j8zuu6uJIz9hTi46Cw92F533ZukBNd6Orjt9F1nTObbs3oIaf/h9mYZlk= =G0OK -----END PGP SIGNATURE----- --TmXFo23oKtheLHUGNbpvATfK30fighkjN--