crontab: almost complete rewrite
crontab: make options consistent with other implementations
text data bss dec hex filename
2042 4 0 2046 7fe busybox.t1/miscutils/crontab.o
1331 0 0 1331 533 busybox.t2/miscutils/crontab.o
function old new delta
edit_file 733 956 +223
open_as_user - 171 +171
packed_usage 23652 23650 -2
CDir 8 4 -4
ChangeUser 139 - -139
crontab_main 1522 616 -906
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/3 up/down: 394/-1051) Total: -657 bytes
diff --git a/include/usage.h b/include/usage.h
index 71e1d12..59e57f3 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -510,15 +510,14 @@
" -c dir Working dir"
#define crontab_trivial_usage \
- "[-c dir] {file|-}|[-u|-l|-e|-d user]"
+ "[-c DIR] [-u USER] [-ler]|[FILE]"
#define crontab_full_usage \
- " file [opts] Replace crontab from file\n" \
- " - [opts] Replace crontab from stdin\n" \
- " -u user User\n" \
- " -l [user] List crontab for user\n" \
- " -e [user] Edit crontab for user\n" \
- " -d [user] Delete crontab for user\n" \
- " -c dir Crontab directory"
+ " -c Crontab directory" \
+ "\n -u User" \
+ "\n -l List crontab" \
+ "\n -e Edit crontab" \
+ "\n -r Delete crontab" \
+ "\n FILE Replace crontab by FILE ('-': stdin)" \
#define cryptpw_trivial_usage \
"[-a des|md5] [string]"