aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-11-20 09:53:31 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-11-20 09:53:31 +0000
commitbebc40b4066384288a5db13884162e1e67789d4b (patch)
treece3afc7fb79bd3f100751f787de927d2309199f3 /archival
parentba49651de96fb8891b4627f85b068cb91232f1c8 (diff)
downloadbusybox-bebc40b4066384288a5db13884162e1e67789d4b.tar.gz
Check at least one context is specified
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 9ef616b92..c8a2bd385 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -662,6 +662,9 @@ int tar_main(int argc, char **argv)
if(opt & 0x80000000UL)
bb_show_usage();
ctx_flag = opt & (CTX_CREATE | CTX_TEST | CTX_EXTRACT);
+ if (ctx_flag == 0) {
+ bb_show_usage();
+ }
if(ctx_flag & CTX_TEST) {
if ((tar_handle->action_header == header_list) ||
(tar_handle->action_header == header_verbose_list)) {