Home
last modified time | relevance | path

Searched refs:devPath (Results 1 – 25 of 59) sorted by relevance

123

/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/disk/test/
H A Ddisk_info_test.cpp59 std::string devPath = data->GetDevpath(); variable
92 std::string devPath = data->GetDevpath(); variable
125 std::string devPath = data->GetDevpath(); variable
158 std::string devPath = data->GetDevpath(); variable
191 std::string devPath = data->GetDevpath(); variable
224 std::string devPath = data->GetDevpath(); variable
257 std::string devPath = data->GetDevpath(); variable
290 std::string devPath = data->GetDevpath(); variable
323 std::string devPath = data->GetDevpath(); variable
356 std::string devPath = data->GetDevpath(); variable
[all …]
H A Ddisk_info_test_mock.h26 DiskInfoTestMock(std::string sysPath, std::string devPath, dev_t device, int flags) in DiskInfoTestMock() argument
27 :DiskInfo(sysPath, devPath, device, flags) {}; in DiskInfoTestMock()
/ohos5.0/base/update/updater/services/updater_binary/
H A Dupdate_image_block.cpp141 std::string devPath; member
181 if (infos.devPath.empty()) { in GetUpdateBlockInfo()
196 transferParams->devPath = infos.devPath; in ExecuteTransferCommand()
400 int fd = open(devPath.c_str(), O_RDWR | O_LARGEFILE); in ExecReadBlockInfo()
456 if (devPath.empty() || (!ExecReadBlockInfo(devPath, context, mountTime, mountCount))) { in Execute()
496 UPDATER_LAST_WORD(devPath.substr(devPath.find_last_of("/") + 1), USCRIPT_ERROR_EXECUTE); in ExecReadShaInfo()
506 int fd = open(devPath.c_str(), O_RDWR | O_LARGEFILE); in PrintAbnormalBlockHash()
508 LOG(ERROR) << "Failed to open file " << devPath; in PrintAbnormalBlockHash()
547 int fd = open(devPath.c_str(), O_RDWR | O_LARGEFILE); in CalculateBlockSha()
643 if (devPath.empty()) { in Execute()
[all …]
H A Dupdate_image_block.h36 bool ExecReadBlockInfo(const std::string &devPath, Uscript::UScriptContext &context,
52 … int ExecReadShaInfo(Uscript::UScriptEnv &env, const std::string &devPath, const ShaInfo &shaInfo);
53 void PrintAbnormalBlockHash(const std::string &devPath, const std::string &blockPairs);
54 std::string CalculateBlockSha(const std::string &devPath, const std::string &blockPairs);
56 bool IsTargetShaDiff(const std::string &devPath, const ShaInfo &shaInfo);
H A Dupdate_image_patch.cpp72 para.devPath = GetBlockDeviceByMountPoint(para.partName); in GetParam()
73 if (para.devPath.empty()) { in GetParam()
100 std::unique_ptr<DataWriter> writer = DataWriter::CreateDataWriter(WRITE_RAW, para.devPath); in ApplyPatch()
167 if (!Utils::CopyFile(para.devPath, srcFile)) { in GetSourceFile()
168 LOG(ERROR) << "copy " << para.devPath << " to " << srcFile << " failed"; in GetSourceFile()
253 para.devPath = GetBlockDeviceByMountPoint(para.partName); in GetParam()
254 if (para.devPath.empty()) { in GetParam()
258 LOG(INFO) << "dev path: " << para.devPath; in GetParam()
265 if (PatchMapFile(para.devPath, mapBuffer) != UpdatePatch::PATCH_SUCCESS) { in CheckHash()
H A Dupdate_image_patch.h29 std::string devPath {};
54 std::string devPath {};
/ohos5.0/drivers/hdf_core/adapter/khdf/liteos/model/storage/src/mtd/
H A Dmtd_block_lite.c120 const char *devPath = NULL; in MtdBlockOsInit() local
123 HDF_LOGE("MtdBlockOsInit: register block dev(%s) fail, ret: %d!", devPath, ret); in MtdBlockOsInit()
128 devPath = "/dev/spinor"; in MtdBlockOsInit()
130 devPath = "/dev/nand"; in MtdBlockOsInit()
135 ret = register_blockdriver(devPath, GetDevNandOps(), MTD_LITE_BLOCK_DRV_MODE, mtdDevice); in MtdBlockOsInit()
137 HDF_LOGE("MtdBlockOsInit: register block dev(%s) fail, ret: %d!", devPath, ret); in MtdBlockOsInit()
140 HDF_LOGI("MtdBlockOsInit: register block dev(%s) success!", devPath); in MtdBlockOsInit()
/ohos5.0/drivers/peripheral/usb/ddk/host/src/
H A Dddk_uevent_queue.cpp47 char devPath[MAX_DEVPATH_LEN]; member
77 ret = memcpy_s(task.devPath, MAX_DEVPATH_LEN, info->devPath, strlen(info->devPath)); in DdkUeventCopyTask()
79 HDF_LOGE("%{public}s: copy devPath failed:%{public}s", __func__, info->devPath); in DdkUeventCopyTask()
109 static int32_t DdkUeventAddDevice(const char *devPath) in DdkUeventAddDevice() argument
111 const char *pos = strrchr(devPath, '/'); in DdkUeventAddDevice()
113 HDF_LOGE("%{public}s: no / in devpath:%{public}s", __func__, devPath); in DdkUeventAddDevice()
119 HDF_LOGE("%{public}s: create device failed:%{public}s", __func__, devPath); in DdkUeventAddDevice()
143 ret = DdkUeventAddDevice(info->devPath); in DdkDispatchUevent()
225 __func__, info->action, info->subSystem, info->devType, info->devPath); in DdkUeventAddTask()
H A Dddk_sysfs_device.c145 char devPath[SYSFS_PATH_LEN] = {0}; in DdkSysfsGetActiveInterfaces() local
146 int32_t num = sprintf_s(devPath, SYSFS_PATH_LEN, "%s%s/", SYSFS_DEVICES_DIR, deviceDir); in DdkSysfsGetActiveInterfaces()
152 DIR *dir = opendir(devPath); in DdkSysfsGetActiveInterfaces()
154 HDF_LOGE("%{public}s: opendir failed sysfsDevDir:%{public}s", __func__, devPath); in DdkSysfsGetActiveInterfaces()
/ohos5.0/base/startup/init/ueventd/
H A Dueventd_device_handler.c428 char *devPath = NULL; in GetDeviceBasePath() local
430 return devPath; in GetDeviceBasePath()
434 devPath = "/dev/block"; in GetDeviceBasePath()
436 devPath = "/dev/input"; in GetDeviceBasePath()
438 devPath = "/dev/dri"; in GetDeviceBasePath()
440 devPath = "/dev/graphics"; in GetDeviceBasePath()
442 devPath = "/dev/snd"; in GetDeviceBasePath()
444 devPath = "/dev/functionfs"; in GetDeviceBasePath()
446 devPath = "/dev/dma_heap"; in GetDeviceBasePath()
448 devPath = "/dev"; in GetDeviceBasePath()
[all …]
/ohos5.0/base/update/updater/services/fs_manager/
H A Dpartitions.cpp31 if (!stat (dev.devPath.c_str(), &devStat)) { in DeviceStat()
34 if (stat (dev.devPath.c_str(), &devStat) != EOK) { in DeviceStat()
125 specific->fd = open(dev.devPath.c_str(), RW_MODE); in SetBlockDeviceMode()
128 specific->fd = open(dev.devPath.c_str(), RD_MODE); in SetBlockDeviceMode()
156 std::string devPath; in ReadPartitionFromSys() local
160 devPath = "/sys/block/" + devname + "/" + type; in ReadPartitionFromSys()
163 if (devPath.length() >= DEVPATH_SIZE) { in ReadPartitionFromSys()
168 if ((f = fopen(devPath.c_str(), "r")) == nullptr) { in ReadPartitionFromSys()
211 const std::string devName = LastComponent(dev.devPath); in InitGeneric()
253 dev->devPath = path; in NewBlockDevice()
[all …]
/ohos5.0/drivers/peripheral/usb/ddk/device/src/
H A Dusb_accessory_uevent_handle.c27 const char *devPath; member
35 …HDF_LOGD("%{public}s: devPath: %{public}s, accessory: %{public}s", __func__, info->devPath, info->… in UsbAccessoryDispatchUevent()
36 if (strcmp(info->devPath, g_usbAccessoryUeventPath) != 0) { in UsbAccessoryDispatchUevent()
61 .devPath = "", in UsbAccessoryUeventHandle()
70 info.devPath = msgTmp; in UsbAccessoryUeventHandle()
H A Dusbfn_uevent_handle.c42 const char *devPath; member
50 bool isGadgetConnect = strcmp(info->devPath, g_gadgetEventPath) == 0; in UsbFnDispatchUevent()
57 bool isGadgetDisconnect = strcmp(info->devPath, g_gadgetEventPath) == 0; in UsbFnDispatchUevent()
82 .devPath = "", in UsbFnHandleUevent()
92 info.devPath = msgTmp; in UsbFnHandleUevent()
/ohos5.0/base/update/sys_installer/services/module_update/src/
H A Dmodule_dm.cpp58 char *devPath = nullptr; in CreateDmDevice() local
77 ret = FsDmCreateDevice(&devPath, devName.c_str(), &target); in CreateDmDevice()
82 ret = FsDmInitDmDev(devPath, true); in CreateDmDevice()
87 deviceName = std::string(devPath); in CreateDmDevice()
89 free(devPath); in CreateDmDevice()
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/utils/
H A Ddisk_utils.cpp87 int32_t ReadMetadata(const std::string &devPath, std::string &uuid, std::string &type, std::string … in ReadMetadata() argument
89 uuid = GetBlkidData(devPath, "UUID"); in ReadMetadata()
90 type = GetBlkidData(devPath, "TYPE"); in ReadMetadata()
91 label = GetBlkidData(devPath, "LABEL"); in ReadMetadata()
102 std::string GetBlkidData(const std::string &devPath, const std::string &type) in GetBlkidData() argument
111 devPath in GetBlkidData()
/ohos5.0/foundation/multimodalinput/input/intention/services/device_manager/src/
H A Ddevice_manager.cpp152 [devPath](const auto &item) { in FindDevice()
176 const std::string devPath { DEV_INPUT_PATH + devNode }; in AddDevice() local
179 if (stat(devPath.c_str(), &statbuf) != 0) { in AddDevice()
180 FI_HILOGD("Invalid device path:%{private}s", devPath.c_str()); in AddDevice()
184 FI_HILOGD("Not character device:%{public}s", devPath.c_str()); in AddDevice()
194 std::shared_ptr<IDevice> dev = FindDevice(devPath); in AddDevice()
196 FI_HILOGD("Already exists:%{public}s", devPath.c_str()); in AddDevice()
208 dev->SetDevPath(devPath); in AddDevice()
211 FI_HILOGE("Unable to open \'%{public}s\'", devPath.c_str()); in AddDevice()
225 const std::string devPath { DEV_INPUT_PATH + devNode }; in RemoveDevice() local
[all …]
H A Denumerator.cpp55 const std::string devPath { DEV_INPUT_PATH + devNode }; in ScanAndAddDevices() local
58 if (stat(devPath.c_str(), &statbuf) != 0) { in ScanAndAddDevices()
/ohos5.0/base/msdp/device_status/intention/services/device_manager/src/
H A Ddevice_manager.cpp153 [devPath](const auto &item) { in FindDevice()
176 const std::string devPath { DEV_INPUT_PATH + devNode }; in AddDevice() local
179 if (stat(devPath.c_str(), &statbuf) != 0) { in AddDevice()
180 FI_HILOGD("Invalid device path:%{private}s", devPath.c_str()); in AddDevice()
184 FI_HILOGD("Not character device:%{public}s", devPath.c_str()); in AddDevice()
194 std::shared_ptr<IDevice> dev = FindDevice(devPath); in AddDevice()
196 FI_HILOGD("Already exists:%{public}s", devPath.c_str()); in AddDevice()
208 dev->SetDevPath(devPath); in AddDevice()
211 FI_HILOGE("Unable to open \'%{public}s\'", devPath.c_str()); in AddDevice()
225 const std::string devPath { DEV_INPUT_PATH + devNode }; in RemoveDevice() local
[all …]
H A Denumerator.cpp55 const std::string devPath { DEV_INPUT_PATH + devNode }; in ScanAndAddDevices() local
58 if (stat(devPath.c_str(), &statbuf) != 0) { in ScanAndAddDevices()
/ohos5.0/base/startup/init/interfaces/innerkits/fs_manager/libfs_hvb/
H A Dfs_hvb.c364 static int FsHvbVerityTargetAddFecArgs(struct hvb_cert *cert, char *devPath, char **str, char *end) in FsHvbVerityTargetAddFecArgs() argument
367 FS_HVB_RETURN_ERR_IF_NULL(devPath); in FsHvbVerityTargetAddFecArgs()
373 RETURN_ERR_IF_APPEND_STRING_ERR(str, end, &devPath[0], strlen(devPath)); in FsHvbVerityTargetAddFecArgs()
409 char devPath[FS_HVB_DEVPATH_MAX_LEN] = {0}; in FsHvbConstructVerityTarget() local
423 if (snprintf_s(&devPath[0], sizeof(devPath), sizeof(devPath) - 1, "%s%s", in FsHvbConstructVerityTarget()
435 RETURN_ERR_IF_APPEND_STRING_ERR(&p, end, &devPath[0], strlen(devPath)); in FsHvbConstructVerityTarget()
437 RETURN_ERR_IF_APPEND_STRING_ERR(&p, end, &devPath[0], strlen(devPath)); in FsHvbConstructVerityTarget()
467 if (FsHvbVerityTargetAddFecArgs(cert, devPath, &p, end) != 0) { in FsHvbConstructVerityTarget()
/ohos5.0/base/update/updater/test/unittest/applypatch_test/
H A Dapplypatch_unittest.cpp62 auto devPath = GetBlockDeviceByMountPoint(partitionName); in TearDown() local
63 unlink(devPath.c_str()); in TearDown()
88 auto devPath = GetBlockDeviceByMountPoint(partitionName); variable
91 close(open(devPath.c_str(), O_CREAT | O_WRONLY | O_EXCL, 0664));
95 int fd = open(devPath.c_str(), O_RDONLY);
/ohos5.0/base/update/updater/test/unittest/updater_binary/
H A Dupdate_processor_unittest.cpp49 string devPath = GetBlockDeviceByMountPoint(UT_MISC_PARTITION_NAME); in SetUp() local
51 auto ret = Store::WriteDataToStore("/", devPath, buffer, UT_MISC_BUFFER_SIZE); in SetUp()
60 string devPath = GetBlockDeviceByMountPoint(UT_MISC_PARTITION_NAME); in TearDown() local
61 auto ret = Store::FreeStore("/", devPath); in TearDown()
/ohos5.0/drivers/peripheral/input/udriver/include/
H A Dinput_device_manager.h75 int32_t OpenInputDevice(string devPath);
76 RetStatus CloseInputDevice(string devPath);
86 void DoWithEventDeviceAdd(int32_t &epollFd, int32_t &fd, string devPath);
136 … int32_t &epollFd, int32_t &fd, string devPath, std::shared_ptr<InputDeviceInfo> &detailInfo);
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/disk/src/
H A Ddisk_manager.cpp97 std::string devPath = data->GetDevpath(); in MatchConfig() local
103 if ((config != nullptr) && config->IsMatch(devPath)) { in MatchConfig()
110 … auto diskInfo = std::make_shared<DiskInfo>(sysPath, devPath, device, static_cast<int>(flag)); in MatchConfig()
/ohos5.0/base/update/updater/services/diffpatch/patch_shared/
H A Dpatch_shared.cpp42 std::string devPath; member
91 infos.devPath = srcImage; in GetUpdateBlockInfo()
183 (void)Utils::DeleteFile(infos.devPath); in DoExecuteUpdateBlock()
295 if (!Updater::Utils::CopyFile(infos.devPath, filename)) { in CreateFixedSizeEmptyFile()
296 LOG(ERROR) << "copy " << infos.devPath << " to " << filename << " failed"; in CreateFixedSizeEmptyFile()
299 size_t fileSize = Updater::Utils::GetFileSize(infos.devPath); in CreateFixedSizeEmptyFile()

123