Lines Matching refs:argv

39 static void usage(FILE* where, BootCtlVersion bootVersion, int /* argc */, char* argv[])  in usage()  argument
57 argv[0], argv[0]); in usage()
170 int argc, char *argv[]) { in do_set_snapshot_merge_status() argument
172 usage(stderr, bootVersion, argc, argv); in do_set_snapshot_merge_status()
177 auto status = stringToMergeStatus(argv[2]); in do_set_snapshot_merge_status()
179 usage(stderr, bootVersion, argc, argv); in do_set_snapshot_merge_status()
228 static uint32_t parse_slot(BootCtlVersion bootVersion, int pos, int argc, char *argv[]) in parse_slot() argument
231 usage(stderr, bootVersion, argc, argv); in parse_slot()
236 uint64_t ret = strtoul(argv[pos], NULL, 10); in parse_slot()
238 usage(stderr, bootVersion, argc, argv); in parse_slot()
245 int main(int argc, char *argv[]) in main() argument
262 usage(stderr, bootVersion, argc, argv); in main()
267 if (strcmp(argv[1], "hal-info") == 0) { in main()
269 } else if (strcmp(argv[1], "get-number-slots") == 0) { in main()
271 } else if (strcmp(argv[1], "get-current-slot") == 0) { in main()
273 } else if (strcmp(argv[1], "mark-boot-successful") == 0) { in main()
275 } else if (strcmp(argv[1], "set-active-boot-slot") == 0) { in main()
276 return do_set_active_boot_slot(v1_0_module, parse_slot(bootVersion, 2, argc, argv)); in main()
277 } else if (strcmp(argv[1], "set-slot-as-unbootable") == 0) { in main()
278 return do_set_slot_as_unbootable(v1_0_module, parse_slot(bootVersion, 2, argc, argv)); in main()
279 } else if (strcmp(argv[1], "is-slot-bootable") == 0) { in main()
280 return do_is_slot_bootable(v1_0_module, parse_slot(bootVersion, 2, argc, argv)); in main()
281 } else if (strcmp(argv[1], "is-slot-marked-successful") == 0) { in main()
282 return do_is_slot_marked_successful(v1_0_module, parse_slot(bootVersion, 2, argc, argv)); in main()
283 } else if (strcmp(argv[1], "get-suffix") == 0) { in main()
284 return do_get_suffix(v1_0_module, parse_slot(bootVersion, 2, argc, argv)); in main()
288 if (strcmp(argv[1], "set-snapshot-merge-status") == 0 || in main()
289 strcmp(argv[1], "get-snapshot-merge-status") == 0 ) { in main()
295 if (strcmp(argv[1], "set-snapshot-merge-status") == 0) { in main()
296 return do_set_snapshot_merge_status(v1_1_module, bootVersion, argc, argv); in main()
297 } else if (strcmp(argv[1], "get-snapshot-merge-status") == 0) { in main()
303 usage(stderr, bootVersion, argc, argv); in main()