Signed-off-by: Pavel Hrdina <phrd...@redhat.com> --- hw/fdc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/fdc.c b/hw/fdc.c index edf0706..decb1f7 100644 --- a/hw/fdc.c +++ b/hw/fdc.c @@ -1705,7 +1705,8 @@ static void fdctrl_handle_relative_seek_out(FDCtrl *fdctrl, int direction) fd_seek(cur_drv, cur_drv->head, cur_drv->max_track - 1, cur_drv->sect, 1); } else { - fd_seek(cur_drv, cur_drv->head, fdctrl->fifo[2], cur_drv->sect, 1); + fd_seek(cur_drv, cur_drv->head, + cur_drv->track + fdctrl->fifo[2], cur_drv->sect, 1); } fdctrl_reset_fifo(fdctrl); /* Raise Interrupt */ @@ -1721,7 +1722,8 @@ static void fdctrl_handle_relative_seek_in(FDCtrl *fdctrl, int direction) if (fdctrl->fifo[2] > cur_drv->track) { fd_seek(cur_drv, cur_drv->head, 0, cur_drv->sect, 1); } else { - fd_seek(cur_drv, cur_drv->head, fdctrl->fifo[2], cur_drv->sect, 1); + fd_seek(cur_drv, cur_drv->head, + cur_drv->track - fdctrl->fifo[2], cur_drv->sect, 1); } fdctrl_reset_fifo(fdctrl); /* Raise Interrupt */ -- 1.7.10.4