Home
last modified time | relevance | path

Searched refs:fs (Results 1 – 25 of 139) sorted by relevance

123456

/packages/modules/Bluetooth/system/gd/rust/linux/mgmt/src/
Dconfig_util.rs33 match std::fs::read(BLUETOOTH_DAEMON_CURRENT) { in is_floss_enabled()
46 std::fs::write( in write_floss_enabled()
57 std::fs::read_to_string(BTMANAGERD_CONF) in read_config()
92 _ => std::fs::write(BTMANAGERD_CONF, "{}").is_ok(), in fix_config_file_format()
94 _ => std::fs::write(BTMANAGERD_CONF, "{}").is_ok(), in fix_config_file_format()
104 Some(s) => std::fs::write(BTMANAGERD_CONF, s).is_ok(), in modify_hci_n_enabled()
151 Some(s) => std::fs::write(BTMANAGERD_CONF, s).is_ok(), in set_default_adapter()
157 match std::fs::read_dir(HCI_DEVICES_DIR) { in list_hci_devices_string()
173 match std::fs::canonicalize(format!("{}/hci{}/device", HCI_DEVICES_DIR, hci.to_i32()).as_str()) in get_devpath_for_hci()
184 match std::fs::read_dir(pid_dir) { in list_pid_files()
[all …]
/packages/modules/Virtualization/libs/libfdt/tests/
Dapi_test.rs24 use std::fs;
36 let data = fs::read(TEST_TREE_WITH_ONE_MEMORY_RANGE_PATH).unwrap(); in retrieving_memory_from_fdt_with_one_memory_range_succeeds()
48 let data = fs::read(TEST_TREE_WITH_MULTIPLE_MEMORY_RANGES_PATH).unwrap(); in retrieving_memory_from_fdt_with_multiple_memory_ranges_succeeds()
62 let data = fs::read(TEST_TREE_WITH_EMPTY_MEMORY_RANGE_PATH).unwrap(); in retrieving_first_memory_from_fdt_with_empty_memory_range_fails()
72 let data = fs::read(TEST_TREE_WITH_NO_MEMORY_NODE_PATH).unwrap(); in retrieving_memory_from_fdt_with_no_memory_node_fails()
81 let data = fs::read(TEST_TREE_WITH_NO_MEMORY_NODE_PATH).unwrap(); in node_name()
97 let data = fs::read(TEST_TREE_WITH_NO_MEMORY_NODE_PATH).unwrap(); in node_subnodes()
109 let data = fs::read(TEST_TREE_WITH_NO_MEMORY_NODE_PATH).unwrap(); in node_properties()
130 let data = fs::read(TEST_TREE_WITH_NO_MEMORY_NODE_PATH).unwrap(); in node_supernode_at_depth()
175 let data = fs::read(TEST_TREE_PHANDLE_PATH).unwrap(); in max_phandle()
[all …]
/packages/modules/Virtualization/pvmfw/avb/tests/
Dapi_test.rs23 use std::{fs, mem::size_of, ptr};
65 &fs::read(TEST_IMG_WITH_ONE_HASHDESC_PATH)?, in payload_expecting_no_initrd_passes_verification_with_no_initrd()
71 let kernel_digest = hash(&[&hex::decode("1111")?, &fs::read(UNSIGNED_TEST_IMG_PATH)?]); in payload_expecting_no_initrd_passes_verification_with_no_initrd()
88 &fs::read(TEST_IMG_WITH_NON_INITRD_HASHDESC_PATH)?, in payload_with_non_initrd_descriptor_fails_verification_with_no_initrd()
98 &fs::read(TEST_IMG_WITH_INITRD_AND_NON_INITRD_DESC_PATH)?, in payload_with_non_initrd_descriptor_fails_verification_with_initrd()
109 &fs::read(TEST_IMG_WITH_SERVICE_VM_PROP_PATH)?, in payload_expecting_no_initrd_passes_verification_with_service_vm_prop()
115 let kernel_digest = hash(&[&hex::decode("2131")?, &fs::read(UNSIGNED_TEST_IMG_PATH)?]); in payload_expecting_no_initrd_passes_verification_with_service_vm_prop()
132 &fs::read(TEST_IMG_WITH_UNKNOWN_VM_TYPE_PROP_PATH)?, in payload_with_unknown_vm_type_fails_verification_with_no_initrd()
142 &fs::read(TEST_IMG_WITH_MULTIPLE_PROPS_PATH)?, in payload_with_multiple_props_fails_verification_with_no_initrd()
152 &fs::read(TEST_IMG_WITH_DUPLICATED_CAP_PATH)?, in payload_with_duplicated_capability_fails_verification_with_no_initrd()
[all …]
Dutils.rs29 fs,
60 Ok(fs::read(MICRODROID_KERNEL_IMG_PATH)?) in load_latest_signed_kernel()
64 Ok(fs::read(INITRD_NORMAL_IMG_PATH)?) in load_latest_initrd_normal()
68 Ok(fs::read(INITRD_DEBUG_IMG_PATH)?) in load_latest_initrd_debug()
72 Ok(fs::read(PUBLIC_KEY_RSA4096_PATH)?) in load_trusted_public_key()
/packages/modules/Virtualization/apkdmverity/src/
Dmain.rs34 use std::fs;
35 use std::os::unix::fs::FileTypeExt;
103 let (data_device, apk_size) = if fs::metadata(&apk)?.file_type().is_block_device() { in enable_verity()
106 let apk_size = fs::metadata(&apk)?.len(); in enable_verity()
165 use std::fs::{File, OpenOptions};
168 use std::os::unix::fs::FileExt;
241 let verity = fs::read(&ctx.result.mapper_device).unwrap(); in correct_inputs()
242 let original = fs::read(&ctx.result.data_device).unwrap(); in correct_inputs()
262 fs::read(&ctx.result.mapper_device).expect_err("Should fail"); in incorrect_apk()
285 fs::read(&ctx.result.mapper_device).expect_err("Should fail"); in incorrect_merkle_tree()
[all …]
/packages/modules/Virtualization/compos/composd/src/
Dinstance_starter.rs32 use std::fs;
104 fs::create_dir_all(&self.instance_root)?; in start_new_instance()
114 let _ignored1 = fs::remove_file(&self.idsig); in start_new_instance()
115 let _ignored2 = fs::remove_file(&self.idsig_manifest_apk); in start_new_instance()
116 let _ignored3 = fs::remove_file(&self.idsig_manifest_ext_apk); in start_new_instance()
122 fs::write(self.instance_root.join("bcc"), bcc).context("Writing BCC")?; in start_new_instance()
132 fs::read(&self.instance_id_file)? in start_vm()
139 let instance_image = fs::OpenOptions::new() in start_vm()
167 let instance_image = fs::OpenOptions::new() in create_instance_image()
188 fs::write(&self.instance_id_file, id)?; in allocate_instance_id()
/packages/modules/Virtualization/pvmfw/src/
Ddevice_assignment.rs1123 use std::fs;
1252 let mut fdt_data = fs::read(FDT_FILE_PATH).unwrap(); in device_info_new_without_symbols()
1253 let mut vm_dtbo_data = fs::read(VM_DTBO_WITHOUT_SYMBOLS_FILE_PATH).unwrap(); in device_info_new_without_symbols()
1264 let mut fdt_data = fs::read(FDT_WITHOUT_DEVICE_FILE_PATH).unwrap(); in device_info_new_without_device()
1265 let mut vm_dtbo_data = fs::read(VM_DTBO_FILE_PATH).unwrap(); in device_info_new_without_device()
1276 let mut fdt_data = fs::read(FDT_WITHOUT_IOMMUS_FILE_PATH).unwrap(); in device_info_assigned_info_without_iommus()
1277 let mut vm_dtbo_data = fs::read(VM_DTBO_FILE_PATH).unwrap(); in device_info_assigned_info_without_iommus()
1299 let mut fdt_data = fs::read(FDT_FILE_PATH).unwrap(); in device_info_assigned_info()
1300 let mut vm_dtbo_data = fs::read(VM_DTBO_FILE_PATH).unwrap(); in device_info_assigned_info()
1322 let mut fdt_data = fs::read(FDT_FILE_PATH).unwrap(); in device_info_filter()
[all …]
/packages/modules/Virtualization/microdroid/
Dinit.rc73 trigger early-fs
77 # /system and /vendor must be mounted by the end of the fs stage,
79 trigger fs
80 trigger post-fs
84 # specified in the previous mount_all command on the fs stage.
87 trigger late-fs
95 trigger post-fs-data
100 on post-fs
123 on late-fs && property:ro.debuggable=1
125 # This does not work correctly if it is called in post-fs.
[all …]
/packages/services/Telephony/src/com/android/phone/
DImsStateCallbackController.java543 void notifyExternalRcsState(ExternalRcsFeatureState fs) { in notifyExternalRcsState() argument
546 + " state=" + (fs.mState == STATE_UNKNOWN in notifyExternalRcsState()
547 ? "" : ImsFeature.STATE_LOG_MAP.get(fs.mState)) in notifyExternalRcsState()
548 + ", reason=" + imsStateReasonToString(fs.mReason)); in notifyExternalRcsState()
553 if (fs.mState == STATE_UNKNOWN) { in notifyExternalRcsState()
554 if (oldFs != null) fs.mState = oldFs.mState; in notifyExternalRcsState()
555 else fs.mState = STATE_UNAVAILABLE; in notifyExternalRcsState()
558 mExternalState = fs; in notifyExternalRcsState()
564 if (fs.hasActiveFeatures()) { in notifyExternalRcsState()
566 if ((oldFs == null || !oldFs.isReady()) && fs.isReady()) { in notifyExternalRcsState()
[all …]
/packages/modules/Bluetooth/android/pandora/mmi2grpc/mmi2grpc/
D_audio.py48 def __init__(self, transport, amplitude, fs): argument
58 self.fs = fs
80 np.sin(2 * np.pi * np.arange(self.fs * duration) * (f / self.fs))
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/opp/
DBluetoothOppSendFileInfoTest.java146 FileInputStream fs = mock(FileInputStream.class); in generateFileInfo_withUncorrectableMismatch_returnsSendFileInfoError() local
159 doReturn(fs).when(mCallProxy).contentResolverOpenInputStream(any(), eq(uri)); in generateFileInfo_withUncorrectableMismatch_returnsSendFileInfoError()
160 doReturn(0, -1).when(fs).read(any(), anyInt(), anyInt()); in generateFileInfo_withUncorrectableMismatch_returnsSendFileInfoError()
179 FileInputStream fs = mock(FileInputStream.class); in generateFileInfo_withCorrectableMismatch_returnInfoWithCorrectLength() local
191 doReturn(fs).when(fd).createInputStream(); in generateFileInfo_withCorrectableMismatch_returnInfoWithCorrectLength()
194 doReturn((int) correctFileLength, -1).when(fs).read(any(), anyInt(), anyInt()); in generateFileInfo_withCorrectableMismatch_returnInfoWithCorrectLength()
199 assertThat(info.mInputStream).isEqualTo(fs); in generateFileInfo_withCorrectableMismatch_returnInfoWithCorrectLength()
/packages/modules/Virtualization/authfs/aidl/com/android/virt/fs/
DIAuthFsService.aidl17 package com.android.virt.fs;
19 import com.android.virt.fs.AuthFsConfig;
20 import com.android.virt.fs.IAuthFs;
DIAuthFs.aidl17 package com.android.virt.fs;
19 import com.android.virt.fs.AuthFsConfig;
/packages/modules/Virtualization/libs/dice/driver/src/
Dlib.rs27 use std::fs;
80 let mut file = fs::File::open(driver_path) in new()
113 fs::File::open(file_path).map_err(|error| Error::new(error).context("open file"))?; in from_file()
158 fs::write(driver_path, "wipe") in derive()
162 fs::remove_file(file_path) in derive()
192 use std::fs::File;
/packages/modules/Virtualization/authfs/testdata/
DREADME.md1 fs-verity signing
3 With a key pair, fs-verity signature can be generated by simply running
5 [fsverity-utils](https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git)
/packages/modules/Virtualization/libs/devicemapper/src/
Dloopdevice.rs29 use std::fs::{File, OpenOptions};
30 use std::os::unix::fs::OpenOptionsExt;
162 use std::fs;
172 "1" == fs::read_to_string(dio).unwrap().trim() in is_direct_io()
178 "0" == fs::read_to_string(ro).unwrap().trim() in is_direct_io_writable()
/packages/modules/Virtualization/authfs/service/src/
Dmain.rs30 use std::fs::{create_dir, read_dir, remove_dir_all, remove_file};
34 use authfs_aidl_interface::aidl::com::android::virt::fs::AuthFsConfig::AuthFsConfig;
35 use authfs_aidl_interface::aidl::com::android::virt::fs::IAuthFs::IAuthFs;
36 use authfs_aidl_interface::aidl::com::android::virt::fs::IAuthFsService::{
/packages/modules/Bluetooth/system/gd/rust/linux/mgmt/
Dbuild.rs3 use std::fs;
14 let mut f = fs::File::create(out_dir.join("mod.rs")).unwrap(); in gen_mod_rs()
45 match fs::create_dir(proto_out_dir.as_os_str().to_str().unwrap()) { in main()
/packages/modules/Virtualization/libs/apkverify/tests/
Dapkverify_test.rs27 use std::{fs, matches, path::Path};
47 let mut reader = fs::File::open("tests/data/v3-only-with-stamp.apk").unwrap(); in test_zip_sections_with_apk()
320 let apk = fs::File::open(&apk_path).expect("Unabled to open apk file"); in validate_apk_digest()
342 fs::metadata(&expected_data_path).is_ok(), in assert_bytes_eq_to_data_in_file()
350 let expected_data = fs::read(&expected_data_path).unwrap(); in assert_bytes_eq_to_data_in_file()
/packages/modules/Virtualization/encryptedstore/src/
Dmain.rs26 use std::fs::{create_dir_all, OpenOptions};
29 use std::os::unix::fs::{FileTypeExt, PermissionsExt};
77 std::fs::metadata(blkdevice) in encryptedstore_init()
109 std::fs::set_permissions(mountpoint, permissions).context("Failed to chmod root directory") in set_root_dir_permissions()
/packages/modules/Virtualization/microdroid_manager/src/
Dioutil.rs20 use std::fs::File;
22 use std::os::unix::fs::FileTypeExt;
71 use std::fs::rename;
/packages/modules/Virtualization/libs/apkverify/src/
Dhashtree.rs196 use std::fs::{self, File};
205 let golden_hash_tree = fs::read(format!("{}.hash", input_name))?; in compare_with_golden_output()
206 let golden_descriptor = fs::read(format!("{}.descriptor", input_name))?; in compare_with_golden_output()
209 let size = std::fs::metadata(&input_name)?.len() as usize; in compare_with_golden_output()
/packages/modules/Virtualization/virtualizationmanager/fsfdt/src/
Dmain.rs20 use std::fs;
41 fs::write(&opt.fdt_file_path, fdt.as_slice()).unwrap(); in main()
Dlib.rs20 use std::fs;
63 fs::read_dir(&dir_path).with_context(|| format!("Failed to read {dir_path:?}"))?; in overlay_onto()
79 let value = fs::read(&entry.path())?; in overlay_onto()
/packages/modules/Virtualization/compos/verify/
Dverify.rs34 use std::fs;
35 use std::fs::File;
101 fs::read(instance_id_file)?.try_into().map_err(|_| anyhow!("Failed to get instance_id"))? in try_main()

123456