From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFnr7-0000mc-4g for qemu-devel@nongnu.org; Mon, 17 Oct 2011 10:07:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFnr3-0004MQ-7G for qemu-devel@nongnu.org; Mon, 17 Oct 2011 10:07:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFnr3-0004Lp-0C for qemu-devel@nongnu.org; Mon, 17 Oct 2011 10:07:49 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9HE7mjq004971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 17 Oct 2011 10:07:48 -0400 Message-ID: <4E9C376D.2060808@redhat.com> Date: Mon, 17 Oct 2011 16:10:53 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1318503845-11473-1-git-send-email-pbonzini@redhat.com> <1318503845-11473-5-git-send-email-pbonzini@redhat.com> <4E9C3616.3070000@redhat.com> <4E9C35E8.9010907@redhat.com> In-Reply-To: <4E9C35E8.9010907@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/35] atapi: fill in AUDIO_CTL page correctly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 17.10.2011 16:04, schrieb Paolo Bonzini: > On 10/17/2011 04:05 PM, Kevin Wolf wrote: >>>> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c >>>> index 347c38d..10f161f 100644 >>>> --- a/hw/ide/atapi.c >>>> +++ b/hw/ide/atapi.c >>>> @@ -731,6 +731,8 @@ static void cmd_mode_sense(IDEState *s, uint8_t *buf) >>>> buf[7] = 0; >>>> >>>> /* Fill with CDROM audio volume */ >>>> + buf[8] = 0x0e; >> >> 0x0e would be more readable if it was written as MODE_PAGE_AUDIO_CTL. >> >>>> + buf[9] = 0x0e; >> >> And this is really the length. But I'm not sure if writing it as 24 - 10 >> would help a lot. > > Yes, the coincidence is ugly. Maybe we should define structs for the mode pages so that you have real names instead of just offsets into the output buffer? >> Of course the same is true for the other pages, so it could be done for >> all of them on top. Or maybe you actually have included it later in the >> series? > > Only for SCSI. I can queue it as a cleanup for ATAPI. That would be good. Kevin