Migrate connect.cpp to Rust

This commit is contained in:
topjohnwu
2025-08-08 21:06:41 -07:00
committed by John Wu
parent 6839cb9ab2
commit cd0eca20b0
9 changed files with 302 additions and 254 deletions
+7 -1
View File
@@ -140,8 +140,14 @@ pub struct FileAttr {
pub con: crate::Utf8CStrBufArr<128>,
}
impl Default for FileAttr {
fn default() -> Self {
Self::new()
}
}
impl FileAttr {
fn new() -> Self {
pub fn new() -> Self {
FileAttr {
st: unsafe { mem::zeroed() },
#[cfg(feature = "selinux")]