|
|
1.1 root 1: #ifndef __SYS_PATCH_H__
2: #define __SYS_PATCH_H__
3:
4: /*
5: * Definitions for the patch driver.
6: */
7:
8: /* Ioctl commands. */
9: #define PATCH_IOC 'p'
10:
11: #define PATCH_WR (PATCH_IOC | 1)
12: #define PATCH_RD (PATCH_IOC | 2)
13: #define PATCH_CON_IN (PATCH_IOC | 3)
14: #define PATCH_CON_OUT (PATCH_IOC | 4)
15:
16: #define PATCH_VAR_NAME_LENGTH 14
17:
18: /*
19: * Structure passed as third argument of ioctl PATCH_WR and PATCH_RD.
20: *
21: * patch_vname: ASCII name of the variable to be patched, null-terminated.
22: * patch_data: address in user data of the value to be written/read.
23: */
24:
25: struct patchVar {
26: char patch_vname[PATCH_VAR_NAME_LENGTH];
27: char * patch_data;
28: };
29:
30: /*
31: * Structure passed as third argument of ioctl PATCH_CON_IN and PATCH_CON_OUT.
32: *
33: * patch_vname: ASCII name of the CON struct to be enabled/disabled.
34: * patch_maj: major number for the device to be enabled/disabled.
35: */
36:
37: struct patchCon {
38: char patch_vname[PATCH_VAR_NAME_LENGTH];
39: int patch_maj;
40: };
41:
42: #if __KERNEL__
43: /*
44: * Structure used internally by patch driver for kernel variables.
45: *
46: * patch_vname: ASCII name of the variable to be patched, null-terminated.
47: * patch_addr: address of the variable.
48: * patch_size: sizeof the variable.
49: */
50:
51: struct patchVarInternal {
52: char patch_vname[PATCH_VAR_NAME_LENGTH];
53: char * patch_addr;
54: int patch_size;
55: };
56:
57: /*
58: * Structure used internally by patch driver for device CON structs.
59: *
60: * patch_vname: ASCII name of the variable to be patched, null-terminated.
61: * patch_addr: address of the variable.
62: * patch_size: sizeof the variable.
63: */
64:
65: struct patchConInternal {
66: char patch_vname[PATCH_VAR_NAME_LENGTH];
67: char * patch_addr;
68: };
69:
70: extern struct patchVarInternal patchVarTable[];
71: extern int patchVarCount;
72:
73: extern struct patchConInternal patchConTable[];
74: extern int patchConCount;
75:
76: #endif /* __KERNEL__ */
77:
78: #endif /* ! defined (__SYS_PATCH_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.