| 42 | }); |
| 43 | |
| 44 | int mainRead(int argc, const char* argv[]) |
| 45 | { |
| 46 | if (argc == 1) |
| 47 | showProfiles("read", formats); |
| 48 | globalConfig().set("flux_source.type", "FLUXTYPE_DRIVE"); |
| 49 | flags.parseFlagsWithConfigFiles(argc, argv, formats); |
| 50 | |
| 51 | if (globalConfig()->decoder().copy_flux_to().type() == FLUXTYPE_DRIVE) |
| 52 | error("you cannot copy flux to a hardware device"); |
| 53 | |
| 54 | auto diskLayout = createDiskLayout(globalConfig()); |
| 55 | auto fluxSource = FluxSource::create(globalConfig()); |
| 56 | auto decoder = Arch::createDecoder(globalConfig()); |
| 57 | auto writer = ImageWriter::create(globalConfig()); |
| 58 | |
| 59 | readDiskCommand(*diskLayout, *fluxSource, *decoder, *writer); |
| 60 | |
| 61 | return 0; |
| 62 | } |
nothing calls this directly
no test coverage detected