提交 94cb3f82 编写于 作者: F FUJITA Tomonori 提交者: James Bottomley

[SCSI] iscsi: simplify IPv6 and IPv4 address printing

Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 09492605
...@@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn, ...@@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn,
sk = tcp_conn->sock->sk; sk = tcp_conn->sock->sk;
if (sk->sk_family == PF_INET) { if (sk->sk_family == PF_INET) {
inet = inet_sk(sk); inet = inet_sk(sk);
len = sprintf(buf, "%u.%u.%u.%u\n", len = sprintf(buf, NIPQUAD_FMT "\n",
NIPQUAD(inet->daddr)); NIPQUAD(inet->daddr));
} else { } else {
np = inet6_sk(sk); np = inet6_sk(sk);
len = sprintf(buf, len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr));
"%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
NIP6(np->daddr));
} }
mutex_unlock(&conn->xmitmutex); mutex_unlock(&conn->xmitmutex);
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册