Received: from eggs.gnu.org ([140.186.70.92]:33013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEIjL-0000Zw-QC for qemu-devel@nongnu.org; Mon, 25 Apr 2011 06:09:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEIjL-0004hv-3E for qemu-devel@nongnu.org; Mon, 25 Apr 2011 06:09:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEIjK-0004hn-Px for qemu-devel@nongnu.org; Mon, 25 Apr 2011 06:09:23 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3PA9KjH030787 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Apr 2011 06:09:21 -0400 Date: Mon, 25 Apr 2011 15:39:14 +0530 From: Amit Shah Message-ID: <20110425100914.GB8308@amit-x200.redhat.com> References: <1303299015-11036-1-git-send-email-kwolf@redhat.com> <1303299015-11036-2-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1303299015-11036-2-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/5] ide: Split atapi.c out List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On (Wed) 20 Apr 2011 [13:30:11], Kevin Wolf wrote: > Besides moving code, this patch only fixes some whitespace issues in the moved > code and makes all functions in atapi.c static which can be static. > > Signed-off-by: Kevin Wolf > --- > Makefile.objs | 2 +- > hw/ide/atapi.c | 1083 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > hw/ide/core.c | 1065 +--------------------------------------------------- > hw/ide/internal.h | 14 +- > 4 files changed, 1098 insertions(+), 1066 deletions(-) > create mode 100644 hw/ide/atapi.c > --- /dev/null > +++ b/hw/ide/atapi.c > @@ -0,0 +1,1083 @@ > +/* > + * QEMU ATAPI Emulatoin typo here. > + * Copyright (c) 2003 Fabrice Bellard > + * Copyright (c) 2006 Openedhand Ltd. Could you also add Copyright (C) 2011 Red Hat Inc. Copyright (C) 2011 Amit Shah > + > +static void lba_to_msf(uint8_t *buf, int lba) > +{ > + lba += 150; > + buf[0] = (lba / 75) / 60; > + buf[1] = (lba / 75) % 60; > + buf[2] = lba % 75; > +} > + > +/* XXX: DVDs that could fit on a CD will be reported as a CD */ This comment belongs to the function below. > +static inline int media_present(IDEState *s) > +{ > + return (s->nb_sectors > 0); > +} > + > +static inline int media_is_dvd(IDEState *s) > +{ > + return (media_present(s) && s->nb_sectors > CD_MAX_SECTORS); > +} > + Amit