From b73f1c4db9c0ba683488a8138be057918c2bdabe Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Thu, 20 Aug 2015 21:33:16 +0200 Subject: [PATCH] usage if !username or !device --- ocat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ocat.c b/ocat.c index 999c10c..2840b17 100644 --- a/ocat.c +++ b/ocat.c @@ -105,7 +105,11 @@ int main(int argc, char **argv) } else if (username && device && (argc > 0)) { fprintf(stderr, "%s: filename with --user and --device is not supported\n", progname); return (-1); + } else if (!username || !device) { + usage(progname); } + + /*