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
This commit is contained in:
Denis Vlasenko 2008-02-16 13:17:13 +00:00
parent cd5c61cd3b
commit 069e347863
2 changed files with 219 additions and 316 deletions

View file

@ -510,15 +510,14 @@ USE_FEATURE_BRCTL_FANCY("\n" \
" -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]"