iscsi-scst: Fix IPv6 format specifications

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6670 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-11-11 22:05:05 +00:00
parent 4bda296d64
commit 0597ac78c8
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -116,10 +116,10 @@ void conn_info_show(struct seq_file *seq, struct iscsi_session *session)
"[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]",
NIP6(inet6_sk(sk)->daddr));
#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
snprintf(buf, sizeof(buf), "[%p6]",
snprintf(buf, sizeof(buf), "[%pI6]",
&inet6_sk(sk)->daddr);
#else
snprintf(buf, sizeof(buf), "[%p6]",
snprintf(buf, sizeof(buf), "[%pI6]",
&sk->sk_v6_daddr);
#endif
break;
+2 -2
View File
@@ -3310,9 +3310,9 @@ static ssize_t iscsi_tcp_get_initiator_ip(struct iscsi_conn *conn,
#else
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) && \
(!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 7)
pos = scnprintf(buf, size, "[%p6]", &inet6_sk(sk)->daddr);
pos = scnprintf(buf, size, "[%pI6]", &inet6_sk(sk)->daddr);
#else
pos = scnprintf(buf, size, "[%p6]", &sk->sk_v6_daddr);
pos = scnprintf(buf, size, "[%pI6]", &sk->sk_v6_daddr);
#endif
#endif
break;