From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8pPJ-00087G-FA for qemu-devel@nongnu.org; Thu, 11 May 2017 10:49:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8pPG-0008Rn-BW for qemu-devel@nongnu.org; Thu, 11 May 2017 10:49:33 -0400 From: Alberto Garcia In-Reply-To: <20170425153858.25660-18-berrange@redhat.com> References: <20170425153858.25660-1-berrange@redhat.com> <20170425153858.25660-18-berrange@redhat.com> Date: Thu, 11 May 2017 16:49:28 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v6 17/18] block: remove all encryption handling APIs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Eric Blake , Max Reitz , Kevin Wolf On Tue 25 Apr 2017 05:38:57 PM CEST, Daniel P. Berrange wrote: > @@ -220,7 +220,12 @@ static int qcow_open(BlockDriverState *bs, QDict *options, int flags, > goto fail; > } > bs->encrypted = true; > - bs->valid_key = true; > + } else { > + if (encryptfmt) { > + error_setg(errp, "No encryption in image header, but options " > + "specified format '%s'", encryptfmt); > + goto fail; > + } You need to set a return value here, else it's undefined. Berto