Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 17:20:25 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237329 - head/usr.sbin/mfiutil
Message-ID:  <201206201720.q5KHKPq7056951@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Wed Jun 20 17:20:25 2012
New Revision: 237329
URL: http://svn.freebsd.org/changeset/base/237329

Log:
  Fix ARM compilation issue.
  
  X-MFC: 237260

Modified:
  head/usr.sbin/mfiutil/mfi_drive.c

Modified: head/usr.sbin/mfiutil/mfi_drive.c
==============================================================================
--- head/usr.sbin/mfiutil/mfi_drive.c	Wed Jun 20 17:08:00 2012	(r237328)
+++ head/usr.sbin/mfiutil/mfi_drive.c	Wed Jun 20 17:20:25 2012	(r237329)
@@ -330,11 +330,13 @@ cam_strvis(char *dst, const char *src, i
 const char *
 mfi_pd_inq_string(struct mfi_pd_info *info)
 {
-	struct scsi_inquiry_data *inq_data;
+	struct scsi_inquiry_data iqd, *inq_data = &iqd;
 	char vendor[16], product[48], revision[16], rstr[12], serial[SID_VENDOR_SPECIFIC_0_SIZE];
 	static char inq_string[64];
 
-	inq_data = (struct scsi_inquiry_data *)info->inquiry_data;
+	memcpy(inq_data, info->inquiry_data,
+	    (sizeof (iqd) <  sizeof (info->inquiry_data))?
+	    sizeof (iqd) : sizeof (info->inquiry_data));
 	if (SID_QUAL_IS_VENDOR_UNIQUE(inq_data))
 		return (NULL);
 	if (SID_TYPE(inq_data) != T_DIRECT)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206201720.q5KHKPq7056951>