svn commit: r277372 - head/sys/cam/scsi

Hans Petter Selasky hselasky at FreeBSD.org
Mon Jan 19 07:29:08 UTC 2015


Author: hselasky
Date: Mon Jan 19 07:29:07 2015
New Revision: 277372
URL: https://svnweb.freebsd.org/changeset/base/277372

Log:
  Minor refactoring of code block.
  
  MFC after:		1 day

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Mon Jan 19 07:24:18 2015	(r277371)
+++ head/sys/cam/scsi/scsi_da.c	Mon Jan 19 07:29:07 2015	(r277372)
@@ -3101,11 +3101,10 @@ dadone(struct cam_periph *periph, union 
 			 * give them an 'illegal' value we'll avoid that
 			 * here.
 			 */
-			if (block_size == 0 && maxsector == 0) {
-				block_size = 512;
-				maxsector = -1;
-			} else if (block_size == 0) {
+			if (block_size == 0) {
 				block_size = 512;
+				if (maxsector == 0)
+					maxsector = -1;
 			}
 			if (block_size >= MAXPHYS) {
 				xpt_print(periph->path,


More information about the svn-src-head mailing list