28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
|
commit d8298fc54eb69d3989878be46e9c7d6ec2055650
|
||
|
Author: Lee Duncan <lduncan@suse.com>
|
||
|
Date: Mon Sep 24 16:22:18 2018 -0700
|
||
|
|
||
|
Allow reading sysfs "port" to fail gracefully.
|
||
|
|
||
|
Do not consider it a fatal error if reading sysfs value
|
||
|
for "port" fails, since we allow failure for "address".
|
||
|
---
|
||
|
libopeniscsiusr/session.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/libopeniscsiusr/session.c b/libopeniscsiusr/session.c
|
||
|
index a8339395fc03..f8c89c323afb 100644
|
||
|
--- a/libopeniscsiusr/session.c
|
||
|
+++ b/libopeniscsiusr/session.c
|
||
|
@@ -205,8 +205,8 @@ int iscsi_session_get(struct iscsi_context *ctx, uint32_t sid,
|
||
|
_sysfs_prop_get_str(ctx, sysfs_con_dir_path, "address", (*se)->address,
|
||
|
sizeof((*se)->address) / sizeof(char), "");
|
||
|
|
||
|
- _good(_sysfs_prop_get_i32(ctx, sysfs_con_dir_path, "port",
|
||
|
- &((*se)->port), -1, false), rc, out);
|
||
|
+ _sysfs_prop_get_i32(ctx, sysfs_con_dir_path, "port",
|
||
|
+ &((*se)->port), -1, true);
|
||
|
|
||
|
if ((strcmp((*se)->address, "") == 0) &&
|
||
|
(strcmp((*se)->persistent_address, "") != 0))
|