Release 4.11 fs/proc/kmsg.c
/*
* linux/fs/proc/kmsg.c
*
* Copyright (C) 1992 by Linus Torvalds
*
*/
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/kernel.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/fs.h>
#include <linux/syslog.h>
#include <linux/uaccess.h>
#include <asm/io.h>
extern wait_queue_head_t log_wait;
static int kmsg_open(struct inode * inode, struct file * file)
{
return do_syslog(SYSLOG_ACTION_OPEN, NULL, 0, SYSLOG_FROM_PROC);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 25 | 89.29% | 2 | 40.00% |
Kees Cook | 3 | 10.71% | 3 | 60.00% |
Total | 28 | 100.00% | 5 | 100.00% |
static int kmsg_release(struct inode * inode, struct file * file)
{
(void) do_syslog(SYSLOG_ACTION_CLOSE, NULL, 0, SYSLOG_FROM_PROC);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 30 | 90.91% | 3 | 50.00% |
Kees Cook | 3 | 9.09% | 3 | 50.00% |
Total | 33 | 100.00% | 6 | 100.00% |
static ssize_t kmsg_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
if ((file->f_flags & O_NONBLOCK) &&
!do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_PROC))
return -EAGAIN;
return do_syslog(SYSLOG_ACTION_READ, buf, count, SYSLOG_FROM_PROC);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 31 | 50.82% | 3 | 33.33% |
Andrew Morton | 22 | 36.07% | 1 | 11.11% |
Kees Cook | 6 | 9.84% | 3 | 33.33% |
Mika Kukkonen | 1 | 1.64% | 1 | 11.11% |
Andries E. Brouwer | 1 | 1.64% | 1 | 11.11% |
Total | 61 | 100.00% | 9 | 100.00% |
static unsigned int kmsg_poll(struct file *file, poll_table *wait)
{
poll_wait(file, &log_wait, wait);
if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_PROC))
return POLLIN | POLLRDNORM;
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 37 | 78.72% | 3 | 37.50% |
Linus Torvalds | 6 | 12.77% | 1 | 12.50% |
Kees Cook | 3 | 6.38% | 3 | 37.50% |
Mika Kukkonen | 1 | 2.13% | 1 | 12.50% |
Total | 47 | 100.00% | 8 | 100.00% |
static const struct file_operations proc_kmsg_operations = {
.read = kmsg_read,
.poll = kmsg_poll,
.open = kmsg_open,
.release = kmsg_release,
.llseek = generic_file_llseek,
};
static int __init proc_kmsg_init(void)
{
proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Alexey Dobriyan | 24 | 100.00% | 1 | 100.00% |
Total | 24 | 100.00% | 1 | 100.00% |
fs_initcall(proc_kmsg_init);
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 164 | 61.65% | 9 | 37.50% |
Alexey Dobriyan | 32 | 12.03% | 1 | 4.17% |
Andrew Morton | 22 | 8.27% | 1 | 4.17% |
Kees Cook | 18 | 6.77% | 3 | 12.50% |
Art Haas | 8 | 3.01% | 1 | 4.17% |
Linus Torvalds | 7 | 2.63% | 2 | 8.33% |
Frédéric Weisbecker | 5 | 1.88% | 1 | 4.17% |
Dave Jones | 3 | 1.13% | 1 | 4.17% |
Adrian Bunk | 2 | 0.75% | 1 | 4.17% |
Mika Kukkonen | 2 | 0.75% | 1 | 4.17% |
Andries E. Brouwer | 1 | 0.38% | 1 | 4.17% |
Paul Gortmaker | 1 | 0.38% | 1 | 4.17% |
Arjan van de Ven | 1 | 0.38% | 1 | 4.17% |
Total | 266 | 100.00% | 24 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.