From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53364 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pn8pT-0004lG-HS for qemu-devel@nongnu.org; Wed, 09 Feb 2011 07:07:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pn8pS-00017T-Ht for qemu-devel@nongnu.org; Wed, 09 Feb 2011 07:07:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pn8pS-00017A-A7 for qemu-devel@nongnu.org; Wed, 09 Feb 2011 07:07:26 -0500 Message-ID: <4D5283E5.8060706@redhat.com> Date: Wed, 09 Feb 2011 13:09:09 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1297247521-11464-1-git-send-email-kwolf@redhat.com> <1297247521-11464-4-git-send-email-kwolf@redhat.com> <4D5278B3.3040604@codemonkey.ws> In-Reply-To: <4D5278B3.3040604@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 3/4] qed: Report error for unsupported features List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: stefanha@gmail.com, qemu-devel@nongnu.org, lcapitulino@redhat.com Am 09.02.2011 12:21, schrieb Anthony Liguori: > On 02/09/2011 04:32 AM, Kevin Wolf wrote: >> @@ -311,7 +312,12 @@ static int bdrv_qed_open(BlockDriverState *bs, int flags) >> return -EINVAL; >> } >> if (s->header.features& ~QED_FEATURE_MASK) { >> - return -ENOTSUP; /* image uses unsupported feature bits */ >> + /* image uses unsupported feature bits */ >> + char version[64]; >> + snprintf(version, sizeof(version), "%" PRIx64, s->header.features); >> > > It would be useful to do s->header.features & QED_FEATURE_MASK here as a > management tool doesn't know what features this version of QED supports. I think you mean s->header.features & ~QED_FEATURE_MASK (small, but important difference :-)) Kevin