mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
Add a sensible message if an invalid ID was entered
PR: 8739 Submitted by: Love lha@stacken.kth.se Reviewed by: Doug Rabson <doug@freebsd.org>
This commit is contained in:
parent
eda5a3370a
commit
7d83305d4e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49079
@ -26,7 +26,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: kldunload.c,v 1.6 1998/07/06 06:59:52 charnier Exp $";
|
||||
"$Id: kldunload.c,v 1.7 1998/11/07 00:42:52 des Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <err.h>
|
||||
@ -56,6 +56,8 @@ main(int argc, char** argv)
|
||||
switch (c) {
|
||||
case 'i':
|
||||
fileid = atoi(optarg);
|
||||
if (!fileid)
|
||||
errx(1, "Invalid ID %s", optarg);
|
||||
break;
|
||||
case 'n':
|
||||
filename = optarg;
|
||||
|
Loading…
Reference in New Issue
Block a user