scp.c - Fixed RESTORE command to detach all attached devices before actually restoring. The goal here is to make restore behavior consistent without regard to the current VM state prior to the restore.

This commit is contained in:
Mark Pizzolato 2012-10-24 12:56:03 -07:00
parent 9411f3f4bd
commit 99f042f7dc

2
scp.c
View file

@ -3333,7 +3333,7 @@ if (v32) { /* [V3.2+] time as strin
} }
else READ_I (sim_time); /* sim time */ else READ_I (sim_time); /* sim time */
READ_I (sim_rtime); /* [V2.6+] sim rel time */ READ_I (sim_rtime); /* [V2.6+] sim rel time */
detach_all (0, 0); /* Detach everything to start from a consistent state */
for ( ;; ) { /* device loop */ for ( ;; ) { /* device loop */
READ_S (buf); /* read device name */ READ_S (buf); /* read device name */
if (buf[0] == 0) /* last? */ if (buf[0] == 0) /* last? */