From 06178392ce65ee5b6bf19520c8faebea885cacc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 4 May 2017 16:43:04 +0200 Subject: [PATCH] reboot: add documentation --- src/systemcmds/reboot/reboot.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/systemcmds/reboot/reboot.c b/src/systemcmds/reboot/reboot.c index c069b6302f..2d0c5ae970 100644 --- a/src/systemcmds/reboot/reboot.c +++ b/src/systemcmds/reboot/reboot.c @@ -40,11 +40,20 @@ #include #include #include +#include #include #include __EXPORT int reboot_main(int argc, char *argv[]); +static void print_usage(void) +{ + PRINT_MODULE_DESCRIPTION("Reboot the system"); + + PRINT_MODULE_USAGE_NAME_SIMPLE("reboot", "command"); + PRINT_MODULE_USAGE_PARAM_FLAG('b', "Reboot into bootloader", true); +} + int reboot_main(int argc, char *argv[]) { int ch; @@ -60,9 +69,8 @@ int reboot_main(int argc, char *argv[]) break; default: - PX4_ERR("usage: reboot [-b]\n" - " -b reboot into the bootloader"); - break; + print_usage(); + return 1; } }