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 <kw...@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.s...@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