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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#![allow(non_upper_case_globals)]
#![allow(renamed_and_removed_lints)]
#![deny(missing_docs)]
#![feature(core_intrinsics)]
#[cfg(any(target_os = "android", target_os = "linux"))] #[macro_use] extern crate bitflags;
#[macro_use] extern crate const_cstr_fork;
extern crate errno;
extern crate libc;
extern crate libc_extra;
#[macro_use] extern crate likely;
#[cfg(unix)] #[macro_use] extern crate maplit;
#[macro_use] extern crate serde_derive;
extern crate rust_extra;
#[cfg(unix)] extern crate syscall_alt;
#[cfg(any(target_os = "android", target_os = "linux"))] use self::android_linux::*;
#[cfg(any(target_os = "android", target_os = "linux"))] use self::android_linux::mounts::*;
#[cfg(any(target_os = "android", target_os = "linux"))] use self::android_linux::page_table::*;
#[cfg(any(target_os = "android", target_os = "linux"))] use self::android_linux::linux_kernel_modules::*;
use self::hyper_thread::*;
use self::memory_information::*;
use self::numa::*;
use self::process_status::*;
use self::strings::*;
use ::const_cstr_fork::ConstCStr;
use ::errno::errno;
use ::libc::*;
use ::libc::c_void;
use ::libc::FILE;
use ::libc::gid_t;
use ::libc::mode_t;
use ::libc::mount;
use ::libc::uid_t;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc::umount2;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::linux::capability;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::linux::ethtool::*;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::linux::seccomp::SECCOMP_MODE_STRICT;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::linux::securebits::*;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::linux::sockios::SIOCETHTOOL;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::mntent::setmntent;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::mntent::getmntent;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::mntent::endmntent;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::mntent::mntent;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::net::if_::*;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::stdio::cookie_io_functions_t;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::stdio::cookie_write_function_t;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::stdio::fopencookie;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::sys::prctl::PR_CAPBSET_DROP;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::sys::prctl::PR_CAPBSET_READ;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::sys::prctl::PR_CAP_AMBIENT;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::libc_extra::android_linux::sys::prctl::PR_CAP_AMBIENT_CLEAR_ALL;
#[cfg(target_os = "linux")] use ::libc_extra::linux::errno::program_invocation_short_name;
#[cfg(unix)] use ::libc_extra::unix::stdio::stderr;
#[cfg(unix)] use ::libc_extra::unix::stdio::stdout;
#[cfg(unix)] use ::libc_extra::unix::unistd::setegid;
use ::std::collections::BTreeSet;
use ::std::collections::HashMap;
use ::std::collections::HashSet;
use ::std::env::set_var;
use ::std::env::var_os;
use ::std::error;
use ::std::ffi::CStr;
use ::std::ffi::CString;
use ::std::ffi::NulError;
use ::std::ffi::OsStr;
use ::std::ffi::OsString;
use ::std::fmt;
use ::std::fmt::Debug;
use ::std::fmt::Display;
use ::std::fmt::Formatter;
use ::std::fs::create_dir_all;
use ::std::fs::File;
use ::std::fs::OpenOptions;
use ::std::fs::metadata;
use ::std::fs::Permissions;
use ::std::fs::read_to_string;
use ::std::fs::remove_file;
use ::std::fs::set_permissions;
use ::std::io;
use ::std::io::BufRead;
use ::std::io::BufReader;
use ::std::io::ErrorKind;
#[allow(unused_imports)] use ::std::io::Read;
#[allow(unused_imports)] use ::std::io::Seek;
use ::std::io::SeekFrom;
use ::std::io::Write;
use ::std::mem::size_of;
use ::std::mem::transmute;
use ::std::mem::uninitialized;
use ::std::num::ParseIntError;
use ::std::ops::Add;
use ::std::ops::AddAssign;
use ::std::ops::Sub;
use ::std::ops::SubAssign;
#[cfg(unix)] use ::std::os::unix::io::RawFd;
#[cfg(unix)] use ::std::os::unix::io::AsRawFd;
#[cfg(unix)] use ::std::os::unix::ffi::OsStrExt;
#[cfg(unix)] #[allow(unused_imports)] use ::std::os::unix::ffi::OsStringExt;
#[cfg(unix)] use ::std::os::unix::fs::PermissionsExt;
use ::std::process;
use ::std::process::Command;
use ::std::process::Stdio;
use ::std::path::Path;
use ::std::path::PathBuf;
use ::std::ptr::NonNull;
use ::std::ptr::null_mut;
use ::std::ptr::write;
use ::std::str::from_utf8;
use ::std::str::FromStr;
use ::std::str::Utf8Error;
#[cfg(unix)] use ::syscall_alt::constants::E;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::syscall_alt::constants::SYS::SYS_finit_module;
#[cfg(any(target_os = "android", target_os = "linux"))] use ::syscall_alt::constants::SYS::SYS_delete_module;
#[cfg(any(target_os = "android", target_os = "linux"))]
pub mod android_linux;
pub mod daemonize;
pub mod hyper_thread;
pub mod memory_information;
pub mod numa;
pub mod process_status;
#[cfg(unix)] pub mod signals;
pub mod strings;
pub mod thread;
include!("assert_effective_user_id_is_root.rs");
include!("get_program_name.rs");
include!("ListParseError.rs");
include!("PathExt.rs");
include!("ProcPath.rs");
include!("SysPath.rs");