diff --git a/0003-Fix-EPERM-errors-with-scsi_generic-devices.patch b/0003-Fix-EPERM-errors-with-scsi_generic-devices.patch new file mode 100644 index 0000000000000000000000000000000000000000..48a16c6ff4ead504d6d0aeadb8bc3574d300ef59 --- /dev/null +++ b/0003-Fix-EPERM-errors-with-scsi_generic-devices.patch @@ -0,0 +1,26 @@ +From 964520037320534512713e58bf70be6c428097dc Mon Sep 17 00:00:00 2001 +From: Jaroslav +Date: Tue, 7 Jul 2020 11:21:45 +0200 +Subject: [PATCH 1/4] Fix EPERM errors with scsi_generic devices + +Resolves https://github.com/open-iscsi/targetcli-fb/issues/158 +--- + rtslib/utils.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rtslib/utils.py b/rtslib/utils.py +index eff2205..4bcadea 100644 +--- a/rtslib/utils.py ++++ b/rtslib/utils.py +@@ -114,7 +114,7 @@ def is_dev_in_use(path): + ''' + path = os.path.realpath(str(path)) + try: +- file_fd = os.open(path, os.O_EXCL|os.O_NDELAY) ++ file_fd = os.open(path, os.O_EXCL|os.O_NDELAY|os.O_RDWR) + except OSError: + return True + else: +-- +1.8.3.1 +