/base/hiviewdfx/hidumper_lite/lite/ |
H A D | hidumper.c | 85 static void ExecAction(int fd, unsigned int cmd) in ExecAction() argument 87 if (fd < 0) { in ExecAction() 88 printf("Invalid fd: %d\n", fd); in ExecAction() 92 int ret = ioctl(fd, cmd, NULL); in ExecAction() 98 static void DumpALLInfo(int fd) in DumpALLInfo() argument 100 ExecAction(fd, HIDUMPER_DUMP_ALL); in DumpALLInfo() 103 static void DumpCpuUsage(int fd) in DumpCpuUsage() argument 105 ExecAction(fd, HIDUMPER_CPU_USAGE); in DumpCpuUsage() 108 static void DumpMemUsage(int fd) in DumpMemUsage() argument 113 DumpTaskInfo(int fd) DumpTaskInfo() argument 118 DumpMemData(int fd, struct MemDumpParam *param) DumpMemData() argument 132 InjectKernelCrash(int fd) InjectKernelCrash() argument 142 DumpFaultLog(int fd) DumpFaultLog() argument 156 ParameterMatching(int argc, const char *argv[], int fd) ParameterMatching() argument 207 int fd = -1; main() local [all...] |
/base/msdp/device_status/intention/services/intention_service/src/ |
H A D | intention_dumper.cpp | 29 void IntentionDumper::Dump(int32_t fd, const std::vector<std::string> &args) in Dump() argument 68 DumpOnce(fd, opt); in Dump() 72 void IntentionDumper::DumpOnce(int32_t fd, int32_t option) in DumpOnce() argument 76 DumpDeviceStatusSubscriber(fd); in DumpOnce() 80 DumpDeviceStatusChanges(fd); in DumpOnce() 84 DumpCurrentDeviceStatus(fd); in DumpOnce() 88 DumpDrag(fd); in DumpOnce() 92 DumpCheckDefine(fd); in DumpOnce() 96 DumpHelpInfo(fd); in DumpOnce() 102 void IntentionDumper::DumpHelpInfo(int32_t fd) cons 139 DumpCurrentDeviceStatus(int32_t fd) DumpCurrentDeviceStatus() argument 174 CheckDefineOutput(int32_t fd, const char* fmt, Ts... args) const CheckDefineOutput() argument [all...] |
/base/update/updater/services/applypatch/ |
H A D | partition_record.cpp | 40 int fd = open(realPath, O_RDONLY | O_EXCL | O_CLOEXEC | O_BINARY); in IsPartitionUpdated() local 42 if (fd < 0) { in IsPartitionUpdated() 46 if (lseek(fd, PARTITION_RECORD_START, SEEK_CUR) < 0) { in IsPartitionUpdated() 48 close(fd); in IsPartitionUpdated() 51 if (read(fd, buffer, PARTITION_UPDATER_RECORD_MSG_SIZE) != PARTITION_UPDATER_RECORD_MSG_SIZE) { in IsPartitionUpdated() 53 close(fd); in IsPartitionUpdated() 61 close(fd); in IsPartitionUpdated() 65 fsync(fd); in IsPartitionUpdated() 66 close(fd); in IsPartitionUpdated() 72 bool PartitionRecord::RecordPartitionSetOffset(int fd) in RecordPartitionSetOffset() argument 91 RecordPartitionSetInfo(const std::string &partitionName, bool updated, int fd) RecordPartitionSetInfo() argument 124 int fd = open(realPath, O_RDWR | O_EXCL | O_CLOEXEC | O_BINARY); RecordPartitionUpdateStatus() local 156 int fd = open(miscBlockDevice.c_str(), O_RDWR | O_EXCL | O_CLOEXEC | O_BINARY); ClearRecordPartitionOffset() local [all...] |
/base/security/access_token/interfaces/innerkits/token_setproc/src/ |
H A D | token_setproc.c | 39 int fd = open(TOKENID_DEVNODE, O_RDWR); in GetSelfTokenID() local 40 if (fd < 0) { in GetSelfTokenID() 43 int ret = ioctl(fd, ACCESS_TOKENID_GET_TOKENID, &token); in GetSelfTokenID() 45 close(fd); in GetSelfTokenID() 49 close(fd); in GetSelfTokenID() 55 int fd = open(TOKENID_DEVNODE, O_RDWR); in SetSelfTokenID() local 56 if (fd < 0) { in SetSelfTokenID() 59 int ret = ioctl(fd, ACCESS_TOKENID_SET_TOKENID, &tokenID); in SetSelfTokenID() 61 close(fd); in SetSelfTokenID() 65 close(fd); in SetSelfTokenID() 72 int fd = open(TOKENID_DEVNODE, O_RDWR); GetFirstCallerTokenID() local 88 int fd = open(TOKENID_DEVNODE, O_RDWR); SetFirstCallerTokenID() local [all...] |
/base/powermgr/battery_manager/services/native/src/ |
H A D | battery_dump.cpp | 34 void BatteryDump::DumpBatteryHelp(int32_t fd) in DumpBatteryHelp() argument 36 dprintf(fd, "Usage:\n"); in DumpBatteryHelp() 37 dprintf(fd, " -h: dump help\n"); in DumpBatteryHelp() 38 dprintf(fd, " -i: dump battery info\n"); in DumpBatteryHelp() 40 dprintf(fd, " -u: unplug battery charging state\n"); in DumpBatteryHelp() 41 dprintf(fd, " -r: reset battery state\n"); in DumpBatteryHelp() 42 dprintf(fd, " --capacity <capacity>: set battery capacity, the capacity range [0, 100]\n"); in DumpBatteryHelp() 43 dprintf(fd, " --uevent <uevent>: set battery uevent\n"); in DumpBatteryHelp() 47 void BatteryDump::DumpCurrentTime(int32_t fd) in DumpCurrentTime() argument 57 dprintf(fd, "Curren in DumpCurrentTime() 62 GetBatteryInfo(int32_t fd, sptr<BatteryService> &service, const std::vector<std::u16string> &args) GetBatteryInfo() argument 102 MockUnplugged(int32_t fd, sptr<BatteryService>& service, const std::vector<std::u16string>& args) MockUnplugged() argument 117 Reset(int32_t fd, sptr<BatteryService>& service, const std::vector<std::u16string>& args) Reset() argument 132 MockCapacity(int32_t fd, sptr<BatteryService> &service, const std::vector<std::u16string> &args) MockCapacity() argument 157 MockUevent(int32_t fd, sptr<BatteryService> &service, const std::vector<std::u16string> &args) MockUevent() argument [all...] |
/base/startup/init/services/param/liteos/ |
H A D | param_hal.c | 50 static int ParamFileClose(int fd)
in ParamFileClose() argument 53 return close(fd);
in ParamFileClose() 55 return UtilsFileClose(fd);
in ParamFileClose() 59 static int ParamFileRead(int fd, char* buf, unsigned int len)
in ParamFileRead() argument 62 return read(fd, buf, len);
in ParamFileRead() 64 return UtilsFileRead(fd, buf, len);
in ParamFileRead() 68 static int ParamFileWrite(int fd, const char* buf, unsigned int len)
in ParamFileWrite() argument 71 return write(fd, buf, len);
in ParamFileWrite() 73 return UtilsFileWrite(fd, buf, len);
in ParamFileWrite() 89 int fd in ParamFileStat() local 125 int fd = -1; LoadPersistParam() local 170 PersistWrite(int fd, const char *name, const char *value) PersistWrite() argument 195 int fd = ParamFileOpen(PARAM_PERSIST_SAVE_PATH, MODE_APPEND, 0); SavePersistParam() local 211 int fd = ParamFileOpen(PARAM_PERSIST_SAVE_PATH, MODE_CREATE, 0); BatchSavePersistParamBegin() local 223 int fd = (int)handle; BatchSavePersistParam() local 233 int fd = (int)handle; BatchSavePersistParamEnd() local [all...] |
/base/security/device_security_level/services/dfx/ |
H A D | dslm_hidumper.c | 190 static void PrintBanner(int fd) in PrintBanner() argument 192 dprintf(fd, " ___ ___ _ __ __ ___ _ _ __ __ ___ ___ ___ " END_LINE); in PrintBanner() 193 dprintf(fd, "| \\/ __| | | \\/ | | \\| | | | \\/ | _ \\ __| _ \\" END_LINE); in PrintBanner() 194 dprintf(fd, "| |) \\__ \\ |__| |\\/| | | |) | |_| | |\\/| | _/ __| /" END_LINE); in PrintBanner() 195 dprintf(fd, "|___/|___/____|_| |_| |___/ \\___/|_| |_|_| |___|_|_\\" END_LINE); in PrintBanner() 198 static void DumpDeviceDetails(const DslmDeviceInfo *info, int32_t fd) in DumpDeviceDetails() argument 200 dprintf(fd, "DEVICE_ID : %x" END_LINE, info->machine.machineId); in DumpDeviceDetails() 201 dprintf(fd, END_LINE); in DumpDeviceDetails() 203 dprintf(fd, "DEVICE_ONLINE_STATUS : %s" END_LINE, (info->onlineStatus != 0) ? "online" : "offline"); in DumpDeviceDetails() 204 dprintf(fd, "DEVICE_ONLINE_TIM in DumpDeviceDetails() 231 DumpHistoryCalls(const DslmDeviceInfo *info, int32_t fd) DumpHistoryCalls() argument 259 DumpOneDevice(const DslmDeviceInfo *info, int32_t fd) DumpOneDevice() argument 271 PrintAllDevices(int fd) PrintAllDevices() argument 276 PrintDefaultStatus(int fd) PrintDefaultStatus() argument 296 DslmDumper(int fd) DslmDumper() argument [all...] |
/base/startup/init/services/loopevent/socket/ |
H A D | le_socket.c | 32 static int SetSocketTimeout(int fd)
in SetSocketTimeout() argument 37 int ret = setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout));
in SetSocketTimeout() 40 ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout));
in SetSocketTimeout() 77 LE_LOGV("CreatePipeSocket listen fd: %d server:%s ", listenfd, serverAddr.sun_path);
in CreatePipeServerSocket_() 83 int fd = socket(PF_UNIX, SOCK_STREAM, 0);
in CreatePipeSocket_() local 84 LE_CHECK(fd > 0, return fd, "Failed to create socket");
in CreatePipeSocket_() 85 SetNoBlock(fd);
in CreatePipeSocket_() 88 int ret = setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
in CreatePipeSocket_() 91 ret = SetSocketTimeout(fd);
in CreatePipeSocket_() 148 int fd = socket(AF_INET, SOCK_STREAM, 0); CreateTcpSocket_() local 172 int fd = accept(serverFd, (struct sockaddr *)&clientAddr, &addrlen); AcceptPipeSocket_() local 183 int fd = accept(serverFd, (struct sockaddr *)&clientAddr, &addrlen); AcceptTcpSocket_() local 191 int fd = -1; CreateSocket() local 215 AcceptSocket(int fd, int flags) AcceptSocket() argument 232 listenSocket(int fd, int flags, const char *server) listenSocket() argument [all...] |
/base/update/updater/utils/ |
H A D | partition_utils.cpp | 32 uint64_t PartitionUtils::GetBlockDeviceSize(int fd) const in GetBlockDeviceSize() 35 return (ioctl(fd, BLKGETSIZE64, &size) == 0) ? size : 0; in GetBlockDeviceSize() 40 auto fd = open(Updater::Utils::GetPartitionRealPath(devName_).c_str(), O_RDWR); in WipeBlockPartition() local 41 if (fd < 0) { in WipeBlockPartition() 46 uint64_t size = GetBlockDeviceSize(fd); in WipeBlockPartition() 48 if (ioctl(fd, BLKSECDISCARD, &range) >= 0) { in WipeBlockPartition() 49 close(fd); in WipeBlockPartition() 55 if (ioctl(fd, BLKDISCARD, &range) < 0) { in WipeBlockPartition() 56 close(fd); in WipeBlockPartition() 61 if (!Updater::Utils::WriteFully(fd, buffe in WipeBlockPartition() [all...] |
/base/startup/init/interfaces/innerkits/fs_manager/erofs_overlay/ |
H A D | erofs_overlay_common.c | 49 int fd = open(dev, O_RDONLY | O_LARGEFILE);
in CheckIsExt4() local 50 if (fd < 0) {
in CheckIsExt4() 55 if (lseek(fd, offset + EXT4_SUPER_BLOCK_START_POSITION, SEEK_SET) < 0) {
in CheckIsExt4() 57 close(fd);
in CheckIsExt4() 61 ssize_t nbytes = read(fd, &superBlock, sizeof(superBlock));
in CheckIsExt4() 64 close(fd);
in CheckIsExt4() 71 close(fd);
in CheckIsExt4() 74 close(fd);
in CheckIsExt4() 80 int fd = open(dev, O_RDONLY | O_LARGEFILE);
in CheckIsErofs() local 81 if (fd < in CheckIsErofs() [all...] |
/base/web/webview/ohos_adapter/flowbuffer_adapter/src/ |
H A D | flowbuffer_adapter_impl.cpp | 66 void* FlowbufferAdapterImpl::CreateAshmem(size_t size, int mapType, int& fd) in CreateAshmem() argument 68 fd = AshmemCreate(nullptr, size); in CreateAshmem() 69 if (fd < 0) { in CreateAshmem() 70 WVLOG_E("Create ashmem failed, fd: %{public}d", fd); in CreateAshmem() 74 int result = AshmemSetProt(fd, PROT_READ | PROT_WRITE); in CreateAshmem() 76 close(fd); in CreateAshmem() 77 fd = -1; in CreateAshmem() 82 void *startAddr = ::mmap(nullptr, size, mapType, MAP_SHARED, fd, 0); in CreateAshmem() 84 close(fd); in CreateAshmem() 94 CreateAshmemWithFd(const int fd, size_t size, int mapType) CreateAshmemWithFd() argument [all...] |
/base/msdp/device_status/services/native/src/ |
H A D | stream_server.cpp | 43 FI_HILOGE("Close epoll fd failed, error:%{public}s, epollFd_:%{public}d", strerror(errno), epollFd_);
in UdsStop() 63 int32_t StreamServer::GetClientPid(int32_t fd) const
in GetClientPid() 65 auto it = sessionss_.find(fd);
in GetClientPid() 72 bool StreamServer::SendMsg(int32_t fd, NetPacket &pkt)
in SendMsg() argument 74 if (fd < 0) {
in SendMsg() 75 FI_HILOGE("The fd is less than 0");
in SendMsg() 78 auto ses = GetSession(fd);
in SendMsg() 80 FI_HILOGE("The fd:%{public}d not found, The message was discarded, errCode:%{public}d",
in SendMsg() 81 fd, SESSION_NOT_FOUND);
in SendMsg() 168 FI_HILOGE("Close server fd faile in CloseFd() 183 ReleaseSession(int32_t fd, epoll_event &ev) ReleaseSession() argument 204 OnPacket(int32_t fd, NetPacket &pkt) OnPacket() argument 211 OnEpollRecv(int32_t fd, epoll_event &ev) OnEpollRecv() argument 248 int32_t fd = *static_cast<int32_t*>(ev.data.ptr); OnEpollEvent() local 284 int32_t fd = GetClientFd(pid); GetSessionByPid() local 296 int32_t fd = ses->GetFd(); AddSession() local 318 DelSession(int32_t fd) DelSession() argument [all...] |
H A D | devicestatus_dumper.cpp | 55 void DeviceStatusDumper::ParseCommand(int32_t fd, const std::vector<std::string> &args, const std::vector<Data> &datas) in ParseCommand() argument 98 ExecutDump(fd, datas, opt); in ParseCommand() 102 void DeviceStatusDumper::ExecutDump(int32_t fd, const std::vector<Data> &datas, int32_t opt) in ExecutDump() argument 106 DumpHelpInfo(fd); in ExecutDump() 110 DumpDeviceStatusSubscriber(fd); in ExecutDump() 114 DumpDeviceStatusChanges(fd); in ExecutDump() 118 DumpDeviceStatusCurrentStatus(fd, datas); in ExecutDump() 123 dprintf(fd, "device coordination is not supported\n"); in ExecutDump() 129 context_->GetDragManager().Dump(fd); in ExecutDump() 133 DumpCheckDefine(fd); in ExecutDump() 144 DumpDeviceStatusSubscriber(int32_t fd) DumpDeviceStatusSubscriber() argument 164 DumpDeviceStatusChanges(int32_t fd) DumpDeviceStatusChanges() argument 188 DumpDeviceStatusCurrentStatus(int32_t fd, const std::vector<Data> &datas) const DumpDeviceStatusCurrentStatus() argument 365 DumpCheckDefine(int32_t fd) DumpCheckDefine() argument 370 ChkDefineOutput(int32_t fd) ChkDefineOutput() argument 379 CheckDefineOutput(int32_t fd, const char* fmt, Ts... args) CheckDefineOutput() argument [all...] |
/base/msdp/device_status/rust/modules/scheduler/sys/src/ |
H A D | scheduler.rs | 25 use std::os::fd::RawFd; 57 fn fd(&self) -> RawFd; in fd() functions 63 fd: RawFd, 86 fn fd(&self) -> RawFd in fd() functions 88 self.raw.fd() in fd() 172 fn fd(&self) -> RawFd in fd() functions 177 fn epoll_add(&self, fd: RawFd) -> FusionResult<()> in epoll_add() 182 u64: fd as u64, in epoll_add() 188 libc::epoll_ctl(self.epoll_fd, libc::EPOLL_CTL_ADD, fd, &mut ev) in epoll_add() 192 @public(self.epoll_fd), @public(fd), in epoll_add() 429 fn fd(&self) -> RawFd fd() functions [all...] |
/base/startup/init/interfaces/innerkits/fs_manager/libfs_dm/ |
H A D | fs_dm.c | 81 static int CreateDmDevice(int fd, const char *devName) in CreateDmDevice() argument 91 rc = ioctl(fd, DM_DEV_CREATE, &io); in CreateDmDevice() 100 static int LoadDmDeviceTable(int fd, const char *devName, in LoadDmDeviceTable() argument 157 rc = ioctl(fd, DM_TABLE_LOAD, io); in LoadDmDeviceTable() 169 static int ActiveDmDevice(int fd, const char *devName) in ActiveDmDevice() argument 181 rc = ioctl(fd, DM_DEV_SUSPEND, &io); in ActiveDmDevice() 190 int GetDmDevPath(int fd, char **dmDevPath, const char *devName) in GetDmDevPath() argument 204 rc = ioctl(fd, DM_DEV_STATUS, &io); in GetDmDevPath() 233 int fd = -1; in FsDmCreateDevice() local 235 fd in FsDmCreateDevice() 310 int fd = -1; FsDmRemoveDevice() local 339 DmGetDeviceName(int fd, const char *devName, char *outDevName, const uint64_t outDevNameLen) DmGetDeviceName() argument 385 int fd = -1; FsDmCreateLinearDevice() local [all...] |
/base/security/code_signature/interfaces/innerkits/code_sign_attr_utils/src/ |
H A D | code_sign_attr_utils.c | 34 static int XpmIoctl(int fd, uint32_t cmd, struct XpmConfig *config) in XpmIoctl() argument 36 int ret = ioctl(fd, cmd, config); in XpmIoctl() 45 static int DoSetXpmOwnerId(int fd, uint32_t idType, const char *ownerId) in DoSetXpmOwnerId() argument 63 (void)XpmIoctl(fd, XPM_SET_OWNERID, &config); in DoSetXpmOwnerId() 70 int fd = open(XPM_DEV_PATH, O_RDWR); in InitXpm() local 71 if (fd == -1) { in InitXpm() 80 (void)XpmIoctl(fd, XPM_SET_REGION, &config); in InitXpm() 84 (void)XpmIoctl(fd, XPM_SET_JITFORT_ENABLE, NULL); in InitXpm() 91 ret = DoSetXpmOwnerId(fd, idType, ownerId); in InitXpm() 95 close(fd); in InitXpm() 101 int fd = open(XPM_DEV_PATH, O_RDWR); SetXpmOwnerId() local [all...] |
/base/hiviewdfx/faultloggerd/frameworks/localhandler/ |
H A D | dfx_crash_local_handler.cpp | 60 static __attribute__((noinline)) void PrintLog(int fd, const char *format, ...) in PrintLog() argument 68 if (fd > 0) { in PrintLog() 70 (void)OHOS_TEMP_FAILURE_RETRY(write(fd, error, strlen(error))); in PrintLog() 75 if (fd > 0) { in PrintLog() 76 (void)OHOS_TEMP_FAILURE_RETRY(write(fd, buf, strlen(buf))); in PrintLog() 80 __attribute__((noinline)) void CrashLocalUnwind(const int fd, const ucontext_t* uc) in CrashLocalUnwind() argument 95 PrintLog(fd, "%s", logContext.substr(i, BUF_SZ_SMALL).c_str()); in CrashLocalUnwind() 102 int fd = RequestOutputLogFile(request); in CrashLocalHandler() local 103 CrashLocalHandlerFd(fd, request); in CrashLocalHandler() 104 if (fd > in CrashLocalHandler() 109 PrintTimeStamp(const int fd) PrintTimeStamp() argument 144 CrashLocalHandlerFd(const int fd, const struct ProcessDumpRequest* request) CrashLocalHandlerFd() argument [all...] |
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/test/unittest/common/ |
H A D | event_logger_catcher_test.cpp | 80 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); in HWTEST_F() local 81 if (fd < 0) { in HWTEST_F() 85 int res = eventLogCatcher->Catch(fd, 1); in HWTEST_F() 88 eventLogCatcher->AppendFile(fd, fileName); in HWTEST_F() 89 EXPECT_TRUE(eventLogCatcher->AppendFile(fd, "") == 0); in HWTEST_F() 90 close(fd); in HWTEST_F() 100 auto fd = open("/data/test/testFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); in HWTEST_F() local 101 if (fd < 0) { in HWTEST_F() 107 std::unique_ptr<EventLogTask> logTask = std::make_unique<EventLogTask>(fd, 1, sysEvent); in HWTEST_F() 108 logTask->AddStopReason(fd, nullpt in HWTEST_F() 129 auto fd = open("/data/test/testFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 154 auto fd = open("/data/test/testFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 210 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 230 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 250 auto fd = open("/data/test/FfrtCatcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 295 auto fd = open("/data/test/dmesgCatcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 326 auto fd = open("/data/test/dmesgCatcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 347 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 378 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 398 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 439 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 508 auto fd = open("/data/test/catcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 552 auto fd = open("/data/test/peerFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 591 auto fd = open("/data/test/shellCatcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local 642 auto fd = open("/data/test/shellCatcherFile", O_CREAT | O_WRONLY | O_TRUNC, DEFAULT_MODE); HWTEST_F() local [all...] |
/base/hiviewdfx/hiview/plugins/eventlogger/log_catcher/ |
H A D | memory_catcher.cpp | 37 int MemoryCatcher::Catch(int fd, int jsonFd) in Catch() argument 39 int originSize = GetFdSize(fd); in Catch() 45 FileUtil::SaveStringToFd(fd, pressMemInfo); in Catch() 46 FileUtil::SaveStringToFd(fd, "memTotal " + std::to_string(result.data.memTotal) + "\n"); in Catch() 47 FileUtil::SaveStringToFd(fd, "memFree " + std::to_string(result.data.memFree) + "\n"); in Catch() 48 FileUtil::SaveStringToFd(fd, "memAvailable " + std::to_string(result.data.memAvailable) + "\n"); in Catch() 49 FileUtil::SaveStringToFd(fd, "zramUsed " + std::to_string(result.data.zramUsed) + "\n"); in Catch() 50 FileUtil::SaveStringToFd(fd, "swapCached " + std::to_string(result.data.swapCached) + "\n"); in Catch() 51 FileUtil::SaveStringToFd(fd, "cached " + std::to_string(result.data.cached) + "\n"); in Catch() 53 logSize_ = GetFdSize(fd) in Catch() [all...] |
/base/hiviewdfx/hilog/frameworks/libhilog/socket/ |
H A D | dgram_socket_client.cpp | 28 int fd = GenerateFD(); in CheckSocket() local 29 if (fd < 0) { in CheckSocket() 30 return fd; in CheckSocket() 35 fdHandler.compare_exchange_strong(defaultValue, fd); in CheckSocket() 38 close(fd); in CheckSocket() 40 ret = fd; in CheckSocket() 41 SetHandler(fd); in CheckSocket()
|
/base/msdp/device_status/intention/services/intention_service/include/ |
H A D | intention_dumper.h | 34 void Dump(int32_t fd, const std::vector<std::string> &args); 37 void DumpOnce(int32_t fd, int32_t option); 38 void DumpHelpInfo(int32_t fd) const; 39 void DumpDeviceStatusSubscriber(int32_t fd) const; 40 void DumpDeviceStatusChanges(int32_t fd) const; 41 void DumpCurrentDeviceStatus(int32_t fd); 42 void DumpDrag(int32_t fd) const; 43 void DumpCheckDefine(int32_t fd) const; 46 void CheckDefineOutput(int32_t fd, const char* fmt, Ts... args) const;
|
/base/sensors/medical_sensor/services/medical_sensor/src/ |
H A D | medical_dump.cpp | 46 bool MedicalSensorDump::DumpSensorHelp(int32_t fd, const std::vector<std::u16string> &args) in DumpSensorHelp() argument 52 DumpHelp(fd); in DumpSensorHelp() 56 void MedicalSensorDump::DumpHelp(int32_t fd) in DumpHelp() argument 58 dprintf(fd, "Usage:\n"); in DumpHelp() 59 dprintf(fd, " -h: dump help\n"); in DumpHelp() 60 dprintf(fd, " -l: dump the sensor list\n"); in DumpHelp() 61 dprintf(fd, " -c: dump the sensor data channel info\n"); in DumpHelp() 62 dprintf(fd, " -o: dump the opening sensors\n"); in DumpHelp() 63 dprintf(fd, " -d: dump the last 10 packages sensor data\n"); in DumpHelp() 66 bool MedicalSensorDump::DumpSensorList(int32_t fd, in DumpSensorList() argument 87 DumpSensorChannel(int32_t fd, ClientInfo &clientInfo, const std::vector<std::u16string> &args) DumpSensorChannel() argument 113 DumpOpeningSensor(int32_t fd, const std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo, const std::vector<std::u16string> &args) DumpOpeningSensor() argument 131 DumpSensorData(int32_t fd, ClientInfo &clientInfo, const std::vector<std::u16string> &args) DumpSensorData() argument 160 DumpCurrentTime(int32_t fd) DumpCurrentTime() argument 195 Dump(int32_t fd, const std::vector<std::u16string> &args, std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo) Dump() argument [all...] |
/base/startup/hvb/test/ |
H A D | hvb_main.c | 39 int fd; in hvb_read_partition() local 44 fd = open(partition, O_RDONLY); in hvb_read_partition() 45 if (fd == -1) { in hvb_read_partition() 53 if (ioctl(fd, BLKGETSIZE64, &partition_size) != 0) { in hvb_read_partition() 61 where = lseek(fd, offset, SEEK_SET); in hvb_read_partition() 72 num_read = read(fd, buffer, num_bytes); in hvb_read_partition() 84 if (fd != -1) { in hvb_read_partition() 85 if (close(fd) != 0) { in hvb_read_partition() 99 int fd; in hvb_write_partition() local 104 fd in hvb_write_partition() 174 int fd; hvb_get_partiton_size() local [all...] |
/base/sensors/miscdevice/test/unittest/vibrator/capi/ |
H A D | vibrator_test.cpp | 79 fd = open(path.c_str(), O_RDONLY); in FileDescriptor() 83 close(fd); in ~FileDescriptor() 85 int32_t fd; member 157 MISC_HILOGD("Test fd:%{public}d", fileDescriptor.fd); in HWTEST_F() 159 if (fstat64(fileDescriptor.fd, &statbuf) == 0) { in HWTEST_F() 161 .fd = fileDescriptor.fd, in HWTEST_F() 180 MISC_HILOGD("Test fd:%{public}d", fileDescriptor.fd); in HWTEST_F() [all...] |
/base/hiviewdfx/faultloggerd/interfaces/innerkits/signal_handler/ |
H A D | dfx_signalhandler_exception.c | 52 int fd = -1; in ConnectSocket() local 53 if ((fd = syscall(SYS_socket, AF_LOCAL, SOCK_STREAM, 0)) < 0) { in ConnectSocket() 65 if (OHOS_TEMP_FAILURE_RETRY(syscall(SYS_setsockopt, fd, SOL_SOCKET, SO_RCVTIMEO, in ConnectSocket() 68 syscall(SYS_close, fd); in ConnectSocket() 69 fd = -1; in ConnectSocket() 78 int connected = OHOS_TEMP_FAILURE_RETRY(connect(fd, (struct sockaddr*)(&server), len)); in ConnectSocket() 81 syscall(SYS_close, fd); in ConnectSocket() 82 fd = -1; in ConnectSocket() 86 return fd; in ConnectSocket() 89 static bool CheckReadResp(int fd) in CheckReadResp() argument 108 int fd = ConnectSocket(FAULTLOGGERD_SOCKET_NAME, TIME_OUT); // connect timeout ReportException() local [all...] |