Changeset 93121 in vbox for trunk/src/VBox/Main/src-server/UnattendedScript.cpp
- Timestamp:
- Jan 4, 2022 2:58:46 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedScript.cpp
r93115 r93121 539 539 { 540 540 //parse the placeholder and extract the OS version from there 541 RTCString strPlaceHolder(pachPlaceholder); 541 RTCString strPlaceHolder(pachPlaceholder); /** @todo r=bird: What's the meaning of duplicating the rest of the script here 542 * when you could just add cchPlaceholder to the parameter list and limit it to 543 * what is actually needed. OTOH it's really not needed to make copies here, 544 * validating the "[" can be done in the partial match above and "]@@" by using 545 * cchPlaceholder, what you wnat to get at is inbetween and does not need 546 * two copies (only one for RTStrVersionCompare). */ 542 547 size_t startPos = sizeof("@@VBOX_COND_GUEST_VERSION") - 1;//-1 is for '\n' 543 548 size_t endPos = strPlaceHolder.find("@@", startPos + 2); … … 548 553 //The end of placeholder is "@@" like for others. 549 554 555 /** @todo r=bird: What kind of syntax checking is this? Ignore any kind of 556 * mistyped stuff and let the user figure out what he did wrong 557 * without clues? Lazy. */ 550 558 if ( strPlaceHolder[endPos] == '@' 551 559 && strPlaceHolder[endPos+1] == '@' )
Note:
See TracChangeset
for help on using the changeset viewer.