MCPcopy Create free account
hub / github.com/Icinga/icinga2 / wmain

Function wmain

plugins/check_disk.cpp:413–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413int wmain(int argc, WCHAR **argv)
414{
415 std::vector<drive> vDrives;
416 printInfoStruct printInfo;
417 po::variables_map vm;
418
419 int ret;
420
421 ret = parseArguments(argc, argv, vm, printInfo);
422 if (ret != -1)
423 return ret;
424
425 printInfo.warn.legal = !printInfo.warn.legal;
426 printInfo.crit.legal = !printInfo.crit.legal;
427
428 if (printInfo.drives.empty())
429 ret = check_drives(vDrives, printInfo.exclude_drives);
430 else
431 ret = check_drives(vDrives, printInfo);
432
433 if (ret != -1)
434 return ret;
435
436 for (std::vector<drive>::iterator it = vDrives.begin(); it != vDrives.end(); ++it) {
437 if (!getDriveSpaceValues(*it, printInfo.unit)) {
438 std::wcout << "Failed to access drive at " << it->name << '\n';
439 return 3;
440 }
441 }
442
443 return printOutput(printInfo, vDrives);
444}

Callers

nothing calls this directly

Calls 7

check_drivesFunction · 0.85
getDriveSpaceValuesFunction · 0.85
parseArgumentsFunction · 0.70
printOutputFunction · 0.70
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected