1 Star 0 Fork 20

src-oepkgs-oE-rv/python-rtslib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0003-Fix-EPERM-errors-with-scsi_generic-devices.patch 759 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 964520037320534512713e58bf70be6c428097dc Mon Sep 17 00:00:00 2001
From: Jaroslav <niekto@niekde.sk>
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/python-rtslib.git
git@gitee.com:src-oepkgs-oe-rv/python-rtslib.git
src-oepkgs-oe-rv
python-rtslib
python-rtslib
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385