MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / ide_sector_write_cb1

Function ide_sector_write_cb1

tinyemu/ide.c:428–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428static void ide_sector_write_cb1(IDEState *s)
429{
430 int64_t sector_num;
431 int ret;
432
433 ide_transfer_stop(s);
434 sector_num = ide_get_sector(s);
435#if defined(DEBUG_IDE)
436 printf("write sector=%" PRId64 " count=%d\n",
437 sector_num, s->io_nb_sectors);
438#endif
439 ret = s->bs->write_async(s->bs, sector_num, s->io_buffer, s->io_nb_sectors,
440 ide_sector_write_cb2, s);
441 if (ret < 0) {
442 /* error */
443 ide_abort_command(s);
444 ide_set_irq(s);
445 } else if (ret == 0) {
446 /* synchronous case (needed for performance) */
447 ide_sector_write_cb2(s, 0);
448 } else {
449 /* async case */
450 s->status = READY_STAT | SEEK_STAT | BUSY_STAT;
451 }
452}
453
454static void ide_sector_write_cb2(void *opaque, int ret)
455{

Callers

nothing calls this directly

Calls 5

ide_transfer_stopFunction · 0.85
ide_get_sectorFunction · 0.85
ide_abort_commandFunction · 0.85
ide_set_irqFunction · 0.85
ide_sector_write_cb2Function · 0.85

Tested by

no test coverage detected