• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂e2f775205a3523751ac479ec3194eb054376419d (tree)
時間2011-08-05 06:19:04
作者Anthony Liguori <aliguori@us.i...>
CommiterAnthony Liguori

Log Message

Revert "floppy: save and restore DIR register"

This reverts commit 7d905f716bea633f2836e1d661387983aacdc6d6.

The use of subsections by this commit are broken because of a fundamental
limitations of subsections in the current protocol.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Change Summary

差異

--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -36,7 +36,6 @@
3636 #include "qdev-addr.h"
3737 #include "blockdev.h"
3838 #include "sysemu.h"
39-#include "block_int.h"
4039
4140 /********************************************************/
4241 /* debug Floppy devices */
@@ -83,7 +82,6 @@ typedef struct FDrive {
8382 uint8_t max_track; /* Nb of tracks */
8483 uint16_t bps; /* Bytes per sector */
8584 uint8_t ro; /* Is read-only */
86- uint8_t media_changed; /* Is media changed */
8785 } FDrive;
8886
8987 static void fd_init(FDrive *drv)
@@ -535,63 +533,16 @@ static CPUWriteMemoryFunc * const fdctrl_mem_write_strict[3] = {
535533 NULL,
536534 };
537535
538-static void fdrive_media_changed_pre_save(void *opaque)
539-{
540- FDrive *drive = opaque;
541-
542- drive->media_changed = drive->bs->media_changed;
543-}
544-
545-static int fdrive_media_changed_post_load(void *opaque, int version_id)
546-{
547- FDrive *drive = opaque;
548-
549- if (drive->bs != NULL) {
550- drive->bs->media_changed = drive->media_changed;
551- }
552-
553- /* User ejected the floppy when drive->bs == NULL */
554- return 0;
555-}
556-
557-static bool fdrive_media_changed_needed(void *opaque)
558-{
559- FDrive *drive = opaque;
560-
561- return (drive->bs != NULL && drive->bs->media_changed != 1);
562-}
563-
564-static const VMStateDescription vmstate_fdrive_media_changed = {
565- .name = "fdrive/media_changed",
566- .version_id = 1,
567- .minimum_version_id = 1,
568- .minimum_version_id_old = 1,
569- .pre_save = fdrive_media_changed_pre_save,
570- .post_load = fdrive_media_changed_post_load,
571- .fields = (VMStateField[]) {
572- VMSTATE_UINT8(media_changed, FDrive),
573- VMSTATE_END_OF_LIST()
574- }
575-};
576-
577536 static const VMStateDescription vmstate_fdrive = {
578537 .name = "fdrive",
579538 .version_id = 1,
580539 .minimum_version_id = 1,
581540 .minimum_version_id_old = 1,
582- .fields = (VMStateField[]) {
541+ .fields = (VMStateField []) {
583542 VMSTATE_UINT8(head, FDrive),
584543 VMSTATE_UINT8(track, FDrive),
585544 VMSTATE_UINT8(sect, FDrive),
586545 VMSTATE_END_OF_LIST()
587- },
588- .subsections = (VMStateSubsection[]) {
589- {
590- .vmsd = &vmstate_fdrive_media_changed,
591- .needed = &fdrive_media_changed_needed,
592- } , {
593- /* empty */
594- }
595546 }
596547 };
597548