Patch: add loglevel to printk's in net/ipv4/route.c

9 messages, 4 authors, 2004-12-30 · open the first message on its own page

Patch: add loglevel to printk's in net/ipv4/route.c

From: Jesper Juhl <hidden>
Date: 2004-12-29 01:50:27

Small patch below adds loglevels to a few printk's in net/ipv4/route.c


Signed-off-by: Jesper Juhl <redacted>

diff -up linux-2.6.10-orig/net/ipv4/route.c linux-2.6.10/net/ipv4/route.c
--- linux-2.6.10-orig/net/ipv4/route.c	2004-12-24 22:35:40.000000000 +0100
+++ linux-2.6.10/net/ipv4/route.c	2004-12-29 02:55:03.000000000 +0100
@@ -889,8 +889,8 @@ restart:
 		printk(KERN_DEBUG "rt_cache @%02x: %u.%u.%u.%u", hash,
 		       NIPQUAD(rt->rt_dst));
 		for (trt = rt->u.rt_next; trt; trt = trt->u.rt_next)
-			printk(" . %u.%u.%u.%u", NIPQUAD(trt->rt_dst));
-		printk("\n");
+			printk(KERN_DEBUG " . %u.%u.%u.%u", NIPQUAD(trt->rt_dst));
+		printk(KERN_DEBUG "\n");
 	}
 #endif
 	rt_hash_table[hash].chain = rt;
@@ -1802,11 +1802,11 @@ martian_source:
 			unsigned char *p = skb->mac.raw;
 			printk(KERN_WARNING "ll header: ");
 			for (i = 0; i < dev->hard_header_len; i++, p++) {
-				printk("%02x", *p);
+				printk(KERN_WARNING "%02x", *p);
 				if (i < (dev->hard_header_len - 1))
 					printk(":");
 			}
-			printk("\n");
+			printk(KERN_WARNING "\n");
 		}
 	}
 #endif


Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Arnaldo Carvalho de Melo <hidden>
Date: 2004-12-29 02:00:06

Jesper Juhl wrote:
quoted hunk
Small patch below adds loglevels to a few printk's in net/ipv4/route.c


Signed-off-by: Jesper Juhl <redacted>

diff -up linux-2.6.10-orig/net/ipv4/route.c linux-2.6.10/net/ipv4/route.c
--- linux-2.6.10-orig/net/ipv4/route.c	2004-12-24 22:35:40.000000000 +0100
+++ linux-2.6.10/net/ipv4/route.c	2004-12-29 02:55:03.000000000 +0100
@@ -889,8 +889,8 @@ restart:
 		printk(KERN_DEBUG "rt_cache @%02x: %u.%u.%u.%u", hash,
 		       NIPQUAD(rt->rt_dst));
 		for (trt = rt->u.rt_next; trt; trt = trt->u.rt_next)
-			printk(" . %u.%u.%u.%u", NIPQUAD(trt->rt_dst));
-		printk("\n");
+			printk(KERN_DEBUG " . %u.%u.%u.%u", NIPQUAD(trt->rt_dst));
+		printk(KERN_DEBUG "\n");
 	}
 #endif
 	rt_hash_table[hash].chain = rt;
@@ -1802,11 +1802,11 @@ martian_source:
 			unsigned char *p = skb->mac.raw;
 			printk(KERN_WARNING "ll header: ");
 			for (i = 0; i < dev->hard_header_len; i++, p++) {
-				printk("%02x", *p);
+				printk(KERN_WARNING "%02x", *p);
 				if (i < (dev->hard_header_len - 1))
 					printk(":");
 			}
-			printk("\n");
+			printk(KERN_WARNING "\n");

Are you sure the output is much improved? ;)

- Arnaldo

Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Jesper Juhl <hidden>
Date: 2004-12-29 02:03:03

On Wed, 29 Dec 2004, Arnaldo Carvalho de Melo wrote:
Jesper Juhl wrote:
quoted
Small patch below adds loglevels to a few printk's in net/ipv4/route.c
[...]
Are you sure the output is much improved? ;)
It doesn't make much difference, it's mostly for completeness/correctness.


-- 
Jesper

Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Arnaldo Carvalho de Melo <hidden>
Date: 2004-12-29 02:06:56


Jesper Juhl wrote:
On Wed, 29 Dec 2004, Arnaldo Carvalho de Melo wrote:

