Changeset 36135 in vbox for trunk/src/VBox/Storage/testcase
- Timestamp:
- Mar 2, 2011 11:43:51 PM (14 years ago)
- Location:
- trunk/src/VBox/Storage/testcase
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/testcase/tstVDIo.cpp
r36134 r36135 289 289 static DECLCALLBACK(int) vdScriptHandlerCompareDisks(PVDTESTGLOB pGlob, PVDSCRIPTARG paScriptArgs, unsigned cScriptArgs); 290 290 static DECLCALLBACK(int) vdScriptHandlerDumpDiskInfo(PVDTESTGLOB pGlob, PVDSCRIPTARG paScriptArgs, unsigned cScriptArgs); 291 static DECLCALLBACK(int) vdScriptHandlerPrintMsg(PVDTESTGLOB pGlob, PVDSCRIPTARG paScriptArgs, unsigned cScriptArgs); 291 292 292 293 /* create action */ … … 404 405 /* pcszName chId enmType fFlags */ 405 406 {"disk", 'd', VDSCRIPTARGTYPE_STRING, VDSCRIPTARGDESC_FLAG_MANDATORY}, 407 }; 408 409 /* Print message */ 410 const VDSCRIPTARGDESC g_aArgPrintMsg[] = 411 { 412 /* pcszName chId enmType fFlags */ 413 {"msg", 'm', VDSCRIPTARGTYPE_STRING, VDSCRIPTARGDESC_FLAG_MANDATORY}, 406 414 }; 407 415 … … 423 431 {"comparedisks", g_aArgCompareDisks, RT_ELEMENTS(g_aArgCompareDisks), vdScriptHandlerCompareDisks}, 424 432 {"dumpdiskinfo", g_aArgDumpDiskInfo, RT_ELEMENTS(g_aArgDumpDiskInfo), vdScriptHandlerDumpDiskInfo}, 433 {"print", g_aArgPrintMsg, RT_ELEMENTS(g_aArgPrintMsg), vdScriptHandlerPrintMsg} 425 434 }; 426 435 … … 1442 1451 } 1443 1452 1453 static DECLCALLBACK(int) vdScriptHandlerPrintMsg(PVDTESTGLOB pGlob, PVDSCRIPTARG paScriptArgs, unsigned cScriptArgs) 1454 { 1455 RTPrintf("%s\n", paScriptArgs[0].u.pcszString); 1456 return VINF_SUCCESS; 1457 } 1458 1444 1459 static DECLCALLBACK(int) tstVDIoFileOpen(void *pvUser, const char *pszLocation, 1445 1460 uint32_t fOpen, … … 1541 1556 PVDTESTGLOB pGlob = (PVDTESTGLOB)pvUser; 1542 1557 bool fFound = false; 1558 1559 /* 1560 * Some backends use ./ for paths, strip it. 1561 * @todo: Implement proper directory support for the 1562 * memory filesystem. 1563 */ 1564 if ( strlen(pcszFilename) >= 2 1565 && *pcszFilename == '.' 1566 && pcszFilename[1] == '/') 1567 pcszFilename += 2; 1543 1568 1544 1569 /* Check if the file exists. */
Note:
See TracChangeset
for help on using the changeset viewer.