printk

printk

Post by Geoffrey Callagh » Thu, 03 Oct 1996 04:00:00



I'm trying to add some logging to my kernel, but I can't figure out the
difference between printk and sys_syslog. Anyone have a clue?

        Geoff Callaghan

 
 
 

printk

Post by Jonathan Larmou » Fri, 04 Oct 1996 04:00:00




>I'm trying to add some logging to my kernel, but I can't figure out the
>difference between printk and sys_syslog. Anyone have a clue?

I'm sure someone somewhere has a clue about something ;) You want printk
by the sound of it. sys_syslog is the kernel function corresponding to
the syslog() user-level function. You call syslog(), which libc maps to
sys_syslog() which calls into the kernel. If you look at the functions
put_user() and get_user(), they write and read stuff from _user_ memory
(the fs register) not kernel memory, and so you mustn't use sys_syslog()
from within the kernel.

Jonathan L.
--
Origin UK, 323 Cambridge Science Park, Cambridge, England. CB4 4WG.
-------[ Do not think that every sad-eyed woman has loved and lost... ]------
-----------------------[ she may have got him. -Anon ]-----------------------
These opinions are all my own fault.

 
 
 

1. 2.5.45 [TRIVIAL]: Cosmetic ide-cd error message printk format

This is just part one, once I got the message. Now have I to
figure out WHY I got this message :-)

Regards,

Marcelo.

diff -Nru a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
--- a/drivers/ide/ide-cd.c      Fri Nov  1 18:02:36 2002

        } else {
 confused:
                printk ("%s: cdrom_pc_intr: The drive "
-                       "appears confused (ireason = 0x%2x)\n",
+                       "appears confused (ireason = 0x%02x)\n",
                        drive->name, ireason);
                rq->flags |= REQ_FAILED;
        }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Create man-pages ?

3. linux hangs with printk on schedule()

4. Does nslookup affect any network related files?

5. Where is printk?

6. new harddisk in old ibook (tangenine)

7. [PATCH] earlier printk output

8. System configuration script?

9. help with printk

10. do_mounts.c printk fix

11. PATCH: make the io-apic printk generate less junk mail

12. Module Programming Question (Unresolved symbol printk)

13. printk doesnt work