- Timestamp:
- Aug 30, 2021 4:03:15 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r90979 r91004 1289 1289 1290 1290 /* 1291 * Daemonize ourselves if asked to. 1291 * Handle special command line options which need parsing before 1292 * everything else. 1292 1293 */ 1293 1294 bool fDaemonize = false; 1294 1295 bool fDaemonized = false; 1295 1296 1296 for (int i = 1; i < argc; i++) 1297 { 1298 const char *psz = argv[i]; 1299 if (!RTStrICmp(psz, "--daemonize")) 1300 { 1301 fDaemonize = true; 1302 continue; 1303 } 1304 else if (!RTStrICmp(psz, "--daemonized")) 1305 { 1306 fDaemonized = true; 1307 continue; 1297 RTGETOPTSTATE GetState; 1298 rc = RTGetOptInit(&GetState, argc, argv, g_aCmdCommonOptions, 1299 RT_ELEMENTS(g_aCmdCommonOptions), 1 /*idxFirst*/, 0 /*fFlags - must not sort! */); 1300 AssertRCReturn(rc, RTEXITCODE_INIT); 1301 1302 int ch; 1303 RTGETOPTUNION ValueUnion; 1304 while ((ch = RTGetOpt(&GetState, &ValueUnion)) != 0) 1305 { 1306 switch (ch) 1307 { 1308 case AUDIO_TEST_OPT_CMN_DAEMONIZE: 1309 fDaemonize = true; 1310 break; 1311 1312 case AUDIO_TEST_OPT_CMN_DAEMONIZED: 1313 fDaemonized = true; 1314 break; 1315 1316 case 'v': 1317 g_uVerbosity++; 1318 break; 1319 1320 default: 1321 break; 1308 1322 } 1309 1323 } … … 1350 1364 RT_ELEMENTS(g_apszLogGroups), g_apszLogGroups, RTLOGDEST_STDERR, NULL /*"vkat-release.log"*/); 1351 1365 if (RT_SUCCESS(rc)) 1366 { 1352 1367 RTLogRelSetDefaultInstance(g_pRelLogger); 1368 if (g_uVerbosity) 1369 { 1370 RTMsgInfo("Setting verbosity logging to level %u\n", g_uVerbosity); 1371 rc = RTLogGroupSettings(g_pRelLogger, 1372 "drv_audio.e.l.l2.l3.f" 1373 " audio_mixer.e.l.l2.l3.f" 1374 " audio_test.e.l.l2.l3.f"); 1375 if (RT_FAILURE(rc)) 1376 RTMsgError("Setting debug logging failed, rc=%Rrc\n", rc); 1377 } 1378 } 1353 1379 else 1354 1380 RTMsgWarning("Failed to create release logger: %Rrc", rc); … … 1369 1395 * Process common options. 1370 1396 */ 1371 RT GETOPTSTATE GetState;1397 RT_ZERO(GetState); 1372 1398 rc = RTGetOptInit(&GetState, argc, argv, g_aCmdCommonOptions, 1373 1399 RT_ELEMENTS(g_aCmdCommonOptions), 1 /*idxFirst*/, 0 /*fFlags - must not sort! */); 1374 1400 AssertRCReturn(rc, RTEXITCODE_INIT); 1375 1401 1376 int ch;1377 RTGETOPTUNION ValueUnion;1378 1402 while ((ch = RTGetOpt(&GetState, &ValueUnion)) != 0) 1379 1403 {
Note:
See TracChangeset
for help on using the changeset viewer.