Loading tools/aconfig/aconfig_storage_read_api/src/lib.rs +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ pub mod package_table_query; pub use aconfig_storage_file::{AconfigStorageError, FlagValueType, StorageFileType}; pub use flag_table_query::FlagReadContext; pub use mapped_file::map_file; pub use package_table_query::PackageReadContext; use aconfig_storage_file::read_u32_from_bytes; Loading tools/aconfig/aconfig_storage_read_api/src/mapped_file.rs +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ use crate::StorageFileType; /// The memory mapped file may have undefined behavior if there are writes to this /// file after being mapped. Ensure no writes can happen to this file while this /// mapping stays alive. unsafe fn map_file(file_path: &str) -> Result<Mmap, AconfigStorageError> { pub unsafe fn map_file(file_path: &str) -> Result<Mmap, AconfigStorageError> { let file = File::open(file_path) .map_err(|errmsg| FileReadFail(anyhow!("Failed to open file {}: {}", file_path, errmsg)))?; unsafe { Loading Loading
tools/aconfig/aconfig_storage_read_api/src/lib.rs +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ pub mod package_table_query; pub use aconfig_storage_file::{AconfigStorageError, FlagValueType, StorageFileType}; pub use flag_table_query::FlagReadContext; pub use mapped_file::map_file; pub use package_table_query::PackageReadContext; use aconfig_storage_file::read_u32_from_bytes; Loading
tools/aconfig/aconfig_storage_read_api/src/mapped_file.rs +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ use crate::StorageFileType; /// The memory mapped file may have undefined behavior if there are writes to this /// file after being mapped. Ensure no writes can happen to this file while this /// mapping stays alive. unsafe fn map_file(file_path: &str) -> Result<Mmap, AconfigStorageError> { pub unsafe fn map_file(file_path: &str) -> Result<Mmap, AconfigStorageError> { let file = File::open(file_path) .map_err(|errmsg| FileReadFail(anyhow!("Failed to open file {}: {}", file_path, errmsg)))?; unsafe { Loading