Home
last modified time | relevance | path

Searched refs:deviceName (Results 1 - 25 of 89) sorted by relevance

1234

/base/update/sys_installer/services/module_update/src/
H A Dmodule_dm.cpp52 bool CreateDmDevice(const OHOS::SysInstaller::ModuleFile &moduleFile, std::string &deviceName) in CreateDmDevice() argument
59 std::string devName = OHOS::ExtractFileName(deviceName); in CreateDmDevice()
63 LOG(INFO) << "CreateDmDevice deviceName=" << deviceName; in CreateDmDevice()
72 ret = FsHvbConstructVerityTarget(&target, deviceName.c_str(), &cert); in CreateDmDevice()
87 deviceName = std::string(devPath); in CreateDmDevice()
88 LOG(INFO) << "Create dm device success. path=" << deviceName; in CreateDmDevice()
100 bool RemoveDmDevice(std::string deviceName) in RemoveDmDevice() argument
104 std::string devName = OHOS::ExtractFileName(deviceName); in RemoveDmDevice()
/base/startup/init/interfaces/innerkits/fs_manager/
H A Dfstab_mount.c453 BEGET_LOGI("Mount device %s to %s", item->deviceName, item->mountPoint); in DoMountOneItem()
463 rc = Mount(item->deviceName, item->mountPoint, item->fsType, mountFlags, fsSpecificData); in DoMountOneItem()
470 int ret = DoFormat(item->deviceName, item->fsType); in DoMountOneItem()
475 rc = Mount(item->deviceName, item->mountPoint, item->fsType, mountFlags, fsSpecificData); in DoMountOneItem()
480 BEGET_LOGE("Mount device %s to %s failed, err = %d, retry", item->deviceName, item->mountPoint, errno); in DoMountOneItem()
488 if (CheckIsErofs(item->deviceName)) { in MountItemByFsType()
499 BEGET_LOGI("fsType not erofs system, device [%s] skip erofs mount process", item->deviceName); in MountItemByFsType()
512 BEGET_LOGI("fsType is erofs system, device [%s] skip ext4 or hms mount process", item->deviceName); in MountItemByFsType()
524 WaitForFile(item->deviceName, WAIT_MAX_SECOND); in MountOneItem()
528 int ret = DoResizeF2fs(item->deviceName, in MountOneItem()
[all...]
H A Dfstab.c101 if (item->deviceName != NULL) { in ReleaseFstabItem()
102 free(item->deviceName); in ReleaseFstabItem()
103 item->deviceName = NULL; in ReleaseFstabItem()
156 item->deviceName = strdup(p); in ParseFstabPerLine()
157 BEGET_ERROR_CHECK(item->deviceName != NULL, break, "strdup deviceName failed."); in ParseFstabPerLine()
316 int GetBlockDeviceByMountPoint(const char *mountPoint, const Fstab *fstab, char *deviceName, int nameLen) in GetBlockDeviceByMountPoint() argument
318 if (fstab == NULL || mountPoint == NULL || *mountPoint == '\0' || deviceName == NULL) { in GetBlockDeviceByMountPoint()
326 if (strncpy_s(deviceName, nameLen, item->deviceName, strle in GetBlockDeviceByMountPoint()
333 GetBlockDeviceByName(const char *deviceName, const Fstab *fstab, char* miscDev, size_t size) GetBlockDeviceByName() argument
[all...]
/base/usb/usb_manager/services/native/include/
H A Dusb_right_manager.h38 /* deviceName is in VID-PID format */
39 bool HasRight(const std::string &deviceName, const std::string &bundleName,
42 int32_t RequestRight(const std::string &busDev, const std::string &deviceName, const std::string &bundleName,
44 bool AddDeviceRight(const std::string &deviceName, const std::string &tokenIdStr);
45 bool AddDeviceRight(const std::string &deviceName, const std::string &bundleName,
47 bool RemoveDeviceRight(const std::string &deviceName, const std::string &bundleName,
49 bool RemoveDeviceAllRight(const std::string &deviceName);
60 bool GetUserAgreementByDiag(const std::string &busDev, const std::string &deviceName, const std::string &bundleName,
62 bool ShowUsbDialog(const std::string &busDev, const std::string &deviceName,
95 int32_t CleanUpRightTemporaryExpired(const std::string &deviceName);
[all...]
H A Dusb_right_db_helper.h64 bool IsRecordExpired(int32_t uid, const std::string &deviceName, const std::string &bundleName,
69 int32_t AddRightRecord(const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo &info);
74 int32_t uid, const std::string &deviceName, std::vector<struct UsbRightAppInfo> &infos);
78 int32_t QueryRightRecord(int32_t uid, const std::string &deviceName, const std::string &bundleName,
87 int32_t uid, const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo &info);
90 int32_t AddOrUpdateRightRecord(int32_t uid, const std::string &deviceName, const std::string &bundleName,
94 int32_t DeleteRightRecord(int32_t uid, const std::string &deviceName,
97 int32_t DeleteDeviceRightRecord(int32_t uid, const std::string &deviceName);
107 int32_t DeleteValidPeriodRightRecord(long validPeriod, const std::string &deviceName);
113 int32_t CheckIfNeedUpdateEx(bool &isUpdate, int32_t uid, const std::string &deviceName,
[all...]
/base/startup/init/test/fuzztest/getblockdevicebymountpoint_fuzzer/
H A Dgetblockdevicebymountpoint_fuzzer.cpp39 char deviceName[100] = {0}; in FuzzGetBlockDeviceByMountPoint() local
40 int length = sizeof(deviceName); in FuzzGetBlockDeviceByMountPoint()
41 if (!GetBlockDeviceByMountPoint(str.c_str(), fstab, deviceName, length)) { in FuzzGetBlockDeviceByMountPoint()
/base/usb/usb_manager/test/native/mock/src/
H A Dusb_core_mock_test.cpp406 * @tc.desc: bool HasRight(std::string deviceName)
413 std::string deviceName = "device_80"; in HWTEST_F() local
414 bool result = usbSrv_->HasRight(deviceName); in HWTEST_F()
420 * @tc.desc: bool HasRight(std::string deviceName)
427 std::string deviceName = "device_80"; in HWTEST_F() local
428 bool result = usbSrv_->HasRight(deviceName); in HWTEST_F()
434 usbSrv_->AddRight(bundleName, deviceName); in HWTEST_F()
436 result = usbSrv_->HasRight(deviceName); in HWTEST_F()
442 * @tc.desc: bool HasRight(std::string deviceName)
449 std::string deviceName in HWTEST_F() local
470 std::string deviceName = "device_82"; HWTEST_F() local
496 std::string deviceName = "device_83"; HWTEST_F() local
518 std::string deviceName = "device_81"; HWTEST_F() local
[all...]
/base/update/sys_installer/services/module_update/include/
H A Dmodule_dm.h29 bool CreateDmDevice(const OHOS::SysInstaller::ModuleFile &moduleFile, std::string &deviceName);
30 bool RemoveDmDevice(std::string deviceName);
/base/telephony/call_manager/services/audio/src/
H A Daudio_device_manager.cpp116 void AudioDeviceManager::UpdateBluetoothDeviceName(const std::string &macAddress, const std::string &deviceName) in UpdateBluetoothDeviceName() argument
122 if (deviceName.length() > kMaxDeviceNameLen) { in UpdateBluetoothDeviceName()
123 TELEPHONY_LOGE("deviceName is too long"); in UpdateBluetoothDeviceName()
126 if (memset_s(it->deviceName, sizeof(it->deviceName), 0, sizeof(it->deviceName)) != EOK) { in UpdateBluetoothDeviceName()
130 if (memcpy_s(it->deviceName, kMaxDeviceNameLen, deviceName.c_str(), deviceName.length()) != EOK) { in UpdateBluetoothDeviceName()
131 TELEPHONY_LOGE("memcpy_s deviceName fai in UpdateBluetoothDeviceName()
142 AddAudioDeviceList(const std::string &address, AudioDeviceType deviceType, const std::string &deviceName) AddAudioDeviceList() argument
497 std::string deviceName = device.deviceName; ReportAudioDeviceChange() local
[all...]
/base/startup/init/services/init/standard/
H A Dinit_firststage.c45 if (item->next != NULL && strcmp(item->deviceName, item->next->deviceName) == 0) { in GetRequiredDevices()
64 devices[i] = strdup(item->deviceName); in GetRequiredDevices()
70 if (item->next != NULL && strcmp(item->deviceName, item->next->deviceName) == 0) { in GetRequiredDevices()
/base/print/print_fwk/frameworks/helper/scan_helper/src/
H A Dscanner_info.cpp24 deviceName=""; in ScanDeviceInfoTCP()
38 deviceName = right.deviceName; in ScanDeviceInfoTCP()
53 deviceName = right.deviceName; in operator =()
69 deviceName = deviceName_; in SetDeviceName()
119 return deviceName; in GetDeviceName()
215 deviceName = ""; in ScanDeviceInfo()
227 deviceName = right.deviceName; in ScanDeviceInfo()
[all...]
/base/usb/usb_manager/services/native/src/
H A Dusb_right_db_helper.cpp46 bool UsbRightDbHelper::IsRecordExpired(int32_t uid, const std::string &deviceName, const std::string &bundleName, in IsRecordExpired() argument
51 int32_t ret = QueryRightRecord(uid, deviceName, bundleName, tokenId, infos); in IsRecordExpired()
92 const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo &info) in AddRightRecord()
106 values.PutString("deviceName", deviceName); in AddRightRecord()
159 int32_t UsbRightDbHelper::QueryRightRecord(int32_t uid, const std::string &deviceName, const std::string &bundleName, in QueryRightRecord() argument
169 ->EqualTo("deviceName", deviceName) in QueryRightRecord()
189 int32_t uid, const std::string &deviceName, std::vector<struct UsbRightAppInfo> &infos) in QueryDeviceRightRecord()
195 rdbPredicates.BeginWrap()->EqualTo("uid", std::to_string(uid))->And()->EqualTo("deviceName", deviceNam in QueryDeviceRightRecord()
91 AddRightRecord( const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo &info) AddRightRecord() argument
188 QueryDeviceRightRecord( int32_t uid, const std::string &deviceName, std::vector<struct UsbRightAppInfo> &infos) QueryDeviceRightRecord() argument
278 UpdateRightRecord( int32_t uid, const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo &info) UpdateRightRecord() argument
373 DeleteRightRecord(int32_t uid, const std::string &deviceName, const std::string &bundleName, const std::string &tokenId) DeleteRightRecord() argument
386 DeleteDeviceRightRecord(int32_t uid, const std::string &deviceName) DeleteDeviceRightRecord() argument
451 DeleteValidPeriodRightRecord(long validPeriod, const std::string &deviceName) DeleteValidPeriodRightRecord() argument
560 AddOrUpdateRightRecord(int32_t uid, const std::string &deviceName, const std::string &bundleName, const std::string &tokenId, struct UsbRightAppInfo &info) AddOrUpdateRightRecord() argument
592 CheckIfNeedUpdateEx(bool &isUpdate, int32_t uid, const std::string &deviceName, const std::string &bundleName, const std::string &tokenId) CheckIfNeedUpdateEx() argument
626 AddOrUpdateRightRecordEx(bool isUpdate, int32_t uid, const std::string &deviceName, const std::string &bundleName, const std::string &tokenId, struct UsbRightAppInfo &info) AddOrUpdateRightRecordEx() argument
[all...]
H A Dusb_right_manager.cpp123 bool UsbRightManager::HasRight(const std::string &deviceName, const std::string &bundleName, in HasRight() argument
141 return !helper->IsRecordExpired(userId, deviceName, bundleName, tokenId, nowTime); in HasRight()
144 int32_t UsbRightManager::RequestRight(const std::string &busDev, const std::string &deviceName, in RequestRight() argument
149 if (HasRight(deviceName, bundleName, tokenId, userId)) { in RequestRight()
153 if (!GetUserAgreementByDiag(busDev, deviceName, bundleName, tokenId, userId)) { in RequestRight()
160 bool UsbRightManager::AddDeviceRight(const std::string &deviceName, const std::string &tokenIdStr) in AddDeviceRight() argument
196 ret = helper->AddOrUpdateRightRecord(uid, deviceName, hapTokenInfoRes.bundleName, tokenIdStr, info); in AddDeviceRight()
199 deviceName.c_str(), uid, ret); in AddDeviceRight()
205 bool UsbRightManager::AddDeviceRight(const std::string &deviceName, const std::string &bundleName, in AddDeviceRight() argument
231 auto ret = helper->AddOrUpdateRightRecord(userId, deviceName, bundleNam in AddDeviceRight()
240 RemoveDeviceRight(const std::string &deviceName, const std::string &bundleName, const std::string &tokenId, const int32_t &userId) RemoveDeviceRight() argument
261 RemoveDeviceAllRight(const std::string &deviceName) RemoveDeviceAllRight() argument
269 ShowUsbDialog( const std::string &busDev, const std::string &deviceName, const std::string &bundleName, const std::string &tokenId) ShowUsbDialog() argument
312 GetUserAgreementByDiag(const std::string &busDev, const std::string &deviceName, const std::string &bundleName, const std::string &tokenId, const int32_t &userId) GetUserAgreementByDiag() argument
696 CleanUpRightTemporaryExpired(const std::string &deviceName) CleanUpRightTemporaryExpired() argument
[all...]
/base/print/print_fwk/services/scan_service/src/
H A Dscan_system_data.cpp36 "discoverMode", "serialNumber", "deviceName"}; in CheckJsonObjectValue()
64 scanDeviceInfo.deviceName = object["deviceName"]; in ParseScannerListJsonV1()
184 iter->second->deviceName = scannerInfo.deviceName; in InsertScannerInfo()
201 bool ScanSystemData::UpdateScannerNameByUniqueId(const std::string &uniqueId, const std::string &deviceName) in UpdateScannerNameByUniqueId() argument
206 iter->second->deviceName = deviceName; in UpdateScannerNameByUniqueId()
223 iter->second->deviceName = scannerInfo.deviceName; in UpdateScannerInfoByUniqueId()
230 QueryScannerNameByUniqueId(const std::string &uniqueId, std::string &deviceName) QueryScannerNameByUniqueId() argument
[all...]
/base/startup/init/ueventd/
H A Dueventd_device_handler.c248 const char *partitionName, const char *deviceName) in BuildDeviceSymbolLinks()
278 } else if (!INVALIDSTRING(deviceName)) { in BuildDeviceSymbolLinks()
280 "/dev/block/platform/%s/%s", parent, deviceName) == -1) { in BuildDeviceSymbolLinks()
346 linkNum = BuildDeviceSymbolLinks(links, linkNum, parent, uevent->partitionName, uevent->deviceName); in GetBlockDeviceSymbolLinks()
397 static const char *GetDeviceName(char *sysPath, const char *deviceName) in GetDeviceName() argument
404 if (deviceName != NULL && deviceName[0] != '\0') { in GetDeviceName()
407 devName = basename((char *)deviceName); in GetDeviceName()
408 char *p = strrchr(deviceName, '/'); in GetDeviceName()
483 const char *devName = GetDeviceName(sysPath, uevent->deviceName); in HandleBlockDeviceEvent()
247 BuildDeviceSymbolLinks(char **links, int linkNum, const char *parent, const char *partitionName, const char *deviceName) BuildDeviceSymbolLinks() argument
[all...]
H A Dueventd.c148 if (uevent->deviceName == NULL) { in HandleRequiredDynamicDeviceNodes()
153 if (strcmp(uevent->deviceName, DYNAMIC_DEVICES[idx].dev + DEV_NODE_PATH_PREFIX_LEN) != 0) { in HandleRequiredDynamicDeviceNodes()
158 if (strcmp(uevent->deviceName, "mapper/control") == 0) { in HandleRequiredDynamicDeviceNodes()
179 if (strstr(devices[i], uevent->deviceName) != NULL) { in HandleRequiredBlockDeviceNodes()
180 INIT_LOGI("%s match with required partition %s success, now handle it", devices[i], uevent->deviceName); in HandleRequiredBlockDeviceNodes()
225 uevent->deviceName = event + strlen("DEVNAME="); in AddUevent()
259 uevent->deviceName, in AddUevent()
/base/startup/init/test/unittest/ueventd/
H A Dueventd_event_unittest.cpp191 if (uevent.deviceName != nullptr) { in GenerateUeventBuffer()
192 ueventdBuffer.append(std::string("DEVNAME=") + uevent.deviceName + '\000'); in GenerateUeventBuffer()
237 .deviceName = "test", in HWTEST_F()
260 EXPECT_STREQ(outEvent.deviceName, "test"); in HWTEST_F()
277 .deviceName = "test", in HWTEST_F()
320 .deviceName = "block_device_test", in HWTEST_F()
350 .deviceName = "block_device_test", in HWTEST_F()
382 .deviceName = "block_device_test", in HWTEST_F()
432 .deviceName = "extcon3-1", in HWTEST_F()
448 .deviceName in HWTEST_F()
[all...]
/base/msdp/device_status/rust/subsystem/distributed_hardware/binding/src/
H A Ddm_binding.cpp108 cDeviceInfo->deviceName = new (std::nothrow) char[sizeof(deviceInfo.deviceName)]; in CreateCDeviceInfo()
109 if (strcpy_s(cDeviceInfo->deviceName, sizeof(deviceInfo.deviceName), deviceInfo.deviceName) != EOK) { in CreateCDeviceInfo()
110 FI_HILOGE("Invalid deviceName"); in CreateCDeviceInfo()
/base/notification/distributed_notification_service/services/distributed/test/unittest/mock/
H A Dmock_distributed_kv_data_manager.cpp53 localDevice.deviceName = "<localDeviceName>"; in GetLocalDevice()
62 .deviceName = "<localDeviceName>", in GetDeviceList()
67 .deviceName = "<remoteDeviceName>", in GetDeviceList()
H A Dmock_device_manager_impl.cpp43 strcpy_s(localDevice.deviceName, sizeof(localDevice.deviceName) - 1, "<localDeviceName>"); in GetTrustedDeviceList()
48 strcpy_s(remoteDevice.deviceName, sizeof(remoteDevice.deviceName) - 1, "<remoteDeviceId>"); in GetTrustedDeviceList()
60 strcpy_s(info.deviceName, sizeof(info.deviceName) - 1, "<localDeviceName>"); in GetLocalDeviceInfo()
/base/security/access_token/services/tokensyncmanager/src/device/
H A Ddevice_info_repository.cpp136 SaveDeviceInfo(deviceInfo.deviceId, deviceInfo.deviceName, deviceInfo.deviceType); in SaveDeviceInfo()
140 const DeviceId deviceId, const std::string &deviceName, const std::string &deviceType) in SaveDeviceInfo()
143 deviceId.networkId, deviceId.universallyUniqueId, deviceId.uniqueDeviceId, deviceName, deviceType); in SaveDeviceInfo()
147 const std::string &uniqueDeviceId, const std::string &deviceName, const std::string &deviceType) in SaveDeviceInfo()
162 deviceInfo.deviceName = deviceName; in SaveDeviceInfo()
139 SaveDeviceInfo( const DeviceId deviceId, const std::string &deviceName, const std::string &deviceType) SaveDeviceInfo() argument
146 SaveDeviceInfo(const std::string &networkId, const std::string &universallyUniqueId, const std::string &uniqueDeviceId, const std::string &deviceName, const std::string &deviceType) SaveDeviceInfo() argument
H A Ddevice_info_manager.cpp51 const std::string &uniqueDeviceId, const std::string &deviceName, const std::string &deviceType) in AddDeviceInfo()
55 !DataValidator::IsDeviceIdValid(uniqueDeviceId) || deviceName.empty() || deviceType.empty()) { in AddDeviceInfo()
60 networkId, universallyUniqueId, uniqueDeviceId, deviceName, deviceType); in AddDeviceInfo()
146 LABEL, ">>> DeviceInfoRepository device name: %{public}s", info.deviceName.c_str()); in ConvertToUniqueDeviceIdOrFetch()
50 AddDeviceInfo(const std::string &networkId, const std::string &universallyUniqueId, const std::string &uniqueDeviceId, const std::string &deviceName, const std::string &deviceType) AddDeviceInfo() argument
/base/startup/init/interfaces/innerkits/fs_manager/erofs_overlay/
H A Derofs_mount_overlay.c272 if (access(item->deviceName, 0) < 0) { in GetOverlayDevice()
273 BEGET_LOGE("connot access dev [%s]", item->deviceName); in GetOverlayDevice()
279 if (GetMapperAddr(item->deviceName, &mapStart, &mapLength)) { in GetOverlayDevice()
280 BEGET_LOGE("get mapper addr failed, dev is [%s]", item->deviceName); in GetOverlayDevice()
287 int rc = ConstructLinearTarget(&dmRofsTarget, item->deviceName, 0, mapStart); in GetOverlayDevice()
289 BEGET_LOGE("fs construct erofs linear target failed, dev is [%s]", item->deviceName); in GetOverlayDevice()
294 BEGET_LOGE("fs create erofs linear device failed, dev is [%s]", item->deviceName); in GetOverlayDevice()
298 rc = ConstructLinearTarget(&dmExt4Target, item->deviceName, mapStart, mapLength); in GetOverlayDevice()
300 BEGET_LOGE("fs construct ext4 linear target failed, dev is [%s]", item->deviceName); in GetOverlayDevice()
305 BEGET_LOGE("fs create ext4 linear device failed, dev is [%s]", item->deviceName); in GetOverlayDevice()
[all...]
/base/startup/init/interfaces/innerkits/fs_manager/dm_verity/
H A Ddm_verity.c111 BEGET_LOGW("device %s not need hvb", fsItem->deviceName ? fsItem->deviceName : "none"); in HvbDmVeritySetUp()
/base/security/access_token/services/tokensyncmanager/test/unittest/
H A Dtoken_sync_service_test.cpp81 .deviceName = "remote_mock",
923 std::string deviceName; in HWTEST_F() local
928 ASSERT_EQ("", deviceName); in HWTEST_F()
930 DeviceInfoManager::GetInstance().AddDeviceInfo(networkId, universallyUniqueId, uniqueDeviceId, deviceName, in HWTEST_F()
936 deviceName = "123"; in HWTEST_F()
941 ASSERT_NE("", deviceName); in HWTEST_F()
943 DeviceInfoManager::GetInstance().AddDeviceInfo(networkId, universallyUniqueId, uniqueDeviceId, deviceName, in HWTEST_F()
964 std::string deviceName = "123"; in HWTEST_F() local
969 DeviceInfoManager::GetInstance().AddDeviceInfo(networkId, universallyUniqueId, uniqueDeviceId, deviceName, in HWTEST_F()
997 std::string deviceName in HWTEST_F() local
1043 std::string deviceName = "123"; HWTEST_F() local
1080 std::string deviceName = "123"; HWTEST_F() local
1116 std::string deviceName = "123"; HWTEST_F() local
1139 std::string deviceName = "123"; HWTEST_F() local
1209 std::string deviceName = "123"; HWTEST_F() local
[all...]

Completed in 19 milliseconds

1234