Commit b786a080 authored by David S. Miller's avatar David S. Miller

Do not report inode numbers as negative

in networking procfs nodes
parent f5ead92b
...@@ -638,7 +638,7 @@ static void get_raw_sock(struct sock *sp, char *tmpbuf, int i) ...@@ -638,7 +638,7 @@ static void get_raw_sock(struct sock *sp, char *tmpbuf, int i)
srcp = inet->num; srcp = inet->num;
sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X" sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %ld %d %p", " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p",
i, src, srcp, dest, destp, sp->state, i, src, srcp, dest, destp, sp->state,
atomic_read(&sp->wmem_alloc), atomic_read(&sp->rmem_alloc), atomic_read(&sp->wmem_alloc), atomic_read(&sp->rmem_alloc),
0, 0L, 0, 0, 0L, 0,
......
...@@ -979,7 +979,7 @@ static void get_udp_sock(struct sock *sp, char *tmpbuf, int i) ...@@ -979,7 +979,7 @@ static void get_udp_sock(struct sock *sp, char *tmpbuf, int i)
destp = ntohs(inet->dport); destp = ntohs(inet->dport);
srcp = ntohs(inet->sport); srcp = ntohs(inet->sport);
sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X" sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %ld %d %p", " %02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p",
i, src, srcp, dest, destp, sp->state, i, src, srcp, dest, destp, sp->state,
atomic_read(&sp->wmem_alloc), atomic_read(&sp->rmem_alloc), atomic_read(&sp->wmem_alloc), atomic_read(&sp->rmem_alloc),
0, 0L, 0, 0, 0L, 0,
......
...@@ -769,7 +769,7 @@ static void get_raw6_sock(struct sock *sp, char *tmpbuf, int i) ...@@ -769,7 +769,7 @@ static void get_raw6_sock(struct sock *sp, char *tmpbuf, int i)
srcp = inet_sk(sp)->num; srcp = inet_sk(sp)->num;
sprintf(tmpbuf, sprintf(tmpbuf,
"%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
"%02X %08X:%08X %02X:%08lX %08X %5d %8d %ld %d %p", "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p",
i, i,
src->s6_addr32[0], src->s6_addr32[1], src->s6_addr32[0], src->s6_addr32[1],
src->s6_addr32[2], src->s6_addr32[3], srcp, src->s6_addr32[2], src->s6_addr32[3], srcp,
......
...@@ -922,7 +922,7 @@ static void get_udp6_sock(struct sock *sp, char *tmpbuf, int i) ...@@ -922,7 +922,7 @@ static void get_udp6_sock(struct sock *sp, char *tmpbuf, int i)
srcp = ntohs(inet->sport); srcp = ntohs(inet->sport);
sprintf(tmpbuf, sprintf(tmpbuf,
"%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X " "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
"%02X %08X:%08X %02X:%08lX %08X %5d %8d %ld %d %p", "%02X %08X:%08X %02X:%08lX %08X %5d %8d %lu %d %p",
i, i,
src->s6_addr32[0], src->s6_addr32[1], src->s6_addr32[0], src->s6_addr32[1],
src->s6_addr32[2], src->s6_addr32[3], srcp, src->s6_addr32[2], src->s6_addr32[3], srcp,
......
...@@ -1767,7 +1767,7 @@ static int unix_read_proc(char *buffer, char **start, off_t offset, ...@@ -1767,7 +1767,7 @@ static int unix_read_proc(char *buffer, char **start, off_t offset,
struct unix_sock *u = unix_sk(s); struct unix_sock *u = unix_sk(s);
unix_state_rlock(s); unix_state_rlock(s);
len+=sprintf(buffer+len,"%p: %08X %08X %08X %04X %02X %5ld", len+=sprintf(buffer+len,"%p: %08X %08X %08X %04X %02X %5lu",
s, s,
atomic_read(&s->refcnt), atomic_read(&s->refcnt),
0, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment