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