Revision 42741212 hw/scsi-generic.c
b/hw/scsi-generic.c | ||
---|---|---|
277 | 277 |
|
278 | 278 |
/* Write data to a scsi device. Returns nonzero on failure. |
279 | 279 |
The transfer may complete asynchronously. */ |
280 |
static int scsi_write_data(SCSIRequest *req)
|
|
280 |
static void scsi_write_data(SCSIRequest *req)
|
|
281 | 281 |
{ |
282 | 282 |
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev); |
283 | 283 |
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req); |
... | ... | |
287 | 287 |
if (r->len == 0) { |
288 | 288 |
r->len = r->buflen; |
289 | 289 |
scsi_req_data(&r->req, r->len); |
290 |
return 0;
|
|
290 |
return; |
|
291 | 291 |
} |
292 | 292 |
|
293 | 293 |
ret = execute_command(s->bs, r, SG_DXFER_TO_DEV, scsi_write_complete); |
294 | 294 |
if (ret < 0) { |
295 | 295 |
scsi_command_complete(r, ret); |
296 |
return 1; |
|
297 | 296 |
} |
298 |
|
|
299 |
return 0; |
|
300 | 297 |
} |
301 | 298 |
|
302 | 299 |
/* Return a pointer to the data buffer. */ |
Also available in: Unified diff