Changeset 93578 in vbox for trunk/src/VBox
- Timestamp:
- Feb 3, 2022 12:39:56 PM (3 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/UnattendedImpl.h
r93575 r93578 39 39 Utf8Str mName; 40 40 Utf8Str mVersion; 41 Utf8Str mArch; 41 42 uint32_t mImageIndex; 42 43 Utf8Str getNameAndVersion() const; -
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r93577 r93578 193 193 Utf8Str WIMImage::getNameAndVersion() const 194 194 { 195 if (mVersion.isEmpty() && mArch.isEmpty()) 196 return mName; 197 if (mArch.isEmpty()) 198 return Utf8StrFmt("%s (%s)", mName.c_str(), mVersion.c_str()); 195 199 if (mVersion.isEmpty()) 196 return mName;197 return Utf8StrFmt("%s (%s )", mName.c_str(), mVersion.c_str());200 return Utf8StrFmt("%s (%s)", mName.c_str(), mArch.c_str()); 201 return Utf8StrFmt("%s (%s / %s)", mName.c_str(), mVersion.c_str(), mArch.c_str()); 198 202 } 199 203 … … 587 591 if (pElmArch) 588 592 { 589 const char *psz Value= pElmArch->getValue();590 if (psz Value && *pszValue)593 const char *pszArch = pElmArch->getValue(); 594 if (pszArch && *pszArch) 591 595 { 592 596 uint32_t uArch; 593 int vrc = RTStrToUInt32Ex(pszValue, NULL, 10 /*uBase*/, &uArch); 594 if (RT_SUCCESS(vrc) && vrc != VWRN_NUMBER_TOO_BIG && vrc != VWRN_NEGATIVE_UNSIGNED) 595 { 596 597 } 597 int vrc = RTStrToUInt32Ex(pszArch, NULL, 10 /*uBase*/, &uArch); 598 if ( RT_SUCCESS(vrc) 599 && vrc != VWRN_NUMBER_TOO_BIG 600 && vrc != VWRN_NEGATIVE_UNSIGNED 601 && uArch < RT_ELEMENTS(s_apszArchs)) 602 newImage.mArch = s_apszArchs[uArch]; 603 else 604 LogRel(("Unattended: bogus ARCH element value: '%s'\n", pszArch)); 598 605 } 599 606 }
Note:
See TracChangeset
for help on using the changeset viewer.