linux/drivers/char
Kay Sievers e11fea92e1 kmsg: export printk records to the /dev/kmsg interface
Support for multiple concurrent readers of /dev/kmsg, with read(),
seek(), poll() support. Output of message sequence numbers, to allow
userspace log consumers to reliably reconnect and reconstruct their
state at any given time. After open("/dev/kmsg"), read() always
returns *all* buffered records. If only future messages should be
read, SEEK_END can be used. In case records get overwritten while
/dev/kmsg is held open, or records get faster overwritten than they
are read, the next read() will return -EPIPE and the current reading
position gets updated to the next available record. The passed
sequence numbers allow the log consumer to calculate the amount of
lost messages.

  [root@mop ~]# cat /dev/kmsg
  5,0,0;Linux version 3.4.0-rc1+ (kay@mop) (gcc version 4.7.0 20120315 ...
  6,159,423091;ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
  7,160,424069;pci_root PNP0A03:00: host bridge window [io  0x0000-0x0cf7] (ignored)
   SUBSYSTEM=acpi
   DEVICE=+acpi:PNP0A03:00
  6,339,5140900;NET: Registered protocol family 10
  30,340,5690716;udevd[80]: starting version 181
  6,341,6081421;FDC 0 is a S82078B
  6,345,6154686;microcode: CPU0 sig=0x623, pf=0x0, revision=0x0
  7,346,6156968;sr 1:0:0:0: Attached scsi CD-ROM sr0
   SUBSYSTEM=scsi
   DEVICE=+scsi:1:0:0:0
  6,347,6289375;microcode: CPU1 sig=0x623, pf=0x0, revision=0x0

Cc: Karel Zak <kzak@redhat.com>
Tested-by: William Douglas <william.douglas@intel.com>
Signed-off-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 17:03:27 -07:00
..
agp drm/i915: disable ppgtt on snb when dmar is enabled 2012-04-02 15:59:07 +02:00
hw_random ARM: global cleanups 2012-03-27 16:03:32 -07:00
ipmi Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-28 17:19:28 -07:00
mwave Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
pcmcia Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
tpm Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-03-21 13:25:04 -07:00
xilinx_hwicap Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig tty: delete briq_panel.c driver 2012-03-08 10:45:55 -08:00
Makefile tty: delete briq_panel.c driver 2012-03-08 10:45:55 -08:00
apm-emulation.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm 2012-04-05 17:34:30 -07:00
applicom.c drivers/char/applicom.c: fix information leak to userland 2010-10-27 18:03:14 -07:00
applicom.h
bfin-otp.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
bsr.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
ds1302.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ds1620.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
dsp56k.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
dtlk.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
efirtc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
generic_nvram.c drivers: fix up various ->llseek() implementations 2011-07-20 20:47:58 -04:00
genrtc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hangcheck-timer.c
hpet.c printk(): add KERN_CONT where needed in hpet and vt code 2012-04-09 10:30:39 -07:00
i8k.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
lp.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
mbcs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mbcs.h Fix common misspellings 2011-03-31 11:26:23 -03:00
mem.c kmsg: export printk records to the /dev/kmsg interface 2012-05-07 17:03:27 -07:00
misc.c switch device_get_devnode() and ->devnode() to umode_t * 2012-01-03 22:54:55 -05:00
mmtimer.c posix-timers: Cleanup namespace 2011-02-02 15:28:19 +01:00
msm_smd_pkt.c drivers/char/msm_smd_pkt.c: don't use IS_ERR() 2011-08-25 16:25:33 -07:00
mspec.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nsc_gpio.c
nvram.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nwbutton.c Fix common misspellings 2011-03-31 11:26:23 -03:00
nwbutton.h
nwflash.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
pc8736x_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ppdev.c drivers/char/ppdev.c: put gotten port value 2011-05-26 17:12:37 -07:00
ps3flash.c drivers/char: Add module.h to those who were using it implicitly 2011-10-31 19:31:40 -04:00
ramoops.c char/ramoops: included linux/err.h twice 2012-02-24 14:16:43 -08:00
random.c drivers/char/random.c: fix boot id uniqueness race 2012-04-12 13:12:12 -07:00
raw.c switch device_get_devnode() and ->devnode() to umode_t * 2012-01-03 22:54:55 -05:00
rtc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
scx200_gpio.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
snsc.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
snsc.h headers: kobject.h redux 2011-01-10 08:51:44 -08:00
snsc_event.c
sonypi.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
tb0219.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
tile-srom.c tile-srom.c driver: minor code cleanup 2012-04-02 12:14:10 -04:00
tlclk.c char: Fix typo in tlclk.c 2012-02-09 23:09:37 +01:00
toshiba.c Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl 2010-10-22 10:52:56 -07:00
ttyprintk.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
uv_mmtimer.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
virtio_console.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00