[Qemu-devel] [PATCH 07/11] ide: refuse WIN_READ_NATIVE_MAX on empty device

2013-04-26 Thread Stefan Hajnoczi
What is the highest addressable sector on an empty CD-ROM? Nothing is addressable so produce an error. This patch prevents a divide-by-zero in ide_set_sector() since s->sectors and s->heads would be 0. Not to mention that a sector=-1 argument would be nonsense. Note that WIN_READ_NATIVE_MAX can

[Qemu-devel] [PATCH 07/11] ide: refuse WIN_READ_NATIVE_MAX on empty device

2013-04-15 Thread Stefan Hajnoczi
What is the highest addressable sector on an empty CD-ROM? Nothing is addressable so produce an error. This patch prevents a divide-by-zero in ide_set_sector() since s->sectors and s->heads would be 0. Not to mention that a sector=-1 argument would be nonsense. Note that WIN_READ_NATIVE_MAX can