Changeset 24292 in vbox for trunk/src/VBox/VMM/SSM.cpp
- Timestamp:
- Nov 3, 2009 3:19:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/SSM.cpp
r24268 r24292 6882 6882 6883 6883 /* 6884 * Format the incoming error. 6885 */ 6886 char *pszMsg; 6887 RTStrAPrintfV(&pszMsg, pszFormat, va); 6888 if (!pszMsg) 6889 { 6890 VMSetError(pSSM->pVM, VERR_NO_MEMORY, RT_SRC_POS, 6891 N_("SSMR3SetLoadErrorV ran out of memory formatting: %s\n"), pszFormat); 6892 return rc; 6893 } 6894 6895 /* 6884 6896 * Forward to VMSetError with the additional info. 6885 6897 */ … … 6887 6899 const char *pszName = pUnit ? pUnit->szName : "unknown"; 6888 6900 uint32_t uInstance = pUnit ? pUnit->u32Instance : 0; 6889 va_list vaCopy;6890 va_copy(vaCopy, va);6891 6901 if ( pSSM->enmOp == SSMSTATE_LOAD_EXEC 6892 6902 && pSSM->u.Read.uCurUnitPass == SSM_PASS_FINAL) 6893 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#u: %N [ver=%u pass=final]"), 6894 pszName, uInstance, 6895 pszFormat, &vaCopy, 6896 pSSM->u.Read.uCurUnitVer); 6903 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#%u: %s [ver=%u pass=final]"), 6904 pszName, uInstance, pszMsg, pSSM->u.Read.uCurUnitVer); 6897 6905 else if (pSSM->enmOp == SSMSTATE_LOAD_EXEC) 6898 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#u: %N [ver=%u pass=#%u]"), 6899 pszName, uInstance, 6900 pszFormat, &vaCopy, 6901 pSSM->u.Read.uCurUnitVer, pSSM->u.Read.uCurUnitPass); 6906 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#%u: %s [ver=%u pass=#%u]"), 6907 pszName, uInstance, pszMsg, pSSM->u.Read.uCurUnitVer, pSSM->u.Read.uCurUnitPass); 6902 6908 else if (pSSM->enmOp == SSMSTATE_LOAD_PREP) 6903 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#u: %N [prep]"), 6904 pszName, uInstance, 6905 pszFormat, &vaCopy); 6909 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#%u: %s [prep]"), 6910 pszName, uInstance, pszMsg); 6906 6911 else if (pSSM->enmOp == SSMSTATE_LOAD_DONE) 6907 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#u: %N [done]"), 6908 pszName, uInstance, 6909 pszFormat, &vaCopy); 6912 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#%u: %s [done]"), 6913 pszName, uInstance, pszMsg); 6910 6914 else if (pSSM->enmOp == SSMSTATE_OPEN_READ) 6911 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#u: %N [read]"), 6912 pszName, uInstance, 6913 pszFormat, &vaCopy); 6915 rc = VMSetError(pSSM->pVM, rc, RT_SRC_POS_ARGS, N_("%s#%u: %s [read]"), 6916 pszName, uInstance, pszMsg); 6914 6917 else 6915 6918 AssertFailed(); 6916 va_end(vaCopy);6917 6919 pSSM->u.Read.fHaveSetError = true; 6920 RTStrFree(pszMsg); 6918 6921 return rc; 6919 6922 }
Note:
See TracChangeset
for help on using the changeset viewer.