/base/startup/init/interfaces/innerkits/control_fd/ |
H A D | control_fd_client.c | 172 int pfd = open("/dev/ptmx", O_RDWR | O_CLOEXEC); in InitPtyInterface() local 173 BEGET_ERROR_CHECK(pfd >= 0, return -1, "Failed open pty err=%d", errno); in InitPtyInterface() 174 BEGET_ERROR_CHECK(grantpt(pfd) >= 0, close(pfd); return -1, "Failed to call grantpt"); in InitPtyInterface() 175 BEGET_ERROR_CHECK(unlockpt(pfd) >= 0, close(pfd); return -1, "Failed to call unlockpt"); in InitPtyInterface() 177 ret = ptsname_r(pfd, ptsbuffer, sizeof(ptsbuffer)); in InitPtyInterface() 178 BEGET_ERROR_CHECK(ret >= 0, close(pfd); return -1, "Failed to get pts name err=%d", errno); in InitPtyInterface() 181 close(pfd); return -1, "Failed to chmod %s, err=%d", ptsbuffer, errno); in InitPtyInterface() 182 agent->ptyFd = pfd; in InitPtyInterface() [all...] |
/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/include/ |
H A D | fp_unwinder.h | 90 int32_t pfd[PIPE_NUM_SZ] = {-1, -1}; in UnwindSafe() local 91 if (syscall(SYS_pipe2, pfd, O_CLOEXEC | O_NONBLOCK) != 0) { in UnwindSafe() 103 if ((!ReadUptrSafe(prevFp, pfd[PIPE_WRITE], fp)) || in UnwindSafe() 104 (!ReadUptrSafe(prevFp + sizeof(uintptr_t), pfd[PIPE_WRITE], pc))) { in UnwindSafe() 112 syscall(SYS_close, pfd[PIPE_WRITE]); in UnwindSafe() 113 syscall(SYS_close, pfd[PIPE_READ]); in UnwindSafe()
|
/base/startup/init/ueventd/ |
H A D | ueventd_main.c | 50 struct pollfd pfd = {}; in PollUeventdSocketTimeout() local 51 pfd.events = POLLIN; in PollUeventdSocketTimeout() 52 pfd.fd = ueventSockFd; in PollUeventdSocketTimeout() 57 pfd.revents = 0; in PollUeventdSocketTimeout() 58 ret = poll(&pfd, 1, timeout); in PollUeventdSocketTimeout() 69 if (pfd.revents & (POLLIN | POLLERR)) { in PollUeventdSocketTimeout()
|
/base/startup/appspawn/test/unittest/app_spawn_standard_test/ |
H A D | app_spawn_beget_test.cpp | 52 int pfd = open("/dev/ptmx", O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK); in InitPtyInterface() local 53 APPSPAWN_CHECK(pfd >= 0, return, "Failed open pty err=%{public}d", errno); in InitPtyInterface() 54 APPSPAWN_CHECK(grantpt(pfd) >= 0, close(pfd); return, "Failed to call grantpt"); in InitPtyInterface() 55 APPSPAWN_CHECK(unlockpt(pfd) >= 0, close(pfd); return, "Failed to call unlockpt"); in InitPtyInterface() 57 int ret = ptsname_r(pfd, ptsbuffer, sizeof(ptsbuffer)); in InitPtyInterface() 58 APPSPAWN_CHECK(ret >= 0, close(pfd); in InitPtyInterface() 61 APPSPAWN_CHECK(chmod(ptsbuffer, S_IRWXU | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) == 0, close(pfd); in InitPtyInterface()
|
/base/security/device_auth/deps_adapter/os_adapter/impl/src/linux/ |
H A D | hc_file.c | 93 file->pfd = HcFileOpenRead(path); in HcFileOpen() 95 file->pfd = HcFileOpenWrite(path); in HcFileOpen() 97 if (file->pfd == NULL) { in HcFileOpen() 105 FILE *fp = (FILE *)file.pfd; in HcFileSize() 122 FILE *fp = (FILE *)file.pfd; in HcFileRead() 146 FILE *fp = (FILE *)file.pfd; in HcFileWrite() 177 FILE *fp = (FILE *)file.pfd; in HcFileClose()
|
/base/startup/init/services/modules/init_context/ |
H A D | init_context.c | 231 struct pollfd pfd = {}; in SubInitMain() local 232 pfd.events = POLLIN; in SubInitMain() 233 pfd.fd = readFd; in SubInitMain() 239 pfd.revents = 0; in SubInitMain() 240 int ret = poll(&pfd, 1, timeout); in SubInitMain() 248 if ((unsigned int)pfd.revents & POLLIN) { in SubInitMain()
|
/base/security/device_auth/deps_adapter/os_adapter/interfaces/liteos/ |
H A D | hc_file.h | 29 void *pfd;
member
|
/base/security/device_auth/deps_adapter/os_adapter/interfaces/linux/ |
H A D | hc_file.h | 26 void *pfd; member
|
/base/startup/appspawn/test/moduletest/ |
H A D | appspawn_test_cmder.cpp | 600 int pfd = open("/dev/ptmx", O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK); in InitPtyInterface() local 601 APPSPAWN_CHECK(pfd >= 0, return -1, "Failed open pty err=%{public}d", errno); in InitPtyInterface() 602 APPSPAWN_CHECK(grantpt(pfd) >= 0, close(pfd); return -1, "Failed to call grantpt"); in InitPtyInterface() 603 APPSPAWN_CHECK(unlockpt(pfd) >= 0, close(pfd); return -1, "Failed to call unlockpt"); in InitPtyInterface() 605 int ret = ptsname_r(pfd, ptsbuffer, sizeof(ptsbuffer)); in InitPtyInterface() 606 APPSPAWN_CHECK(ret >= 0, close(pfd); in InitPtyInterface() 609 APPSPAWN_CHECK(chmod(ptsbuffer, S_IRWXU | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) == 0, close(pfd); in InitPtyInterface() 611 ptyFd_ = pfd; in InitPtyInterface() [all...] |
/base/update/updater/services/ |
H A D | updater.cpp | 444 int pfd[DEFAULT_PIPE_NUM]; /* communication between parent and child */ in StartUpdaterProc() local 445 if (pipe(pfd) < 0) { in StartUpdaterProc() 456 int pipeRead = pfd[0]; in StartUpdaterProc() 457 int pipeWrite = pfd[1]; in StartUpdaterProc()
|