Changeset 11212 in vbox for trunk/src/VBox
- Timestamp:
- Aug 7, 2008 4:19:03 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34259
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevRTC.cpp
r11211 r11212 827 827 * Init the data. 828 828 */ 829 rc = CFGMR3QueryU8(pCfgHandle, "Irq", &u8Irq); 830 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 831 u8Irq = 8; 832 else if (RT_FAILURE(rc)) 829 rc = CFGMR3QueryU8Def(pCfgHandle, "Irq", &u8Irq, 8); 830 if (RT_FAILURE(rc)) 833 831 return PDMDEV_SET_ERROR(pDevIns, rc, 834 832 N_("Configuration error: Querying \"Irq\" as a uint8_t failed")); 835 833 836 rc = CFGMR3QueryU16(pCfgHandle, "Base", &u16Base); 837 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 838 u16Base = 0x70; 839 else if (RT_FAILURE(rc)) 834 rc = CFGMR3QueryU16Def(pCfgHandle, "Base", &u16Base, 0x70); 835 if (RT_FAILURE(rc)) 840 836 return PDMDEV_SET_ERROR(pDevIns, rc, 841 837 N_("Configuration error: Querying \"Base\" as a uint16_t failed")); 842 838 843 rc = CFGMR3QueryBool(pCfgHandle, "GCEnabled", &fGCEnabled); 844 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 845 fGCEnabled = true; 846 else if (RT_FAILURE(rc)) 839 rc = CFGMR3QueryBoolDef(pCfgHandle, "GCEnabled", &fGCEnabled, true); 840 if (RT_FAILURE(rc)) 847 841 return PDMDEV_SET_ERROR(pDevIns, rc, 848 842 N_("Configuration error: failed to read GCEnabled as boolean")); 849 843 850 rc = CFGMR3QueryBool(pCfgHandle, "R0Enabled", &fR0Enabled); 851 if (rc == VERR_CFGM_VALUE_NOT_FOUND) 852 fR0Enabled = true; 853 else if (RT_FAILURE(rc)) 844 rc = CFGMR3QueryBoolDef(pCfgHandle, "R0Enabled", &fR0Enabled, true); 845 if (RT_FAILURE(rc)) 854 846 return PDMDEV_SET_ERROR(pDevIns, rc, 855 847 N_("Configuration error: failed to read R0Enabled as boolean")); 856 848 857 Log((" CMOS: fGCEnabled=%d fR0Enabled=%d\n", fGCEnabled, fR0Enabled));849 Log(("RTC: Irq=%#x Base=%#x fGCEnabled=%RTbool fR0Enabled=%RTbool\n", u8Irq, u16Base, fGCEnabled, fR0Enabled)); 858 850 859 851
Note:
See TracChangeset
for help on using the changeset viewer.