[PATCH 2/3] tgt-admin: abort check_device() early if -e returns false

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Dan Mick <dan.mick@xxxxxxxxxxx>
---
 scripts/tgt-admin |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/tgt-admin b/scripts/tgt-admin
index 183b0af..fdb8232 100755
--- a/scripts/tgt-admin
+++ b/scripts/tgt-admin
@@ -1306,6 +1306,10 @@ sub check_device {
 		return 1;
 	}
 
+	if (! -e $backing_store) {
+		return 1;
+	}
+
 	# Check if the system uses this device
 	use Fcntl qw(O_RDONLY O_EXCL);
 	use Errno;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux