diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-06-04 13:17:37 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-06-04 13:17:37 +0000 |
commit | 044d91ae4967861fbbd7b5f0b25860ee8c58f2ae (patch) | |
tree | 0233283d29cf99ab60c3a2b1b4e6e786435ab3aa | |
parent | 3efb1bff5770e3609548b992d2e459968942b7de (diff) |
Fix any command issue
-rw-r--r-- | rfcomm/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rfcomm/main.c b/rfcomm/main.c index d4ed9a48..7294a363 100644 --- a/rfcomm/main.c +++ b/rfcomm/main.c @@ -621,8 +621,13 @@ int main(int argc, char *argv[]) argv += optind; optind = 0; - if (argc < 2) - show_all = 1; + if (argc < 2) { + if (argc != 0) { + usage(); + exit(1); + } else + show_all = 1; + } if ((ctl = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_RFCOMM)) < 0 ) { perror("Can't open RFCOMM control socket"); |