@@ -140,6 +140,7 @@ static int execute_command_run(SCSIGenericReq *r,
{
BlockDriverState *bdrv = r->req.dev->conf.dinfo->bdrv;
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, r->req.dev);
+ int ret;
r->io_header.interface_id = 'S';
r->io_header.dxfer_direction = sgdir[r->req.cmd.mode];
@@ -161,11 +162,16 @@ static int execute_command_run(SCSIGenericReq *r,
printf("\n");
}
#endif
+#if 0
r->req.aiocb = bdrv_aio_ioctl(bdrv, SG_IO, &r->io_header, complete, r);
if (r->req.aiocb == NULL) {
BADF("execute_command: read failed !\n");
return -1;
}
+#else
+ ret = bdrv_ioctl(bdrv, SG_IO, &r->io_header);
+ complete((void *)r, ret);
+#endif
* return 0;
}