Changeset 39142 in vbox
- Timestamp:
- Oct 28, 2011 3:03:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/testcase/tstOhciRegisterAccess.cpp
r39141 r39142 112 112 if (u32A != uChangedValue) 113 113 pszError = "Writing changed value failed"; 114 else 115 { 116 u32A = *uPtrReg.pu32; 117 if (u32A != uInitialValue) 118 pszError = "Restore error 1"; 119 } 114 120 } 115 121 else … … 120 126 * Write byte changes. 121 127 */ 122 if (!pszError) 123 { 124 125 } 126 128 for (unsigned iByte = 0; !pszError && iByte < 4; iByte) 129 { 130 /* Change the value. */ 131 uPtrReg.pu8[iByte] = (uint8_t)(uChangedValue >> iByte * 8); 132 u32A = *uPtrReg.pu32; 133 *uPtrReg.pu32 = uInitialValue; 134 if (u32A != (uChangedValue & UINT32_C(0xff) << iByte * 8)) 135 { 136 static const char * const s_apsz[] = { "byte 0", "byte 1", "byte 2", "byte 3" }; 137 pszError = s_apsz[iByte]; 138 } 139 else 140 { 141 u32A = *uPtrReg.pu32; 142 if (u32A != uInitialValue) 143 pszError = "Restore error 2"; 144 } 145 } 127 146 128 147 *uPtrReg.pu32 = uInitialValue;
Note:
See TracChangeset
for help on using the changeset viewer.