Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358905
b: refs/heads/master
c: 0e48e7a
h: refs/heads/master
i:
  358903: 1748001
v: v3
  • Loading branch information
Dan Carpenter authored and Nicholas Bellinger committed Feb 13, 2013
1 parent fe44eef commit eddefef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: 07ea81b6f7d6345e146245c4964640a5a27b5cc5
refs/heads/master: 0e48e7a5a345a727d5fd7a06bd6a9e6a67eae2bd
15 changes: 9 additions & 6 deletions trunk/drivers/target/iscsi/iscsi_target_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,16 +429,19 @@ static ssize_t iscsi_stat_tgt_attr_show_attr_fail_intr_addr(
struct iscsi_tiqn *tiqn = container_of(igrps,
struct iscsi_tiqn, tiqn_stat_grps);
struct iscsi_login_stats *lstat = &tiqn->login_stats;
unsigned char buf[32];
int ret;

spin_lock(&lstat->lock);
if (lstat->last_intr_fail_ip_family == AF_INET6)
snprintf(buf, 32, "[%s]", lstat->last_intr_fail_ip_addr);
else
snprintf(buf, 32, "%s", lstat->last_intr_fail_ip_addr);
if (lstat->last_intr_fail_ip_family == AF_INET6) {
ret = snprintf(page, PAGE_SIZE, "[%s]\n",
lstat->last_intr_fail_ip_addr);
} else {
ret = snprintf(page, PAGE_SIZE, "%s\n",
lstat->last_intr_fail_ip_addr);
}
spin_unlock(&lstat->lock);

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

Expand Down

0 comments on commit eddefef

Please sign in to comment.