Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2013 15:19:37 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r259304 - stable/10/sys/cam/ctl
Message-ID:  <201312131519.rBDFJbxA089540@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Fri Dec 13 15:19:37 2013
New Revision: 259304
URL: http://svnweb.freebsd.org/changeset/base/259304

Log:
  MFC r258871:
  
  Properly report an error instead of panicing when user tries to create
  LUN backed by non-disk device, e.g. /dev/null.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl_backend_block.c	Fri Dec 13 13:17:59 2013	(r259303)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c	Fri Dec 13 15:19:37 2013	(r259304)
@@ -1485,6 +1485,7 @@ ctl_be_block_close(struct ctl_be_block_l
 		case CTL_BE_BLOCK_FILE:
 			break;
 		case CTL_BE_BLOCK_NONE:
+			break;
 		default:
 			panic("Unexpected backend type.");
 			break;
@@ -1503,6 +1504,7 @@ ctl_be_block_close(struct ctl_be_block_l
 			}
 			break;
 		case CTL_BE_BLOCK_NONE:
+			break;
 		default:
 			panic("Unexpected backend type.");
 			break;
@@ -1589,7 +1591,7 @@ ctl_be_block_open(struct ctl_be_block_so
 	} else {
 		error = EINVAL;
 		snprintf(req->error_str, sizeof(req->error_str),
-			 "%s is not a disk or file", be_lun->dev_path);
+			 "%s is not a disk or plain file", be_lun->dev_path);
 	}
 	VOP_UNLOCK(be_lun->vn, 0);
 



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