From 5a1929877fa138d21d419d359eb4c2c530659169 Mon Sep 17 00:00:00 2001 From: Aleksander Piotrowski Date: Sun, 9 Jan 2005 11:02:33 +0000 Subject: Better error message for `device' command without arguments. help & ok miod@ --- usr.bin/cdio/cdio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.bin') 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); -- cgit v1.2.3