From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmK6H-0000nK-Sy for qemu-devel@nongnu.org; Wed, 04 Jul 2012 03:34:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmK6B-0005vw-Pl for qemu-devel@nongnu.org; Wed, 04 Jul 2012 03:34:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmK6B-0005vi-Hf for qemu-devel@nongnu.org; Wed, 04 Jul 2012 03:34:07 -0400 Message-ID: <4FF3F1E6.1040508@redhat.com> Date: Wed, 04 Jul 2012 09:33:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1341222087-24920-1-git-send-email-pbonzini@redhat.com> <1341222087-24920-3-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/14] scsi: add a qdev property for the disk's WWN List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org Il 03/07/2012 21:09, Blue Swirl ha scritto: >> > @@ -587,9 +588,17 @@ static int scsi_disk_emulate_inquiry(SCSIRequest *req, uint8_t *outbuf) >> > outbuf[buflen++] = 0; // not officially assigned >> > outbuf[buflen++] = 0; // reserved >> > outbuf[buflen++] = id_len; // length of data following >> > - >> > memcpy(outbuf+buflen, str, id_len); >> > buflen += id_len; >> > + >> > + if (s->wwn) { >> > + outbuf[buflen++] = 0x1; // Binary >> > + outbuf[buflen++] = 0x3; // NAA >> > + outbuf[buflen++] = 0; // reserved > C99 comments. > Just following the style of this code. Feel free to send a patch to replace with #defines. Paolo