diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2010-11-01 17:41:42 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-11-02 17:55:11 +0100 |
commit | 1114c84bc700a725e06b897681a086f0bd173476 (patch) | |
tree | 8f895cb46222ae1a2f247b435bbbcb6a7278010d /commands | |
parent | a3921e369f5d7381042d5b4d2c5a01155c496ec6 (diff) | |
download | barebox-1114c84bc700a725e06b897681a086f0bd173476.tar.gz barebox-1114c84bc700a725e06b897681a086f0bd173476.tar.xz |
doc: unify documentation for 'protect' and 'unprotect'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/flash.c | 70 |
1 files changed, 42 insertions, 28 deletions
diff --git a/commands/flash.c b/commands/flash.c index 4549f0adac..9a0eb50371 100644 --- a/commands/flash.c +++ b/commands/flash.c @@ -162,43 +162,57 @@ out: return ret; } -static const __maybe_unused char cmd_protect_help[] = -"Usage: (un)protect <device> [area]\n" -"(un)protect a flash device or parts of a device if an area specification\n" -"is given\n"; +BAREBOX_CMD_HELP_START(protect) +BAREBOX_CMD_HELP_USAGE("protect <device> [area]\n") +BAREBOX_CMD_HELP_SHORT("protect a flash device (or parts of a device, if an area is specified)\n") +BAREBOX_CMD_HELP_END BAREBOX_CMD_START(protect) .cmd = do_protect, - .usage = "enable FLASH write protection", + .usage = "enable flash write protection", BAREBOX_CMD_HELP(cmd_protect_help) BAREBOX_CMD_END +/** + * @page protect_command + +Protect the flash memory behind the device. It depends on the device +given, what area will be protected. If the device represents the whole +flash memory the whole memory will be protected. If the device +represents a partition on a main flash memory, only this partition part +will be protected. + +Refer addpart_command, delpart_command and devinfo_command for partition +handling. + +\todo Rework this documentation, what is an 'area'? Explain more about +flashes here. + + */ + +BAREBOX_CMD_HELP_START(unprotect) +BAREBOX_CMD_HELP_USAGE("unprotect <device> [area]\n") +BAREBOX_CMD_HELP_SHORT("unprotect a flash device (or parts of a device, if an area is specified)\n") +BAREBOX_CMD_HELP_END + BAREBOX_CMD_START(unprotect) .cmd = do_protect, - .usage = "disable FLASH write protection", - BAREBOX_CMD_HELP(cmd_protect_help) + .usage = "disable flash write protection", + BAREBOX_CMD_HELP(cmd_unprotect_help) BAREBOX_CMD_END -/** @page protect_command protect Protect a flash memory - * - * Usage is: protect \<devicee> - * - * Protect the flash memory behind the device. It depends on the device given, - * what area will be protected. If the device represents the whole flash memory - * the whole memory will be protected. If the device represents a partition on - * a main flash memory, only this partition part will be protected. - * - * Refer \b addpart, \b delpart and \b devinfo for partition handling. - */ +/** + * @page unprotect_command + +Unprotect the flash memory behind the device. It depends on the device given, +what area will be unprotected. If the device represents the whole flash memory +the whole memory will be unprotected. If the device represents a partition +on a main flash memory, only this partition part will be unprotected. + +Refer addpart_command, delpart_command and devinfo_command for partition +handling. + +\todo Rework this documentation, what does it mean? -/** @page unprotect_command unprotect Unprotect a flash memory - * - * Usage is: unprotect \<devicee> - * - * Unprotect the flash memory behind the device. It depends on the device given, - * what area will be unprotected. If the device represents the whole flash memory - * the whole memory will be unprotected. If the device represents a partition - * on a main flash memory, only this partition part will be unprotected. - * - * Refer \b addpart, \b delpart and \b devinfo for partition handling. */ + |