[stgt] [PATCH 2/3] tgt-admin: abort check_device() early if -e returns false
Dan Mick
dan.mick at inktank.com
Tue Oct 15 06:47:56 CEST 2013
Signed-off-by: Dan Mick <dan.mick at inktank.com>
---
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 at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list