History | View | Annotate | Download (33.7 kB)
atapi: Move comment to proper place
Move misplaced comment for media_is_dvd()
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
atapi: Explain why we need a 'media not present' state
After the re-org of the atapi code, it might not be intuitive for areader of the code to understand why we're inserting a 'media notpresent' state between cd changes.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
ide/atapi: fix set but unused
Signed-off-by: Alon Levy <alevy@redhat.com>Acked-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide/atapi: Introduce CHECK_READY flag for commands
Some commands are supposed to report a Not Ready Condition (i.e. they requirea medium to be present in order to execute successfully). Instead ofduplicating the check in each command implementation, let's add a flag and...
ide/atapi: Factor commands out
In preparation for a table of function pointers, factor each command out fromide_atapi_cmd() into its own function.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide/atapi: Use table instead of switch for commands
ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors
The disk size can only change when the medium is changed, and the changecallback takes care of updating s->nb_sectors in this case.
ide: Split atapi.c out
Besides moving code, this patch only fixes some whitespace issues in the movedcode and makes all functions in atapi.c static which can be static.