Currently role string checking was looking for exact "FCP Target"
string but some target could show up as "FCP Target, FCP Initiator"
role, so instead just check for initial string is "FCP Target" to
proceed with lun display.

Signed-off-by: Vasu Dev <[email protected]>
---

 fcoeadm_display.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index 1ace624..3d80082 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -238,7 +238,7 @@ static int is_fcp_target(HBA_PORTATTRIBUTES *rp_info)
        if (sa_sys_read_line(rp_info->OSDeviceName, "roles", buf, sizeof(buf)))
                return -EINVAL;
 
-       if (!strncmp(buf, FCP_TARG_STR, strlen(buf)))
+       if (!strncmp(buf, FCP_TARG_STR, strlen(FCP_TARG_STR)))
                return 0;
 
        return -EINVAL;

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to