From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48841 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJn7o-0000RH-1n for qemu-devel@nongnu.org; Wed, 02 Jun 2010 08:32:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJn7j-0006Gp-NZ for qemu-devel@nongnu.org; Wed, 02 Jun 2010 08:32:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52735) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJn7j-0006GW-HQ for qemu-devel@nongnu.org; Wed, 02 Jun 2010 08:32:43 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] virtio-blk: assign a default serial number if none provided References: <20100602014854.GB16406@us.ibm.com> <4C060083.4070200@msgid.tls.msk.ru> <20100602114234.GA19185@us.ibm.com> Date: Wed, 02 Jun 2010 14:32:39 +0200 In-Reply-To: <20100602114234.GA19185@us.ibm.com> (Ryan Harper's message of "Wed, 2 Jun 2010 06:42:34 -0500") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ryan Harper Cc: john cooper , Michael Tokarev , qemu-devel@nongnu.org Ryan Harper writes: > * Michael Tokarev [2010-06-02 01:57]: >> 02.06.2010 05:48, Ryan Harper wrote: >> [] >> > hw/virtio-blk.c | 3 +++ >> >+ if (strlen(s->sn) == 0) { >> >> Just out of curiocity (not that it is wrong or inefficient): >> why >> strlen(s->sn) >> and not, say, >> !s->sn[0] >> ? > > Just matching how it's done in hw/ide/core.c:ide_init_drive() I cleaned it up there the other day. [PATCH 11/14] ide: Turn drive serial into a qdev property ide-drive.serial http://thread.gmane.org/gmane.comp.emulators.qemu/72441/focus=72432 http://repo.or.cz/w/qemu/kevin.git/commit/ebf5f0ff455a794faca404e62e5dd6d5bdf2fb9b