@@ -3,50 +3,6 @@ use std::path::PathBuf;
3
3
use std:: process:: Command ;
4
4
use std:: { env, fs} ;
5
5
6
- const INCLUDED_TYPES : & [ & str ] = & [ "file_system_type" , "mode_t" , "umode_t" , "ctl_table" ] ;
7
- const INCLUDED_FUNCTIONS : & [ & str ] = & [
8
- "cdev_add" ,
9
- "cdev_init" ,
10
- "cdev_del" ,
11
- "register_filesystem" ,
12
- "unregister_filesystem" ,
13
- "krealloc" ,
14
- "kfree" ,
15
- "mount_nodev" ,
16
- "kill_litter_super" ,
17
- "register_sysctl" ,
18
- "unregister_sysctl_table" ,
19
- "access_ok" ,
20
- "_copy_to_user" ,
21
- "_copy_from_user" ,
22
- "alloc_chrdev_region" ,
23
- "unregister_chrdev_region" ,
24
- "wait_for_random_bytes" ,
25
- "get_random_bytes" ,
26
- "rng_is_initialized" ,
27
- "add_device_randomness" ,
28
- ] ;
29
- const INCLUDED_VARS : & [ & str ] = & [
30
- "EINVAL" ,
31
- "ENOMEM" ,
32
- "ESPIPE" ,
33
- "EFAULT" ,
34
- "EAGAIN" ,
35
- "__this_module" ,
36
- "FS_REQUIRES_DEV" ,
37
- "FS_BINARY_MOUNTDATA" ,
38
- "FS_HAS_SUBTYPE" ,
39
- "FS_USERNS_MOUNT" ,
40
- "FS_RENAME_DOES_D_MOVE" ,
41
- "BINDINGS_GFP_KERNEL" ,
42
- "KERN_INFO" ,
43
- "VERIFY_WRITE" ,
44
- "LINUX_VERSION_CODE" ,
45
- "SEEK_SET" ,
46
- "SEEK_CUR" ,
47
- "SEEK_END" ,
48
- "O_NONBLOCK" ,
49
- ] ;
50
6
const OPAQUE_TYPES : & [ & str ] = & [
51
7
// These need to be opaque because they're both packed and aligned, which rustc
52
8
// doesn't support yet. See https://github.com/rust-lang/rust/issues/59154
@@ -149,15 +105,6 @@ fn main() {
149
105
println ! ( "cargo:rerun-if-changed=src/bindings_helper.h" ) ;
150
106
builder = builder. header ( "src/bindings_helper.h" ) ;
151
107
152
- for t in INCLUDED_TYPES {
153
- builder = builder. whitelist_type ( t) ;
154
- }
155
- for f in INCLUDED_FUNCTIONS {
156
- builder = builder. whitelist_function ( f) ;
157
- }
158
- for v in INCLUDED_VARS {
159
- builder = builder. whitelist_var ( v) ;
160
- }
161
108
for t in OPAQUE_TYPES {
162
109
builder = builder. opaque_type ( t) ;
163
110
}
0 commit comments