Print available board parameters when the user requests osu --help.
The result of osu --help:
Usage:
osu [--help|--resize|--update]
Possible arguments:
--help Print this help
--update Trigger the OS Upgrade (Offline Upgrade)
--offline-update Trigger the OS Offline Upgrade
--online-update Trigger the OS Online Upgrade
--resize Run resize2fs on the rootfs partition.
After that, performing the OS Upgrade will be impossible.
--get-board-param <param name>[,<param>...] Print value of a board param
Use <param name> as 'help' for details.
--set-board-param <param name>[,<param>...] Set value of a board param
Use <param name> as 'help' for details.
Available getter board params:
boot-mode: Get boot mode.
current-partition: Get current partition (a or b)
partition-ab-cloned: Get partition is cloned or not: 1 is cloned, 0 is not cloned.
partition-status: Get partition status. 1 param is required: 'a' or 'b'.
upgrade-progress-status: Get current upgrade progress status: -1 ~ 100
upgrade-state: Get current upgrade state.
upgrade-type: Get current upgrade type: offline or online
* Parameters should be provided separated with ','.
* e.g. "partition-status,a"
Available setter board params:
partition-ab: Switch partition between a/b. 1 param is required: <a, b or toggle>
partition-ab-cloned: Set cloned flag 0 or 1. 1 param is required: <0 or 1>
partition-status: Set partition status. 2 params are required: <a, b>,<ok, failed or corrupted>
upgrade-progress-status: Set upgrade progress status. 1 integer is requied: <-1 ~ 100>
upgrade-state: Set upgrade state. 2 params are required.
upgrade-type: Set upgrade type. 1 param is required: <online or offline>
* Parameters should be provided separated with ','.
* e.g. "upgrade_progress_status,100"
Change-Id: Idf6df267c5955d38f525e6aaa6cea089b3f1a90d
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
if (args.help) {
print_help(argv[0]);
- return 0;
+
+ args.get_board_param = true;
+ args.set_board_param = true;
+ return print_argument(&args);
}
if (args.resize)