diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2010-10-31 22:05:47 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-11-01 16:23:09 +0100 |
commit | b8315d622de3124f1e00c55f19d32b2d63180247 (patch) | |
tree | edaf6f77a13eebd2b8d05cb0df5c160381b5bbf8 | |
parent | dc6234d9c6361b7c1dc8808aa6667992aa42859a (diff) | |
download | barebox-b8315d622de3124f1e00c55f19d32b2d63180247.tar.gz barebox-b8315d622de3124f1e00c55f19d32b2d63180247.tar.xz |
doc: unify documentation for 'tftp'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-rw-r--r-- | Doxyfile | 3 | ||||
-rw-r--r-- | net/tftp.c | 49 |
2 files changed, 23 insertions, 29 deletions
@@ -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 <remotefile> [localfile]\n" -"Load a file from a TFTP server.\n" +BAREBOX_CMD_HELP_START(tftp) #ifdef CONFIG_NET_TFTP_PUSH -"or\n" -" tftp -p <localfile> [remotefile]\n" -"Upload a file to a TFTP server\n" +BAREBOX_CMD_HELP_USAGE("tftp <remotefile> [localfile], tftp -p <localfile> [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 <remotefile> [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). + +\<localfile> 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 \<remotefilename\> [\<localfilename\>] - * - * or - * - * tftp -p \<localfilename\> [\<remotefilename\>] - * - * 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). - * - * \<localfile> 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. - */ - |