diff options
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -1,7 +1,29 @@ -#ifndef _MAIN_H_ -#define _MAIN_H_ +#ifndef _HELLOMAIN_H_ +#define _HELLOMAIN_H_ -extern char *debugmsg; +#include <linux/cdev.h> + +#ifndef HELLO_MAJOR +#define HELLO_MAJOR 0 /* let kernel choose, unless user really defined it */ +#endif + +#define HELLO_KERNEL_BUFF_LEN 1024 + +extern int hello_major; +extern int hello_minor; + +extern char *magicstr; + +struct hello_dev { + dev_t devnum; + struct cdev cdev; /* char device */ + /* for r/w operations */ + char hello_buffer[HELLO_KERNEL_BUFF_LEN]; + size_t buff_index; +}; + +/* function prototypes */ +int hello_debugfs(void); #endif |