[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 4/5] atapi: GESN: Standardise event response
Re: [Qemu-devel] [PATCH v3 4/5] atapi: GESN: Standardise event response handling for future additions
Tue, 12 Apr 2011 16:40:39 +0200
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:22.214.171.124) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7
On 04/12/2011 04:12 PM, Amit Shah wrote:
> >>> gesn_cdb = (void *)packet;
> >>> + gesn_event_header = (void *)packet;
> >> I think this should be buf, not packet.
> > Ah, right. (Though they're the same.)
> Oh, you're right. I wasn't even aware of that. At some point we should
> clean this up, it's an invitation for bugs...
It is. Actually it's surprising gcc didn't tell me that casting from
const uint8_t * to void * and then writing to the pointer is not a
Perhaps those structs should be made global and added to an atapi.h
header? This way you can avoid (void *) casts.
(In fact, there's a scsi.h file in the Win32 free header files waiting
to be lifted in QEMU... unfortunately, the similar atapi header file has
not been written yet though I think it is in the Windows DDK).
[Qemu-devel] [PATCH v3 5/5] atapi: GESN: implement 'media' subcommand, Amit Shah, 2011/04/12
- [Qemu-devel] [PATCH v3 1/5] atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change, (continued)