From b8315d622de3124f1e00c55f19d32b2d63180247 Mon Sep 17 00:00:00 2001 From: Robert Schwebel Date: Sun, 31 Oct 2010 22:05:47 +0100 Subject: doc: unify documentation for 'tftp' Signed-off-by: Robert Schwebel --- Doxyfile | 3 ++- net/tftp.c | 49 +++++++++++++++++++++---------------------------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/Doxyfile b/Doxyfile index f03058444a..d9ce22c0e3 100644 --- a/Doxyfile +++ b/Doxyfile @@ -1069,7 +1069,8 @@ INCLUDE_FILE_PATTERNS = PREDEFINED = \ DOXYGEN_SHOULD_SKIP_THIS \ - CONFIG_CMD_DEVINFO + CONFIG_CMD_DEVINFO \ + CONFIG_NET_TFTP_PUSH # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. diff --git a/net/tftp.c b/net/tftp.c index 6345a7220d..6be8b8f623 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -364,15 +364,29 @@ out_close: return tftp_err == 0 ? 0 : 1; } -static const __maybe_unused char cmd_tftp_help[] = -"Usage: tftp [localfile]\n" -"Load a file from a TFTP server.\n" +BAREBOX_CMD_HELP_START(tftp) #ifdef CONFIG_NET_TFTP_PUSH -"or\n" -" tftp -p [remotefile]\n" -"Upload a file to a TFTP server\n" +BAREBOX_CMD_HELP_USAGE("tftp [localfile], tftp -p [remotefile]\n") +BAREBOX_CMD_HELP_SHORT("Load a file from or upload to TFTP server.\n") +BAREBOX_CMD_HELP_END +#else +BAREBOX_CMD_HELP_USAGE("tftp [localfile]\n") +BAREBOX_CMD_HELP_SHORT("Load a file from a TFTP server.\n") +BAREBOX_CMD_HELP_END #endif -; + +/** + * @page tftp_command + +The second file argument can be skipped in which case the first filename +is used (without the directory part). + +\ can be the local filename or a device file under /dev. +This also works for flash memory. Refer to \ref erase_command and \ref +unprotect_command for flash preparation. + +\note This command is available only if enabled in menuconfig. + */ BAREBOX_CMD_START(tftp) .cmd = do_tftpb, @@ -384,24 +398,3 @@ BAREBOX_CMD_START(tftp) BAREBOX_CMD_HELP(cmd_tftp_help) BAREBOX_CMD_END -/** - * @page tftp_command tftp - * - * Usage: - * tftp \ [\] - * - * or - * - * tftp -p \ [\] - * - * Load a file from a tftp server or upload a file to a tftp server if - * the -p option is given. The second file argument can be skipped in - * which case the first filename is used (without the directory part). - * - * \ can be the local filename or a device file under /dev. - * This also works for flash memory. Refer to \b erase, \b unprotect for - * flash preparation. - * - * Note: This command is available only if enabled in menuconfig. - */ - -- cgit v1.2.3