diff options
author | Aleksander Piotrowski <alek@cvs.openbsd.org> | 2005-01-09 11:02:33 +0000 |
---|---|---|
committer | Aleksander Piotrowski <alek@cvs.openbsd.org> | 2005-01-09 11:02:33 +0000 |
commit | 5a1929877fa138d21d419d359eb4c2c530659169 (patch) | |
tree | 9406d52caa84dbc5b8daec6c16eebac9c43a7f2c /usr.bin/cdio | |
parent | 8a3292b1706ec632f056a93868c1373b9e1e9ee8 (diff) |
Better error message for `device' command without arguments.
help & ok miod@
Diffstat (limited to 'usr.bin/cdio')
-rw-r--r-- | usr.bin/cdio/cdio.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/cdio/cdio.c b/usr.bin/cdio/cdio.c index 8a5d986fe26..7e8e46cc9cf 100644 --- a/usr.bin/cdio/cdio.c +++ b/usr.bin/cdio/cdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cdio.c,v 1.37 2005/01/08 21:16:02 alek Exp $ */ +/* $OpenBSD: cdio.c,v 1.38 2005/01/09 11:02:32 alek Exp $ */ /* Copyright (c) 1995 Serge V. Vakulenko * All rights reserved. @@ -384,6 +384,11 @@ run(int cmd, char *arg) fd = -1; } + if (strlen(arg) == 0) { + printf("%s: Invalid parameter\n", __progname); + return (0); + } + /* open new device */ if (!open_cd(arg)) return (0); |