Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2011 15:24:03 -0400
From:      Andrew Boyer <aboyer@averesystems.com>
To:        bz@FreeBSD.org, John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Buglet in r222899 (mfiutil show drives)
Message-ID:  <8B3E8C5D-C8BF-4AB7-AA1E-54086C6DC818@averesystems.com>

index | next in thread | raw e-mail

The error variable is returned uninitialized if no error occurs.  I noticed because 'mfiutil -de show drives' started returning 1 for no apparent reason when I synced up to stable/8.

I looked through the rest of mfiutil and didn't see any more cases like this one.

-Andrew

Index: usr.sbin/mfiutil/mfi_show.c
===================================================================
--- usr.sbin/mfiutil/mfi_show.c	(revision 224494)
+++ usr.sbin/mfiutil/mfi_show.c	(working copy)
@@ -470,7 +470,7 @@
 	struct mfi_pd_list *list;
 	struct mfi_pd_info info;
 	u_int i, len, state_len;
-	int error, fd;
+	int error = 0, fd;
 
 	if (ac != 1) {
 		warnx("show drives: extra arguments");

--------------------------------------------------
Andrew Boyer	aboyer@averesystems.com






help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8B3E8C5D-C8BF-4AB7-AA1E-54086C6DC818>