diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2006-04-11 18:22:37 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2006-04-11 18:22:37 +0000 |
commit | 6cbafa47b3d14276f65aa4ccae48c5fdfb2fb7bd (patch) | |
tree | b07b274d4ee6d017e9727959f03ccb6b81e6f12d /userspace/ebtables2 | |
parent | 4fa1f56d753a340983beb3b08c3caa8e29638ae6 (diff) |
better error message with target problems
Diffstat (limited to 'userspace/ebtables2')
-rw-r--r-- | userspace/ebtables2/ebtables.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/userspace/ebtables2/ebtables.c b/userspace/ebtables2/ebtables.c index 968c5e7..520d9cf 100644 --- a/userspace/ebtables2/ebtables.c +++ b/userspace/ebtables2/ebtables.c @@ -1073,8 +1073,14 @@ big_iface_length: if (w->parse(c - w->option_offset, argv, argc, new_entry, &w->flags, &w->w)) break; - if (w == NULL) - ebt_print_error2("Unknown argument: '%s', %c, '%c'", argv[optind - 1], (char)optopt, (char)c); + if (w == NULL && c == '?') + ebt_print_error2("Unknown argument: '%s'", argv[optind - 1], (char)optopt, (char)c); + else if (w == NULL) { + if (!strcmp(t->name, "standard")) + ebt_print_error2("Unknown argument: don't forget the -t option"); + else + ebt_print_error2("Target-specific option does not correspond with specified target"); + } if (ebt_errormsg[0] != '\0') return -1; if (w->used == 0) { |