From a2362baffb88b2b2ddf54863263a7ba59f560589 Mon Sep 17 00:00:00 2001 From: drochner Date: Wed, 28 Jun 2006 15:05:54 +0000 Subject: [PATCH] if a data read from the interface fails, print the "wreq" type before erroring out --- usr.sbin/wiconfig/wiconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/wiconfig/wiconfig.c b/usr.sbin/wiconfig/wiconfig.c index 8b7f125ab51b..9d91955aed61 100644 --- a/usr.sbin/wiconfig/wiconfig.c +++ b/usr.sbin/wiconfig/wiconfig.c @@ -1,4 +1,4 @@ -/* $NetBSD: wiconfig.c,v 1.37 2005/06/02 09:47:37 lukem Exp $ */ +/* $NetBSD: wiconfig.c,v 1.38 2006/06/28 15:05:54 drochner Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -69,7 +69,7 @@ __COPYRIGHT( "@(#) Copyright (c) 1997, 1998, 1999\ Bill Paul. All rights reserved."); -__RCSID("$NetBSD: wiconfig.c,v 1.37 2005/06/02 09:47:37 lukem Exp $"); +__RCSID("$NetBSD: wiconfig.c,v 1.38 2006/06/28 15:05:54 drochner Exp $"); #endif struct wi_table { @@ -302,7 +302,7 @@ static void wi_getval(iface, wreq) err(1, "socket"); if (ioctl(s, SIOCGWAVELAN, &ifr) == -1) - err(1, "SIOCGWAVELAN"); + err(1, "SIOCGWAVELAN(wreq %04x)", wreq->wi_type); close(s);