Changeset 61 in vbox for trunk/src/VBox/Devices/Serial
- Timestamp:
- Jan 16, 2007 1:15:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/serial.c
r1 r61 119 119 120 120 struct SerialState { 121 uint 8_t divider;121 uint16_t divider; 122 122 uint8_t rbr; /* receive register */ 123 123 uint8_t ier; … … 378 378 SerialState *s = opaque; 379 379 380 qemu_put_ 8s(f,&s->divider);380 qemu_put_be16s(f,&s->divider); 381 381 qemu_put_8s(f,&s->rbr); 382 382 qemu_put_8s(f,&s->ier); … … 393 393 SerialState *s = opaque; 394 394 395 if(version_id != 1)395 if(version_id > 2) 396 396 return -EINVAL; 397 397 398 qemu_get_8s(f,&s->divider); 398 if (version_id >= 2) 399 qemu_get_be16s(f, &s->divider); 400 else 401 s->divider = qemu_get_byte(f); 399 402 qemu_get_8s(f,&s->rbr); 400 403 qemu_get_8s(f,&s->ier); … … 425 428 s->msr = UART_MSR_DCD | UART_MSR_DSR | UART_MSR_CTS; 426 429 427 register_savevm("serial", base, 1, serial_save, serial_load, s);430 register_savevm("serial", base, 2, serial_save, serial_load, s); 428 431 429 432 register_ioport_write(base, 8, 1, serial_ioport_write, s); … … 512 515 s->it_shift = it_shift; 513 516 514 register_savevm("serial", base, 1, serial_save, serial_load, s);517 register_savevm("serial", base, 2, serial_save, serial_load, s); 515 518 516 519 s_io_memory = cpu_register_io_memory(0, serial_mm_read, … … 570 573 SerialState *s = PDMINS2DATA (pDevIns, SerialState *); 571 574 572 if (u32Version != 1) {575 if (u32Version != 2) { 573 576 AssertMsgFailed(("u32Version=%d\n", u32Version)); 574 577 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; … … 663 666 pDevIns->pDevReg->szDeviceName, /* pszName */ 664 667 iInstance, /* u32Instance */ 665 1/* u32Version */,668 2 /* u32Version */, 666 669 sizeof (*s), /* cbGuess */ 667 670 NULL, /* pfnSavePrep */
Note:
See TracChangeset
for help on using the changeset viewer.