blob: e437853b2388f649da7adac8e2c216c451fbbccb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#ifndef _HELLOMAIN_H_
#define _HELLOMAIN_H_
#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
|