Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358904
b: refs/heads/master
c: 07ea81b
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Nicholas Bellinger committed Feb 13, 2013
1 parent 1748001 commit fe44eef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0c8b259f8970d39354c1966853363345d401330
refs/heads/master: 07ea81b6f7d6345e146245c4964640a5a27b5cc5
10 changes: 6 additions & 4 deletions trunk/drivers/target/iscsi/iscsi_target_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,16 @@ static ssize_t iscsi_stat_tgt_attr_show_attr_fail_intr_addr_type(
struct iscsi_tiqn *tiqn = container_of(igrps,
struct iscsi_tiqn, tiqn_stat_grps);
struct iscsi_login_stats *lstat = &tiqn->login_stats;
unsigned char buf[8];
int ret;

spin_lock(&lstat->lock);
snprintf(buf, 8, "%s", (lstat->last_intr_fail_ip_addr != NULL) ?
"ipv6" : "ipv4");
if (lstat->last_intr_fail_ip_family == AF_INET6)
ret = snprintf(page, PAGE_SIZE, "ipv6\n");
else
ret = snprintf(page, PAGE_SIZE, "ipv4\n");
spin_unlock(&lstat->lock);

return snprintf(page, PAGE_SIZE, "%s\n", buf);
return ret;
}
ISCSI_STAT_TGT_ATTR_RO(fail_intr_addr_type);

Expand Down

0 comments on commit fe44eef

Please sign in to comment.