root/fs/proc/kmsg.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. kmsg_open
  2. kmsg_release
  3. kmsg_read

   1 /*
   2  *  linux/fs/proc/kmsg.c
   3  *
   4  *  Copyright (C) 1992  by Linus Torvalds
   5  *
   6  */
   7 
   8 #include <linux/types.h>
   9 #include <linux/errno.h>
  10 #include <linux/sched.h>
  11 #include <linux/kernel.h>
  12 #include <linux/tty.h>
  13 
  14 #include <asm/segment.h>
  15 #include <asm/io.h>
  16 
  17 extern int sys_syslog(int type, char * bug, int count);
  18 
  19 static int kmsg_open(struct inode * inode, struct file * file)
     /* [previous][next][first][last][top][bottom][index][help] */
  20 {
  21         return sys_syslog(1,NULL,0);
  22 }
  23 
  24 static void kmsg_release(struct inode * inode, struct file * file)
     /* [previous][next][first][last][top][bottom][index][help] */
  25 {
  26         (void) sys_syslog(0,NULL,0);
  27 }
  28 
  29 static int kmsg_read(struct inode * inode, struct file * file,char * buf, int count)
     /* [previous][next][first][last][top][bottom][index][help] */
  30 {
  31         return sys_syslog(2,buf,count);
  32 }
  33 
  34 static struct file_operations proc_kmsg_operations = {
  35         NULL,           /* kmsg_lseek */
  36         kmsg_read,
  37         NULL,           /* kmsg_write */
  38         NULL,           /* kmsg_readdir */
  39         NULL,           /* kmsg_select */
  40         NULL,           /* kmsg_ioctl */
  41         NULL,           /* mmap */
  42         kmsg_open,
  43         kmsg_release
  44 };
  45 
  46 struct inode_operations proc_kmsg_inode_operations = {
  47         &proc_kmsg_operations,  /* default base directory file-ops */
  48         NULL,                   /* create */
  49         NULL,                   /* lookup */
  50         NULL,                   /* link */
  51         NULL,                   /* unlink */
  52         NULL,                   /* symlink */
  53         NULL,                   /* mkdir */
  54         NULL,                   /* rmdir */
  55         NULL,                   /* mknod */
  56         NULL,                   /* rename */
  57         NULL,                   /* readlink */
  58         NULL,                   /* follow_link */
  59         NULL,                   /* bmap */
  60         NULL                    /* truncate */
  61 };

/* [previous][next][first][last][top][bottom][index][help] */