Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
err_inject.c File Reference
#include <linux/device.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/cpu.h>
#include <linux/module.h>

Go to the source code of this file.

Macros

#define ERR_INJ_DEBUG
 
#define ERR_DATA_BUFFER_SIZE   3
 
#define define_one_ro(name)   static DEVICE_ATTR(name, 0444, show_##name, NULL)
 
#define define_one_rw(name)   static DEVICE_ATTR(name, 0644, show_##name, store_##name)
 
#define show(name)
 
#define store(name)
 

Functions

 show (err_type_info)
 
 show (err_struct_info)
 
 show (status)
 
 module_init (err_inject_init)
 
 module_exit (err_inject_exit)
 
 MODULE_AUTHOR ("Fenghua Yu <[email protected]>")
 
 MODULE_DESCRIPTION ("MC error injection kernel sysfs interface")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define define_one_ro (   name)    static DEVICE_ATTR(name, 0444, show_##name, NULL)

Definition at line 37 of file err_inject.c.

#define define_one_rw (   name)    static DEVICE_ATTR(name, 0644, show_##name, store_##name)

Definition at line 40 of file err_inject.c.

#define ERR_DATA_BUFFER_SIZE   3

Definition at line 35 of file err_inject.c.

#define ERR_INJ_DEBUG

Definition at line 33 of file err_inject.c.

#define show (   name)
Value:
static ssize_t \
show_##name(struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
u32 cpu=dev->id; \
return sprintf(buf, "%lx\n", name[cpu]); \
}
#define store (   name)
Value:
static ssize_t \
store_##name(struct device *dev, struct device_attribute *attr, \
const char *buf, size_t size) \
{ \
unsigned int cpu=dev->id; \
name[cpu] = simple_strtoull(buf, NULL, 16); \
return size; \
}

Function Documentation

MODULE_AUTHOR ( "Fenghua Yu <[email protected]>"  )
MODULE_DESCRIPTION ( "MC error injection kernel sysfs interface )
module_exit ( err_inject_exit  )
module_init ( err_inject_init  )
MODULE_LICENSE ( "GPL"  )
show ( err_type_info  )

Definition at line 126 of file err_inject.c.

show ( err_struct_info  )

Definition at line 158 of file err_inject.c.

show ( status  )

Definition at line 198 of file err_inject.c.

Variable Documentation

u8 data1

Definition at line 48 of file err_inject.c.

u8 data2

Definition at line 49 of file err_inject.c.

u64 data3

Definition at line 50 of file err_inject.c.