Home
last modified time | relevance | path

Searched refs:deviceName (Results 1 – 25 of 64) sorted by relevance

123

/base/update/sys_installer/services/module_update/src/
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()
/base/usb/usb_manager/services/native/include/
Dusb_right_db_helper.h65 … int32_t uid, const std::string &deviceName, const std::string &bundleName, uint64_t expiredTime);
70 …int32_t AddRightRecord(const std::string &deviceName, const std::string &bundleName, struct UsbRig…
76 int32_t uid, const std::string &deviceName, std::vector<struct UsbRightAppInfo> &infos);
80 …int32_t QueryRightRecord(int32_t uid, const std::string &deviceName, const std::string &bundleName,
89 …int32_t uid, const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo …
93 …int32_t uid, const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo …
96 …int32_t DeleteRightRecord(int32_t uid, const std::string &deviceName, const std::string &bundleNam…
98 int32_t DeleteDeviceRightRecord(int32_t uid, const std::string &deviceName);
108 int32_t DeleteValidPeriodRightRecord(long validPeriod, const std::string &deviceName);
115 bool &isUpdate, int32_t uid, const std::string &deviceName, const std::string &bundleName);
[all …]
Dusb_right_manager.h38 bool HasRight(const std::string &deviceName, const std::string &bundleName);
40 …int32_t RequestRight(const std::string &busDev, const std::string &deviceName, const std::string &…
41 bool AddDeviceRight(const std::string &deviceName, const std::string &bundleName);
42 bool RemoveDeviceRight(const std::string &deviceName, const std::string &bundleName);
43 bool RemoveDeviceAllRight(const std::string &deviceName);
54 const std::string &busDev, const std::string &deviceName, const std::string &bundleName);
55 …bool ShowUsbDialog(const std::string &busDev, const std::string &deviceName, const std::string &bu…
84 int32_t CleanUpRightTemporaryExpired(const std::string &deviceName);
/base/startup/init/interfaces/innerkits/fs_manager/
Dfstab_mount.c379 WaitForFile(item->deviceName, WAIT_MAX_SECOND); in MountOneItem()
383 int ret = DoResizeF2fs(item->deviceName, 0, item->fsManagerFlags); in MountOneItem()
385 BEGET_LOGE("Failed to resize.f2fs dir %s , ret = %d", item->deviceName, ret); in MountOneItem()
388 ret = DoFsckF2fs(item->deviceName); in MountOneItem()
390 BEGET_LOGE("Failed to fsck.f2fs dir %s , ret = %d", item->deviceName, ret); in MountOneItem()
393 int ret = DoResizeExt(item->deviceName, 0); in MountOneItem()
395 BEGET_LOGE("Failed to resize2fs dir %s , ret = %d", item->deviceName, ret); in MountOneItem()
397 ret = DoFsckExt(item->deviceName); in MountOneItem()
399 BEGET_LOGE("Failed to e2fsck dir %s , ret = %d", item->deviceName, ret); in MountOneItem()
406 rc = Mount(item->deviceName, item->mountPoint, item->fsType, mountFlags, fsSpecificData); in MountOneItem()
[all …]
Dfstab.c97 if (item->deviceName != NULL) { in ReleaseFstabItem()
98 free(item->deviceName); in ReleaseFstabItem()
99 item->deviceName = NULL; in ReleaseFstabItem()
159 item->deviceName = strdup(p); in ParseFstabPerLine()
327 int GetBlockDeviceByMountPoint(const char *mountPoint, const Fstab *fstab, char *deviceName, int na… in GetBlockDeviceByMountPoint() argument
329 if (fstab == NULL || mountPoint == NULL || *mountPoint == '\0' || deviceName == NULL) { in GetBlockDeviceByMountPoint()
337 if (strncpy_s(deviceName, nameLen, item->deviceName, strlen(item->deviceName)) != 0) { in GetBlockDeviceByMountPoint()
344 int GetBlockDeviceByName(const char *deviceName, const Fstab *fstab, char* miscDev, size_t size) in GetBlockDeviceByName() argument
347 if (strstr(item->deviceName, deviceName) != NULL) { in GetBlockDeviceByName()
348 BEGET_CHECK_RETURN_VALUE(strcpy_s(miscDev, size, item->deviceName) != 0, 0); in GetBlockDeviceByName()
/base/usb/usb_manager/test/native/mock/src/
Dusb_core_mock_test.cpp413 std::string deviceName = "device_80"; variable
414 bool result = usbSrv_->HasRight(deviceName);
427 std::string deviceName = "device_80"; variable
428 bool result = usbSrv_->HasRight(deviceName);
434 usbSrv_->AddRight(bundleName, deviceName);
436 result = usbSrv_->HasRight(deviceName);
449 std::string deviceName = "device_80"; variable
450 bool result = usbSrv_->HasRight(deviceName);
453 int32_t ret = usbSrv_->RemoveRight(deviceName);
456 deviceName = "device_81";
[all …]
/base/startup/init/test/fuzztest/getblockdevicebymountpoint_fuzzer/
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/startup/init/interfaces/innerkits/fs_manager/dm_verity/
Ddm_verity.c111 BEGET_LOGW("device %s not need hvb", fsItem->deviceName ? fsItem->deviceName : "none"); in HvbDmVeritySetUp()
120 BEGET_LOGW("DmVeritySetUp fail for %s, ignore mount", fsItem->deviceName); in HvbDmVeritySetUp()
122 BEGET_LOGE("DmVeritySetUp fail for no fail devices %s", fsItem->deviceName); in HvbDmVeritySetUp()
/base/usb/usb_manager/services/native/src/
Dusb_right_manager.cpp117 bool UsbRightManager::HasRight(const std::string &deviceName, const std::string &bundleName) in HasRight() argument
126 …MODULE_USB_SERVICE, "info: uid=%{public}d dev=%{private}s app=%{public}s", uid, deviceName.c_str(), in HasRight()
133 return !helper->IsRecordExpired(uid, deviceName, bundleName, nowTime); in HasRight()
137 const std::string &busDev, const std::string &deviceName, const std::string &bundleName) in RequestRight() argument
140 deviceName.c_str(), bundleName.c_str()); in RequestRight()
141 if (HasRight(deviceName, bundleName)) { in RequestRight()
145 if (!GetUserAgreementByDiag(busDev, deviceName, bundleName)) { in RequestRight()
152 bool UsbRightManager::AddDeviceRight(const std::string &deviceName, const std::string &bundleName) in AddDeviceRight() argument
176 int32_t ret = helper->AddOrUpdateRightRecord(uid, deviceName, bundleName, info); in AddDeviceRight()
179 deviceName.c_str(), bundleName.c_str(), uid, ret); in AddDeviceRight()
[all …]
Dusb_right_db_helper.cpp47 int32_t uid, const std::string &deviceName, const std::string &bundleName, uint64_t expiredTime) in IsRecordExpired() argument
50 int32_t ret = QueryRightRecord(uid, deviceName, bundleName, infos); in IsRecordExpired()
91 const std::string &deviceName, const std::string &bundleName, struct UsbRightAppInfo &info) in AddRightRecord() argument
101 values.PutString("deviceName", deviceName); in AddRightRecord()
123 …info.uid, info.installTime, info.updateTime, info.requestTime, info.validPeriod, deviceName.c_str(… in AddRightRecord()
151 int32_t UsbRightDbHelper::QueryRightRecord(int32_t uid, const std::string &deviceName, const std::s… in QueryRightRecord() argument
156 deviceName.c_str(), bundleName.c_str()); in QueryRightRecord()
162 ->EqualTo("deviceName", deviceName) in QueryRightRecord()
180 int32_t uid, const std::string &deviceName, std::vector<struct UsbRightAppInfo> &infos) in QueryDeviceRightRecord() argument
183 …USB_HILOGD(MODULE_USB_SERVICE, "Query detail: uid=%{public}d dev=%{public}s", uid, deviceName.c_st… in QueryDeviceRightRecord()
[all …]
/base/startup/init/ueventd/
Dueventd_device_handler.c248 const char *partitionName, const char *deviceName) in BuildDeviceSymbolLinks() argument
278 } else if (!INVALIDSTRING(deviceName)) { in BuildDeviceSymbolLinks()
280 "/dev/block/platform/%s/%s", parent, deviceName) == -1) { in BuildDeviceSymbolLinks()
346 …inkNum = 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()
513 const char *devName = GetDeviceName(sysPath, uevent->deviceName); in HandleOtherDeviceEvent()
[all …]
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 …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/
Dueventd_event_unittest.cpp191 if (uevent.deviceName != nullptr) { in GenerateUeventBuffer()
192 ueventdBuffer.append(std::string("DEVNAME=") + uevent.deviceName + '\000'); in GenerateUeventBuffer()
237 .deviceName = "test",
260 EXPECT_STREQ(outEvent.deviceName, "test");
277 .deviceName = "test",
320 .deviceName = "block_device_test",
350 .deviceName = "block_device_test",
382 .deviceName = "block_device_test",
432 .deviceName = "extcon3-1",
448 .deviceName = "usb-dev",
[all …]
/base/notification/distributed_notification_service/services/distributed/test/unittest/mock/
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()
Dmock_distributed_kv_data_manager.cpp53 localDevice.deviceName = "<localDeviceName>"; in GetLocalDevice()
62 .deviceName = "<localDeviceName>", in GetDeviceList()
67 .deviceName = "<remoteDeviceName>", in GetDeviceList()
/base/usb/usb_manager/interfaces/kits/js/
D@ohos.usbManager.d.ts53 function hasRight(deviceName: string): boolean;
65 function requestRight(deviceName: string): Promise<boolean>;
77 function removeRight(deviceName: string): boolean;
92 function addRight(bundleName: string, deviceName: string): boolean;
/base/msdp/device_status/rust/subsystem/distributed_hardware/binding/src/
Ddm_binding.cpp107 cDeviceInfo->deviceName = new (std::nothrow) char[sizeof(deviceInfo.deviceName)]; in CreateCDeviceInfo()
108 …if (strcpy_s(cDeviceInfo->deviceName, sizeof(deviceInfo.deviceName), deviceInfo.deviceName) != EOK… in CreateCDeviceInfo()
/base/security/access_token/services/tokensyncmanager/src/device/
Ddevice_info_repository.cpp127 SaveDeviceInfo(deviceInfo.deviceId, deviceInfo.deviceName, deviceInfo.deviceType); in SaveDeviceInfo()
131 const DeviceId deviceId, const std::string &deviceName, const std::string &deviceType) in SaveDeviceInfo() argument
134 …deviceId.networkId, deviceId.universallyUniqueId, deviceId.uniqueDeviceId, deviceName, deviceType); in SaveDeviceInfo()
138 const std::string &uniqueDeviceId, const std::string &deviceName, const std::string &deviceType) in SaveDeviceInfo() argument
153 deviceInfo.deviceName = deviceName; in SaveDeviceInfo()
Ddevice_info_manager.cpp44 const std::string &uniqueDeviceId, const std::string &deviceName, const std::string &deviceType) in AddDeviceInfo() argument
48 … !DataValidator::IsDeviceIdValid(uniqueDeviceId) || deviceName.empty() || deviceType.empty()) { in AddDeviceInfo()
53 networkId, universallyUniqueId, uniqueDeviceId, deviceName, deviceType); in AddDeviceInfo()
139 LABEL, ">>> DeviceInfoRepository device name: %{public}s", info.deviceName.c_str()); in ConvertToUniqueDeviceIdOrFetch()
/base/startup/init/interfaces/innerkits/include/fs_manager/
Dfs_manager.h56 char *deviceName; // Block device name member
91 int GetBlockDeviceByMountPoint(const char *mountPoint, const Fstab *fstab, char *deviceName, int na…
92 int GetBlockDeviceByName(const char *deviceName, const Fstab *fstab, char* miscDev, size_t size);
/base/security/access_token/services/tokensyncmanager/test/unittest/token_sync_service/
Dtoken_sync_service_test.cpp82 .deviceName = "remote_mock",
1106 std::string deviceName; variable
1111 ASSERT_EQ("", deviceName);
1113 …nfoManager::GetInstance().AddDeviceInfo(networkId, universallyUniqueId, uniqueDeviceId, deviceName,
1119 deviceName = "123";
1124 ASSERT_NE("", deviceName);
1126 …nfoManager::GetInstance().AddDeviceInfo(networkId, universallyUniqueId, uniqueDeviceId, deviceName,
1147 std::string deviceName = "123"; variable
1152 …nfoManager::GetInstance().AddDeviceInfo(networkId, universallyUniqueId, uniqueDeviceId, deviceName,
1180 std::string deviceName = "123"; variable
[all …]
/base/usb/usb_manager/interfaces/innerkits/native/include/
Dusb_srv_client.h48 bool HasRight(std::string deviceName);
49 int32_t RequestRight(std::string deviceName);
50 int32_t RemoveRight(std::string deviceName);
87 int32_t AddRight(const std::string &bundleName, const std::string &deviceName);
Diusb_srv.h31 virtual bool HasRight(std::string deviceName) = 0;
32 virtual int32_t RequestRight(std::string deviceName) = 0;
33 virtual int32_t RemoveRight(std::string deviceName) = 0;
70 virtual int32_t AddRight(const std::string &bundleName, const std::string &deviceName) = 0;
/base/security/access_token/services/tokensyncmanager/test/mock/src/
Dsoft_bus_center_mock.cpp37 strcpy_s(info->deviceName, sizeof(info->deviceName), "local"); in GetLocalNodeDeviceInfo()
/base/web/webview/ohos_adapter/audio_adapter/src/
Daudio_system_manager_adapter_impl.cpp220 desc.deviceName = deviceTypeKey->second; in GetDevices()
223 desc.deviceName = audioDevice->deviceName_; in GetDevices()
318 undefinedDesc.deviceName = ADAPTER_AUDIO_UNDEFINED_DEVICE_NAME; in GetDefaultOutputDevice()
328 desc.deviceName = deviceTypeKey->second; in GetDefaultOutputDevice()
331 desc.deviceName = defaultDevice->deviceName_; in GetDefaultOutputDevice()
346 undefinedDesc.deviceName = ADAPTER_AUDIO_UNDEFINED_DEVICE_NAME; in GetDefaultInputDevice()
356 desc.deviceName = deviceTypeKey->second; in GetDefaultInputDevice()
359 desc.deviceName = defaultDevice->deviceName_; in GetDefaultInputDevice()

123