use optarg instead of mode when reporting failure - mode is uninitialised

This commit is contained in:
plunky 2007-11-19 19:49:58 +00:00
parent 3f269d8907
commit b0d7f48f6f

View File

@ -1,4 +1,4 @@
/* $NetBSD: btdevctl.c,v 1.5 2007/08/17 17:59:16 pavel Exp $ */
/* $NetBSD: btdevctl.c,v 1.6 2007/11/19 19:49:58 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@ -34,7 +34,7 @@
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2006 Itronix, Inc.\n"
"All rights reserved.\n");
__RCSID("$NetBSD: btdevctl.c,v 1.5 2007/08/17 17:59:16 pavel Exp $");
__RCSID("$NetBSD: btdevctl.c,v 1.6 2007/11/19 19:49:58 plunky Exp $");
#include <prop/proplib.h>
#include <sys/ioctl.h>
@ -116,7 +116,7 @@ main(int argc, char *argv[])
else if (strcasecmp(optarg, BTDEVsecure) == 0)
mode = BTDEVsecure;
else
errx(EXIT_FAILURE, "%s: unknown mode", mode);
errx(EXIT_FAILURE, "%s: unknown mode", optarg);
break;