@@ -678,6 +678,49 @@ s! {
678
678
pub sched_priority: :: c_int,
679
679
__opaque: [ :: c_char; 4 ] ,
680
680
}
681
+
682
+ pub struct vinfo_stat {
683
+ pub vst_dev: u32 ,
684
+ pub vst_mode: u16 ,
685
+ pub vst_nlink: u16 ,
686
+ pub vst_ino: u64 ,
687
+ pub vst_uid: :: uid_t,
688
+ pub vst_gid: :: gid_t,
689
+ pub vst_atime: i64 ,
690
+ pub vst_atimensec: i64 ,
691
+ pub vst_mtime: i64 ,
692
+ pub vst_mtimensec: i64 ,
693
+ pub vst_ctime: i64 ,
694
+ pub vst_ctimensec: i64 ,
695
+ pub vst_birthtime: i64 ,
696
+ pub vst_birthtimensec: i64 ,
697
+ pub vst_size: :: off_t,
698
+ pub vst_blocks: i64 ,
699
+ pub vst_blksize: i32 ,
700
+ pub vst_flags: u32 ,
701
+ pub vst_gen: u32 ,
702
+ pub vst_rdev: u32 ,
703
+ pub vst_qspare: [ i64 ; 2 ] ,
704
+ }
705
+
706
+ pub struct vnode_info {
707
+ pub vi_stat: vinfo_stat,
708
+ pub vi_type: :: c_int,
709
+ pub vi_pad: :: c_int,
710
+ pub vi_fsid: :: fsid_t,
711
+ }
712
+
713
+ pub struct vnode_info_path {
714
+ pub vip_vi: vnode_info,
715
+ // Normally it's `vip_path: [::c_char; MAXPATHLEN]` but because libc supports an old rustc
716
+ // version, we go around this limitation like this.
717
+ pub vip_path: [ [ :: c_char; 32 ] ; 32 ] ,
718
+ }
719
+
720
+ pub struct proc_vnodepathinfo {
721
+ pub pvi_cdir: vnode_info_path,
722
+ pub pvi_rdir: vnode_info_path,
723
+ }
681
724
}
682
725
683
726
s_no_extra_traits ! {
@@ -3530,8 +3573,11 @@ pub const RTAX_MAX: ::c_int = 8;
3530
3573
pub const KERN_PROCARGS2 : :: c_int = 49 ;
3531
3574
3532
3575
pub const PROC_PIDTASKALLINFO : :: c_int = 2 ;
3576
+ pub const PROC_PIDTBSDINFO : :: c_int = 3 ;
3533
3577
pub const PROC_PIDTASKINFO : :: c_int = 4 ;
3534
3578
pub const PROC_PIDTHREADINFO : :: c_int = 5 ;
3579
+ pub const PROC_PIDVNODEPATHINFO : :: c_int = 9 ;
3580
+ pub const PROC_PIDPATHINFO_MAXSIZE : :: c_int = 4096 ;
3535
3581
pub const MAXCOMLEN : usize = 16 ;
3536
3582
pub const MAXTHREADNAMESIZE : usize = 64 ;
3537
3583
0 commit comments