From 14edc766dfb0d1887be42d3db8ebcfec516dfd68 Mon Sep 17 00:00:00 2001 From: ad Date: Tue, 19 Jun 2001 10:46:16 +0000 Subject: Check for transport failure before looking at the status code in the reply. --- usr.sbin/iopctl/iopctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/iopctl/iopctl.c b/usr.sbin/iopctl/iopctl.c index 6c654e8ed32..b60b3895fb7 100644 --- a/usr.sbin/iopctl/iopctl.c +++ b/usr.sbin/iopctl/iopctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: iopctl.c,v 1.9 2001/03/21 14:27:29 ad Exp $ */ +/* $NetBSD: iopctl.c,v 1.10 2001/06/19 10:46:16 ad Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #ifndef lint #include -__RCSID("$NetBSD: iopctl.c,v 1.9 2001/03/21 14:27:29 ad Exp $"); +__RCSID("$NetBSD: iopctl.c,v 1.10 2001/06/19 10:46:16 ad Exp $"); #endif /* not lint */ #include @@ -236,11 +236,11 @@ getparam(int tid, int group, void *pbuf, int pbufsize) err(EXIT_FAILURE, "IOPIOCPT"); rf = (struct i2o_reply *)buf; + if ((rf->msgflags & I2O_MSGFLAGS_FAIL) != 0) + errx(EXIT_FAILURE, "I2O_UTIL_PARAMS_GET failed (FAIL)"); if (rf->reqstatus != 0) errx(EXIT_FAILURE, "I2O_UTIL_PARAMS_GET failed (%d)", ((struct i2o_reply *)buf)->reqstatus); - if ((rf->msgflags & I2O_MSGFLAGS_FAIL) != 0) - errx(EXIT_FAILURE, "I2O_UTIL_PARAMS_GET failed (FAIL)"); } void -- cgit