From: Amit Shah <amit.shah@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/5] ide: Split atapi.c out
Date: Mon, 25 Apr 2011 15:39:14 +0530 [thread overview]
Message-ID: <20110425100914.GB8308@amit-x200.redhat.com> (raw)
In-Reply-To: <1303299015-11036-2-git-send-email-kwolf@redhat.com>
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 <kwolf@redhat.com>
> ---
> 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
<snip>
> --- /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 <amit.shah@redhat.com>
<snip>
> +
> +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
next prev parent reply other threads:[~2011-04-25 10:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 11:30 [Qemu-devel] [PATCH v2 0/5] atapi: Some code restructuring Kevin Wolf
2011-04-20 11:30 ` [Qemu-devel] [PATCH v2 1/5] ide: Split atapi.c out Kevin Wolf
2011-04-25 10:09 ` Amit Shah [this message]
2011-04-20 11:30 ` [Qemu-devel] [PATCH v2 2/5] ide/atapi: Factor commands out Kevin Wolf
2011-04-20 11:30 ` [Qemu-devel] [PATCH v2 3/5] ide/atapi: Use table instead of switch for commands Kevin Wolf
2011-04-20 18:13 ` Blue Swirl
2011-04-21 8:13 ` Kevin Wolf
2011-04-25 10:14 ` Amit Shah
2011-04-20 11:30 ` [Qemu-devel] [PATCH v2 4/5] ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors Kevin Wolf
2011-04-20 11:30 ` [Qemu-devel] [PATCH v2 5/5] ide/atapi: Introduce CHECK_READY flag for commands Kevin Wolf
2011-04-25 10:19 ` Amit Shah
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110425100914.GB8308@amit-x200.redhat.com \
--to=amit.shah@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).