Home
last modified time | relevance | path

Searched refs:fd_ (Results 1 - 25 of 58) sorted by relevance

123

/base/update/updater/services/applypatch/
H A Draw_writer.h30 RawWriter(const std::string path, uint64_t offset) : fd_(-1), path_(path), offset_(offset) {} in RawWriter()
31 RawWriter(const std::string path, uint64_t startAddr, uint64_t offset) : fd_(-1), in RawWriter()
37 if (fd_ > 0) { in ~RawWriter()
38 fsync(fd_); in ~RawWriter()
39 close(fd_); in ~RawWriter()
41 fd_ = -1; in ~RawWriter()
49 int fd_; member in Updater::RawWriter
H A Draw_writer.cpp44 if (fd_ < 0) { in Write()
45 fd_ = OpenPath(path_); in Write()
46 if (fd_ < 0) { in Write()
51 if (WriteInternal(fd_, addr, len) < 0) { in Write()
H A Dcommand.cpp36 fd_.reset(); in ~Command()
64 fd_ = std::make_unique<int>(fd); in SetFileDescriptor()
69 return *fd_; in GetFileDescriptor()
/base/msdp/device_status/utils/ipc/src/
H A Dstream_session.cpp40 : fd_(fd), pid_(pid) in StreamSession()
50 if (fd_ < 0) { in SendMsg()
51 FI_HILOGE("The fd_ is less than 0"); in SendMsg()
61 ssize_t count = send(fd_, &buf[idx], remSize, MSG_DONTWAIT | MSG_NOSIGNAL); in SendMsg()
68 FI_HILOGE("Send return failed, error:%{public}d, fd:%{public}d", errno, fd_); in SendMsg()
79 retryCount, SEND_RETRY_LIMIT, idx, bufSize, fd_); in SendMsg()
88 FI_HILOGD("Enter fd_:%{public}d", fd_); in Close()
89 if (fd_ >= 0) { in Close()
90 if (close(fd_) < in Close()
[all...]
H A Dstream_client.cpp55 if (fd_ < 0) { in SendMsg()
56 FI_HILOGE("The fd_ is less than 0"); in SendMsg()
66 ssize_t number = send(fd_, &buf[idx], remSize, MSG_DONTWAIT | MSG_NOSIGNAL); in SendMsg()
72 FI_HILOGE("Send return failed, error:%{public}d, fd:%{public}d", errno, fd_); in SendMsg()
83 retryCount, SEND_RETRY_LIMIT, idx, bufSize, fd_); in SendMsg()
/base/security/code_signature/utils/include/
H A Dfsverity_utils_helper.h56 if (fd_ > 0) { in Open()
60 fd_ = open(path, O_RDONLY); in Open()
61 if (fd_ <= 0) { in Open()
72 if (fstat(fd_, &st) != 0) { in GetFileSize()
83 if (fd_ > 0) { in ~FileReader()
84 close(fd_); in ~FileReader()
85 fd_ = -1; in ~FileReader()
98 if (fd_ <= 0) { in ReadBytes()
102 ssize_t bytesRead = read(fd_, buf, count); in ReadBytes()
112 int fd_ member in OHOS::Security::CodeSign::FsverityUtilsHelper::FileReader
[all...]
/base/hiviewdfx/hidumper/frameworks/native/src/executor/
H A Dzipfolder_output.cpp30 ZipFolderOutput::ZipFolderOutput() : fd_(FD_UNSET) in ZipFolderOutput()
39 if (fd_ > FD_UNSET) { in ~ZipFolderOutput()
40 close(fd_); in ~ZipFolderOutput()
43 fd_ = FD_UNSET; in ~ZipFolderOutput()
62 fd_= DumpUtils::FdToWrite(logDefaultPath_); in PreExecute()
65 if (fd_ < 0) { in PreExecute()
77 if ((dumpDatas_ == nullptr) || (fd_ < 0)) { in Execute()
98 if (lseek(fd_, 0, SEEK_END) == -1) { in Execute()
99 DUMPER_HILOGE(MODULE_COMMON, "lseek fail fd:%{public}d, errno:%{public}d", fd_, errno); in Execute()
102 SaveStringToFd(fd_, outst in Execute()
[all...]
H A Dfd_output.cpp24 FDOutput::FDOutput() : fd_(-1) in FDOutput()
30 if (fd_ >= 0) { in ~FDOutput()
31 close(fd_); in ~FDOutput()
33 fd_ = -1; in ~FDOutput()
46 if ((fd_ < 0) && (!path_.empty())) { in PreExecute()
47 fd_ = open(path_.c_str(), O_WRONLY | O_CREAT | O_APPEND, OPEN_ARGV); in PreExecute()
48 if (fd_ < 0) { in PreExecute()
100 if (fd_ > -1) { in WriteToFd()
101 if (dprintf(fd_, "%s", str.c_str()) == -1) { in WriteToFd()
102 DUMPER_HILOGE(MODULE_COMMON, "dprintf to fd_ faile in WriteToFd()
[all...]
H A Dzip_output.cpp23 ZipOutput::ZipOutput() : fd_(-1) in ZipOutput()
29 if (fd_ >= 0) { in ~ZipOutput()
30 close(fd_); in ~ZipOutput()
48 fd_= DumpUtils::FdToWrite(mFilePath_); in PreExecute()
49 if (fd_ < 0) { in PreExecute()
60 if (!mDumpDatas_.get() || (fd_ < 0)) { in Execute()
118 if (write(fd_, destBuffer->content, destBuffer->offset) < 0) { in CompressAndWriteToFd()
/base/hiviewdfx/hiview/framework/native/unified_collection/collector/device_client/
H A Dcollect_device_client.cpp40 CollectDeviceClient::CollectDeviceClient(): fd_(-1) in CollectDeviceClient()
45 if (fd_ > 0) { in ~CollectDeviceClient()
46 close(fd_); in ~CollectDeviceClient()
69 fd_ = GetDeviceFd(true); in Open()
70 return (fd_ > 0) ? 0 : -1; in Open()
77 int ret = ioctl(fd_, IOCTRL_COLLECT_PROC_COUNT, &processCount); in GetProcessCount()
91 int ret = ioctl(fd_, IOCTRL_COLLECT_ALL_PROC_CPU, data->entry_); in FetchProcessCpuData()
104 int ret = ioctl(fd_, IOCTRL_COLLECT_THE_PROC_CPU, data->entry_); in FetchProcessCpuData()
116 int ret = ioctl(fd_, IOCTRL_COLLECT_THREAD_COUNT, &threadCount); in GetThreadCount()
128 int ret = ioctl(fd_, IOCTRL_COLLECT_APP_THREAD_COUN in GetSelfThreadCount()
[all...]
/base/msdp/device_status/intention/ipc/socket/src/
H A Dsocket_session.cpp34 : fd_(fd), uid_(uid), pid_(pid), tokenType_(tokenType), programName_(programName) in SocketSession()
39 if ((fd_ >= 0) && (::close(fd_) != 0)) { in ~SocketSession()
40 FI_HILOGE("close(%{public}d) failed:%{public}s", fd_, ::strerror(errno)); in ~SocketSession()
65 if (fd_ < 0) { in SendMsg()
66 FI_HILOGE("The fd_ is less than 0"); in SendMsg()
77 FI_HILOGD("Send message to client (%{public}d, %{public}d)", fd_, pid_); in SendMsg()
78 ssize_t count = send(fd_, &buf[idx], remSize, MSG_DONTWAIT | MSG_NOSIGNAL); in SendMsg()
85 FI_HILOGE("Send return failed, error:%{public}d, fd:%{public}d, pid:%{public}d", errno, fd_, pid_); in SendMsg()
96 "pid:%{public}d", retryCount, SEND_RETRY_LIMIT, idx, bufSize, fd_, pid in SendMsg()
[all...]
/base/security/security_guard/interfaces/inner_api/common/include/
H A Dsecurity_config_update_info.h27 SecurityConfigUpdateInfo(int32_t fd, const std::string &name = "") : fd_(fd), fileName_(name) {}; in SecurityConfigUpdateInfo()
31 if (!parcel.WriteInt32(fd_)) {
41 if (!parcel.ReadInt32(fd_)) { in ReadFromParcel()
58 int32_t GetFd() const { return fd_; }; in GetFd()
61 int32_t fd_{};
/base/sensors/sensor/utils/ipc/src/
H A Dstream_session.cpp42 fd_(fd),
61 if (fd_ < 0) { in SendMsg()
62 SEN_HILOGE("The fd_ is less than 0"); in SendMsg()
70 auto count = send(fd_, &buf[idx], remSize, MSG_DONTWAIT | MSG_NOSIGNAL); in SendMsg()
81 SEN_HILOGE("Send return failed, error:%{public}d, fd:%{public}d", errno, fd_); in SendMsg()
96 retryCount, SEND_RETRY_LIMIT, idx, size, fd_); in SendMsg()
109 if (fd_ >= 0) { in Close()
110 close(fd_); in Close()
111 fd_ = -1; in Close()
132 oss << "fd = " << fd_ in UpdateDescript()
[all...]
H A Dstream_socket.cpp89 if (fd_ >= 0) { in Close()
90 auto rf = close(fd_); in Close()
95 fd_ = -1; in Close()
104 return fd_; in GetFd()
/base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cpp/innerkits/
H A Dfaultlog_info.cpp27 if (fd_ >= 0) { in ~FaultLogInfo()
28 close(fd_); in ~FaultLogInfo()
29 fd_ = -1; in ~FaultLogInfo()
45 return fd_; in GetRawFileDescriptor()
90 fd_ = fd; in SetRawFileDescriptor()
/base/powermgr/battery_manager/charger/src/dev/
H A Dfbdev_driver.cpp73 fd_ = fd; in Init()
79 if (fd_ < 0 || memcpy_s(buff_.vaddr, buff_.size, buf, buff_.size) != EOK) { in Flip()
82 if (ioctl(fd_, FBIOPAN_DISPLAY, &vinfo_) < 0) { in Flip()
97 FbPowerContrl(fd_, !blank); in Blank()
99 blankHook_(fd_, blank); in Blank()
121 * When fd_ isn't less than 0, then fbo->vaddr is valid and can by safely munmap. in ReleaseFb()
124 if (fd_ < 0) { in ReleaseFb()
128 close(fd_); in ReleaseFb()
129 fd_ = -1; in ReleaseFb()
H A Ddrm_driver.cpp65 drmIoctl(fd_, DRM_IOCTL_MODE_CREATE_DUMB, &create); in ModesetCreateFb()
75 int ret = drmModeAddFB2(fd_, bo->width, bo->height, DRM_FORMAT_ARGB8888, handles, pitches, offsets, &bo->fbId, 0); in ModesetCreateFb()
84 drmIoctl(fd_, DRM_IOCTL_MODE_MAP_DUMB, &map); in ModesetCreateFb()
85 bo->vaddr = static_cast<uint8_t*>(mmap(0, create.size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, map.offset)); in ModesetCreateFb()
266 res_ = GetResources(fd_); in DrmInit()
267 if (fd_ < 0 || res_ == nullptr) { in DrmInit()
274 conn_ = GetConnector(*res_, fd_, modeId); in DrmInit()
281 crtc_ = GetCrtc(*res_, fd_, *conn_); in DrmInit()
293 drmModeSetCrtc(fd_, crtc_->crtc_id, buff_.fbId, 0, 0, &conn_->connector_id, 1, &conn_->modes[modeId]); in DrmInit()
317 if (fd_ > in ModesetDestroyFb()
[all...]
/base/update/updater/services/ui/driver/
H A Ddrm_driver.cpp63 drmIoctl(fd_, DRM_IOCTL_MODE_CREATE_DUMB, &create); in ModesetCreateFb()
73 int ret = drmModeAddFB2(fd_, bo->width, bo->height, DRM_FORMAT_ARGB8888, handles, pitches, offsets, &bo->fbId, 0); in ModesetCreateFb()
81 drmIoctl(fd_, DRM_IOCTL_MODE_MAP_DUMB, &map); in ModesetCreateFb()
82 bo->vaddr = static_cast<uint8_t *>(mmap(0, create.size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, map.offset)); in ModesetCreateFb()
267 res_ = GetResources(fd_); in DrmInit()
268 if (fd_ < 0 || res_ == nullptr) { in DrmInit()
275 conn_ = GetConnector(*res_, fd_, modeId); in DrmInit()
282 crtc_ = GetCrtc(*res_, fd_, *conn_); in DrmInit()
294 drmModeSetCrtc(fd_, crtc_->crtc_id, buff_.fbId, 0, 0, &conn_->connector_id, 1, &conn_->modes[modeId]); in DrmInit()
316 if (fd_ > in ModesetDestroyFb()
[all...]
H A Dfbdev_driver.cpp109 fd_ = fd; in Init()
115 if (fd_ < 0) { in Flip()
119 if (ioctl(fd_, FBIOPAN_DISPLAY, &vinfo_) < 0) { in Flip()
134 FbPowerContrl(fd_, !blank); in Blank()
136 blankHook_(fd_, blank); in Blank()
158 * When fd_ isn't less than 0, then fbo->vaddr is valid and can by safely munmap. in ReleaseFb()
161 if (fd_ < 0) { in ReleaseFb()
165 close(fd_); in ReleaseFb()
166 fd_ = -1; in ReleaseFb()
H A Dgraphic_drv.h28 GraphicDrv() : fd_(-1) {} in GraphicDrv()
36 int fd_; member in GraphicDrv
/base/update/updater/services/flashd/daemon/
H A Dupdate_commander.cpp37 SafeCloseFile(fd_); in ~UpdateCommander()
63 fd_ = open(filePath_.c_str(), O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); in DoCommand()
64 if (fd_ < 0) { in DoCommand()
87 if (fd_ < 0) { in DoUpdate()
98 if (!Updater::Utils::WriteFully(fd_, payload, writeSize)) { in DoUpdate()
105 fsync(fd_); in DoUpdate()
106 SafeCloseFile(fd_); in DoUpdate()
/base/msdp/device_status/tools/vdev/src/
H A Dv_input_device.cpp73 fd_ = open(buf, O_RDWR | O_NONBLOCK | O_CLOEXEC); in Open()
74 if (fd_ < 0) { in Open()
96 if (fd_ >= 0) { in Close()
97 if (close(fd_) != 0) { in Close()
100 fd_ = -1; in Close()
112 return (ioctl(fd_, EVIOCGABS(abs), &absInfo) >= 0); in QueryAbsInfo()
134 ssize_t ret = ::write(fd_, &event, sizeof(struct input_event)); in SendEvent()
147 int32_t rc = ioctl(fd_, EVIOCGNAME(sizeof(buffer) - 1), &buffer); in QueryDeviceInfo()
154 rc = ioctl(fd_, EVIOCGID, &inputId_); in QueryDeviceInfo()
163 rc = ioctl(fd_, EVIOCGPHY in QueryDeviceInfo()
[all...]
/base/hiviewdfx/faultloggerd/tools/process_dump/
H A Ddfx_ring_buffer_wrapper.cpp56 DfxRingBufferWrapper::GetInstance().writeFunc_(DfxRingBufferWrapper::GetInstance().fd_, \ in LoopPrintRingBuffer()
76 writeFunc_(fd_, msg.c_str(), msg.length()); in AppendMsg()
140 if (fd_ != INVALID_FD) { in StopThread()
141 close(fd_); in StopThread()
143 fd_ = INVALID_FD; in StopThread()
148 fd_ = fd; in SetWriteBufFd()
149 if (fd_ < 0) { in SetWriteBufFd()
/base/accesscontrol/sandbox_manager/services/sandbox_manager/main/cpp/src/mac/
H A Dmac_adapter.cpp68 if (fd_ >= 0) { in ~MacAdapter()
69 close(fd_); in ~MacAdapter()
70 fd_ = -1; in ~MacAdapter()
81 fd_ = open(DEV_NODE, O_RDWR); in Init()
82 if (fd_ < 0) { in Init()
100 if (fd_ < 0) { in SetSandboxPolicy()
123 if (ioctl(fd_, SET_POLICY_CMD, &info) < 0) { in SetSandboxPolicy()
143 if (fd_ < 0) { in QuerySandboxPolicy()
165 if (ioctl(fd_, QUERY_POLICY_CMD, &info) < 0) { in QuerySandboxPolicy()
185 if (fd_ < in CheckSandboxPolicy()
[all...]
/base/powermgr/battery_manager/charger/include/dev/
H A Ddisplay_drv.h32 DisplayDrv() : fd_(-1) {} in DisplayDrv()
41 int fd_; member in OHOS::DisplayDrv

Completed in 8 milliseconds

123