KERN_* constant. These are only from the kernel/ subdir.
Some of these might be off by a level, but I gave them the level that looked
appropriate. If this is accepted, I'll do more of them. This is a good
excercise for newbies like myself ;)
Thanks
-- Cory 'G' Watson + Hack, lest ye rust.diff -Nru linux-2.5.24/kernel/dma.c linux-2.5.24-g/kernel/dma.c --- linux-2.5.24/kernel/dma.c Sun Jun 2 21:44:43 2002 +++ linux-2.5.24-g/kernel/dma.c Wed Jun 26 09:08:35 2002 @@ -98,12 +98,12 @@ void free_dma(unsigned int dmanr) { if (dmanr >= MAX_DMA_CHANNELS) { - printk("Trying to free DMA%d\n", dmanr); + printk(KERN_WARNING "Trying to free DMA%d\n", dmanr); return; } if (xchg(&dma_chan_busy[dmanr].lock, 0) == 0) { - printk("Trying to free free DMA%d\n", dmanr); + printk(KERN_WARNING "Trying to free free DMA%d\n", dmanr); return; } diff -Nru linux-2.5.24/kernel/panic.c linux-2.5.24-g/kernel/panic.c --- linux-2.5.24/kernel/panic.c Sun Jun 2 21:44:47 2002 +++ linux-2.5.24-g/kernel/panic.c Wed Jun 26 08:57:42 2002 @@ -88,7 +88,7 @@ extern int stop_a_enabled; /* Make sure the user can actually press L1-A */ stop_a_enabled = 1; - printk("Press L1-A to return to the boot prom\n"); + printk(KERN_EMERG "Press L1-A to return to the boot prom\n"); } #endif #if defined(CONFIG_ARCH_S390) diff -Nru linux-2.5.24/kernel/resource.c linux-2.5.24-g/kernel/resource.c --- linux-2.5.24/kernel/resource.c Sun Jun 2 21:44:51 2002 +++ linux-2.5.24-g/kernel/resource.c Wed Jun 26 09:08:41 2002 @@ -290,7 +290,7 @@ } p = &res->sibling; } - printk("Trying to free nonexistent resource <%08lx-%08lx>\n", start, end); + printk(KERN_WARNING "Trying to free nonexistent resource <%08lx-%08lx>\n", start, end); } /* diff -Nru linux-2.5.24/kernel/signal.c linux-2.5.24-g/kernel/signal.c --- linux-2.5.24/kernel/signal.c Wed Jun 26 09:03:40 2002 +++ linux-2.5.24-g/kernel/signal.c Wed Jun 26 09:00:35 2002 @@ -270,7 +270,7 @@ int sig = 0; #if DEBUG_SIG -printk("SIG dequeue (%s:%d): %d ", current->comm, current->pid, +printk(KERN_DEBUG "SIG dequeue (%s:%d): %d ", current->comm, current->pid, signal_pending(current)); #endif @@ -294,7 +294,7 @@ recalc_sigpending(); #if DEBUG_SIG -printk(" %d -> %d\n", signal_pending(current), sig); +printk(KERN_DEBUG " %d -> %d\n", signal_pending(current), sig); #endif return sig; @@ -538,7 +538,7 @@ #if DEBUG_SIG -printk("SIG queue (%s:%d): %d ", t->comm, t->pid, sig); +printk(KERN_DEBUG "SIG queue (%s:%d): %d ", t->comm, t->pid, sig); #endif ret = -EINVAL; @@ -576,7 +576,7 @@ spin_unlock_irqrestore(&t->sigmask_lock, flags); out_nolock: #if DEBUG_SIG -printk(" %d -> %d\n", signal_pending(t), ret); +printk(KERN_DEBUG " %d -> %d\n", signal_pending(t), ret); #endif return ret; diff -Nru linux-2.5.24/kernel/softirq.c linux-2.5.24-g/kernel/softirq.c --- linux-2.5.24/kernel/softirq.c Wed Jun 26 09:03:40 2002 +++ linux-2.5.24-g/kernel/softirq.c Wed Jun 26 08:51:51 2002 @@ -259,7 +259,7 @@ void tasklet_kill(struct tasklet_struct *t) { if (in_interrupt()) - printk("Attempt to kill tasklet from interrupt\n"); + printk(KERN_WARNING "Attempt to kill tasklet from interrupt\n"); while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { current->state = TASK_RUNNING; @@ -407,7 +407,7 @@ continue; if (kernel_thread(ksoftirqd, (void *) (long) cpu, CLONE_FS | CLONE_FILES | CLONE_SIGNAL) < 0) - printk("spawn_ksoftirqd() failed for cpu %d\n", cpu); + printk(KERN_WARNING "spawn_ksoftirqd() failed for cpu %d\n", cpu); else while (!ksoftirqd_task(cpu)) yield(); diff -Nru linux-2.5.24/kernel/suspend.c linux-2.5.24-g/kernel/suspend.c --- linux-2.5.24/kernel/suspend.c Wed Jun 26 09:03:33 2002 +++ linux-2.5.24-g/kernel/suspend.c Wed Jun 26 08:48:18 2002 @@ -335,7 +335,7 @@ memcpy(cur->swh.magic.magic,"SWAP-SPACE",10); else if (!memcmp("SUSP2R",cur->swh.magic.magic,6)) memcpy(cur->swh.magic.magic,"SWAPSPACE2",10); - else printk("%sUnable to find suspended-data signature (%.10s - misspelled?\n", + else printk(KERN_WARNING "%sUnable to find suspended-data signature (%.10s - misspelled?\n", name_resume, cur->swh.magic.magic); } else { if ((!memcmp("SWAP-SPACE",cur->swh.magic.magic,10))) diff -Nru linux-2.5.24/kernel/timer.c linux-2.5.24-g/kernel/timer.c --- linux-2.5.24/kernel/timer.c Wed Jun 26 09:03:40 2002 +++ linux-2.5.24-g/kernel/timer.c Wed Jun 26 08:46:09 2002 @@ -194,7 +194,7 @@ return; bug: spin_unlock_irqrestore(&timerlist_lock, flags); - printk("bug: kernel timer added twice at %p.\n", + printk(KERN_ERR "bug: kernel timer added twice at %p.\n", __builtin_return_address(0)); }
--------------Boundary-00=_UNBCPFVV12FIIJDRG9XQ Content-Type: text/x-diff; charset="iso-8859-1"; name="printk-KERN-constants.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="printk-KERN-constants.patch"
ZGlmZiAtTnJ1IGxpbnV4LTIuNS4yNC9rZXJuZWwvZG1hLmMgbGludXgtMi41LjI0LWcva2VybmVs L2RtYS5jCi0tLSBsaW51eC0yLjUuMjQva2VybmVsL2RtYS5jCVN1biBKdW4gIDIgMjE6NDQ6NDMg MjAwMgorKysgbGludXgtMi41LjI0LWcva2VybmVsL2RtYS5jCVdlZCBKdW4gMjYgMDk6MDg6MzUg MjAwMgpAQCAtOTgsMTIgKzk4LDEyIEBACiB2b2lkIGZyZWVfZG1hKHVuc2lnbmVkIGludCBkbWFu cikKIHsKIAlpZiAoZG1hbnIgPj0gTUFYX0RNQV9DSEFOTkVMUykgewotCQlwcmludGsoIlRyeWlu ZyB0byBmcmVlIERNQSVkXG4iLCBkbWFucik7CisJCXByaW50ayhLRVJOX1dBUk5JTkc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XG4iLAogCQkJX19idWlsdGluX3JldHVy bl9hZGRyZXNzKDApKTsKIH0KIAo=
--------------Boundary-00=_UNBCPFVV12FIIJDRG9XQ-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/