From: Unsung Lee Date: Thu, 19 Dec 2024 02:51:22 +0000 (+0900) Subject: osu: Print available board param with --help option X-Git-Tag: accepted/tizen/unified/20250107.102105~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c42104df53b8c3e1e3526d4ab3c18a83727fc72;p=platform%2Fcore%2Fsystem%2Fupdate-control.git osu: Print available board param with --help option 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 [,...] Print value of a board param Use as 'help' for details. --set-board-param [,...] Set value of a board param Use 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: 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: , 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: * Parameters should be provided separated with ','. * e.g. "upgrade_progress_status,100" Change-Id: Idf6df267c5955d38f525e6aaa6cea089b3f1a90d Signed-off-by: Unsung Lee --- diff --git a/tools/osu/osu.c b/tools/osu/osu.c index 78c7b64..f9945af 100644 --- a/tools/osu/osu.c +++ b/tools/osu/osu.c @@ -228,7 +228,10 @@ int main(int argc, char **argv) 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)