| 411 | } |
| 412 | |
| 413 | int 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 | } |
nothing calls this directly
no test coverage detected