@@ -93,23 +93,6 @@ s_no_extra_traits! {
9393 #[ cfg( libc_union) ]
9494 pub a_un: __c_anonymous_elf64_auxv_union,
9595 }
96-
97- pub struct kinfo_file {
98- pub kf_structsize: :: c_int,
99- pub kf_type: :: c_int,
100- pub kf_fd: :: c_int,
101- pub kf_ref_count: :: c_int,
102- pub kf_flags: :: c_int,
103- _kf_pad0: :: c_int,
104- pub kf_offset: i64 ,
105- _priv: [ :: uintptr_t; 38 ] , // FIXME if needed
106- pub kf_status: u16 ,
107- _kf_pad1: u16 ,
108- _kf_ispare0: :: c_int,
109- pub kf_cap_rights: :: cap_rights_t,
110- _kf_cap_spare: u64 ,
111- pub kf_path: [ :: c_char; :: PATH_MAX as usize ] ,
112- }
11396}
11497
11598cfg_if ! {
@@ -253,52 +236,6 @@ cfg_if! {
253236 . finish( )
254237 }
255238 }
256-
257- impl PartialEq for kinfo_file {
258- fn eq( & self , other: & kinfo_file) -> bool {
259- self . kf_structsize == other. kf_structsize &&
260- self . kf_type == other. kf_type &&
261- self . kf_fd == other. kf_fd &&
262- self . kf_ref_count == other. kf_ref_count &&
263- self . kf_flags == other. kf_flags &&
264- self . kf_offset == other. kf_offset &&
265- self . kf_status == other. kf_status &&
266- self . kf_cap_rights == other. kf_cap_rights &&
267- self . kf_path
268- . iter( )
269- . zip( other. kf_path. iter( ) )
270- . all( |( a, b) | a == b)
271- }
272- }
273- impl Eq for kinfo_file { }
274- impl :: fmt:: Debug for kinfo_file {
275- fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
276- f. debug_struct( "kinfo_file" )
277- . field( "kf_structsize" , & self . kf_structsize)
278- . field( "kf_type" , & self . kf_type)
279- . field( "kf_fd" , & self . kf_fd)
280- . field( "kf_ref_count" , & self . kf_ref_count)
281- . field( "kf_flags" , & self . kf_flags)
282- . field( "kf_offset" , & self . kf_offset)
283- . field( "kf_status" , & self . kf_status)
284- . field( "kf_cap_rights" , & self . kf_cap_rights)
285- . field( "kf_path" , &&self . kf_path[ ..] )
286- . finish( )
287- }
288- }
289- impl :: hash:: Hash for kinfo_file {
290- fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
291- self . kf_structsize. hash( state) ;
292- self . kf_type. hash( state) ;
293- self . kf_fd. hash( state) ;
294- self . kf_ref_count. hash( state) ;
295- self . kf_flags. hash( state) ;
296- self . kf_offset. hash( state) ;
297- self . kf_status. hash( state) ;
298- self . kf_cap_rights. hash( state) ;
299- self . kf_path. hash( state) ;
300- }
301- }
302239 }
303240}
304241
@@ -326,6 +263,8 @@ pub const _MC_FPOWNED_NONE: c_long = 0x20000;
326263pub const _MC_FPOWNED_FPU: c_long = 0x20001 ;
327264pub const _MC_FPOWNED_PCB: c_long = 0x20002 ;
328265
266+ pub const KINFO_FILE_SIZE : :: c_int = 1392 ;
267+
329268cfg_if ! {
330269 if #[ cfg( libc_align) ] {
331270 mod align;
0 commit comments