quoted
Jesper Juhl wrote:
quoted
Small patch below adds loglevels to a few printk's in net/ipv4/route.c
[...]
quoted
Are you sure the output is much improved? ;)
It doesn't make much difference, it's mostly for completeness/correctness.
No, it does a helluva difference, give it a try :-)

- Arnaldo

Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Jörn Engel <hidden>
Date: 2004-12-29 02:13:49

On Wed, 29 December 2004 00:10:22 -0200, Arnaldo Carvalho de Melo wrote:
quoted
It doesn't make much difference, it's mostly for completeness/correctness.
No, it does a helluva difference, give it a try :-)
hint: look for "\n"

Jörn

-- 
It is better to die of hunger having lived without grief and fear,
than to live with a troubled spirit amid abundance.
-- Epictetus

Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Arnaldo Carvalho de Melo <hidden>
Date: 2004-12-29 02:20:37


Jörn Engel wrote:
On Wed, 29 December 2004 00:10:22 -0200, Arnaldo Carvalho de Melo wrote:
quoted
quoted
It doesn't make much difference, it's mostly for completeness/correctness.
No, it does a helluva difference, give it a try :-)

hint: look for "\n"
hint2: Or the _lack_ of "\n" 8)

- Arnaldo

Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Jesper Juhl <hidden>
Date: 2004-12-29 02:35:11

On Wed, 29 Dec 2004, Arnaldo Carvalho de Melo wrote:

Jörn Engel wrote:
quoted
On Wed, 29 December 2004 00:10:22 -0200, Arnaldo Carvalho de Melo wrote:
quoted
quoted
It doesn't make much difference, it's mostly for
completeness/correctness.
No, it does a helluva difference, give it a try :-)

hint: look for "\n"
hint2: Or the _lack_ of "\n" 8)
Ok, obviously something's wrong, but it's currently 03:44 here, so I'll 
take a look at it tomorrow (or quite possibly the day after since I have 
things to do).
Thank you for commenting, I'll dig into it at the first oppotunity I have.


-- 
Jesper

Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Jesper Juhl <hidden>
Date: 2004-12-29 23:28:13

On Wed, 29 Dec 2004, Jesper Juhl wrote:
On Wed, 29 Dec 2004, Arnaldo Carvalho de Melo wrote:
quoted

Jörn Engel wrote:
quoted
On Wed, 29 December 2004 00:10:22 -0200, Arnaldo Carvalho de Melo wrote:
quoted
quoted
It doesn't make much difference, it's mostly for
completeness/correctness.
No, it does a helluva difference, give it a try :-)

hint: look for "\n"
hint2: Or the _lack_ of "\n" 8)
Ok, obviously something's wrong, but it's currently 03:44 here, so I'll 
take a look at it tomorrow (or quite possibly the day after since I have 
things to do).
Thank you for commenting, I'll dig into it at the first oppotunity I have.
Ok, this is a bit embarresing. Looking at the patch now after getting some 
sleep it's quite obvious that it is wrong. I should have slept on it 
before sending it - sorry for the noise people.

-- 
Jesper Juhl


Re: Patch: add loglevel to printk's in net/ipv4/route.c

From: Herbert Poetzl <hidden>
Date: 2004-12-30 02:14:39

On Thu, Dec 30, 2004 at 12:39:10AM +0100, Jesper Juhl wrote:
On Wed, 29 Dec 2004, Jesper Juhl wrote:
quoted
On Wed, 29 Dec 2004, Arnaldo Carvalho de Melo wrote:
quoted

Jörn Engel wrote:
quoted
On Wed, 29 December 2004 00:10:22 -0200, Arnaldo Carvalho de Melo wrote:
quoted
quoted
It doesn't make much difference, it's mostly for
completeness/correctness.
No, it does a helluva difference, give it a try :-)

hint: look for "\n"
hint2: Or the _lack_ of "\n" 8)
Ok, obviously something's wrong, but it's currently 03:44 here, so I'll 
take a look at it tomorrow (or quite possibly the day after since I have 
things to do).
Thank you for commenting, I'll dig into it at the first oppotunity I have.
Ok, this is a bit embarresing. Looking at the patch now after getting some 
sleep it's quite obvious that it is wrong. I should have slept on it 
before sending it - sorry for the noise people.
nothing to be sorry about, and thanks for all
the work you are doing for the linux kernel ...

best,
Herbert
-- 
Jesper Juhl


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help