Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/iopctl Check for transport failure before looking a...
details: https://anonhg.NetBSD.org/src/rev/5c6107819d08
branches: trunk
changeset: 511413:5c6107819d08
user: ad <ad%NetBSD.org@localhost>
date: Tue Jun 19 10:46:16 2001 +0000
description:
Check for transport failure before looking at the status code in the reply.
diffstat:
usr.sbin/iopctl/iopctl.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 2a45a4df2e36 -r 5c6107819d08 usr.sbin/iopctl/iopctl.c
--- a/usr.sbin/iopctl/iopctl.c Tue Jun 19 10:44:03 2001 +0000
+++ b/usr.sbin/iopctl/iopctl.c Tue Jun 19 10:46:16 2001 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
@@ -236,11 +236,11 @@
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
Home |
Main Index |
Thread Index |
Old Index