I ran into this because I had a user/kernel ABI mismatch in the FC BSG
interface[1].  The fix was just to recompile with up-to-date kernel
headers, but I did notice that the error messages were wrong because
these compares are screwed up.

Signed-off-by: Chris Leech <[email protected]>

[1] There was a change to the kernel in Jan that added a packed
attribute to struct fc_bsg_request.  It would have been the right thing
to do in the first place, but it did change ABI 2 kernel releases after
the FC BSG interface was introduced.
---

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

diff --git a/fcnsq.c b/fcnsq.c
index 6f3ac0e..6bbcccc 100644
--- a/fcnsq.c
+++ b/fcnsq.c
@@ -228,7 +228,7 @@ static int gpn_id(int bsg, u32 fcid)
        print_result("Port Name", "%16.16llx\n", wwpn);
        return 0;
 fail:
-       if (rjt == ~0)
+       if (rjt == (u16) ~0)
                print_err("%s ioctl failed: %s\n", __func__, strerror(errno));
        else
                print_err("%s command failed: %s, %s\n", __func__,
@@ -249,7 +249,7 @@ static int gnn_id(int bsg, u32 fcid)
        print_result("Node Name", "%16.16llx\n", wwnn);
        return 0;
 fail:
-       if (rjt == ~0)
+       if (rjt == (u16) ~0)
                print_err("%s ioctl failed: %s\n", __func__, strerror(errno));
        else
                print_err("%s command failed: %s, %s\n", __func__,

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

Reply via email to