/developtools/hdc/src/common/ |
H A D | header.cpp | 61 int rc = 0; in UpdataName() local 65 rc = snprintf_s(p, HEADER_NAME_LEN, HEADER_NAME_LEN - 1, "%s", fileName.c_str()); in UpdataName() 66 if (rc < 0) { in UpdataName() 67 WRITE_LOG(LOG_WARN, "snprintf_s name failed rc:%d p_name:%s", rc, fileName.c_str()); in UpdataName() 73 rc = snprintf_s(p, HEADER_NAME_LEN, HEADER_NAME_LEN - 1, "%s", sname.c_str()); in UpdataName() 74 if (rc < 0) { in UpdataName() 75 WRITE_LOG(LOG_WARN, "snprintf_s name failed rc:%d sname:%s", rc, sname.c_str()); in UpdataName() 78 rc in UpdataName() 110 int rc = snprintf_s(p, HEADER_SIZE_LEN, HEADER_SIZE_LEN - 1, "%s", sizeStr.c_str()); UpdataSize() local 151 int rc = snprintf_s(p, HEADER_CHKSUM_LEN, HEADER_CHKSUM_LEN - 1, "%s", sizeStr.c_str()); UpdataCheckSum() local [all...] |
H A D | compress.cpp | 23 int rc = uv_fs_lstat(nullptr, &req, path.c_str(), nullptr); in AddPath() local 25 if (rc != 0) { in AddPath() 36 rc = uv_fs_scandir(nullptr, &req, path.c_str(), 0, nullptr); in AddPath() 37 if (rc < 0) { in AddPath() 79 int rc = uv_fs_lstat(nullptr, &req, localPath.c_str(), nullptr); in SaveToFile() local 80 if (rc == 0 && req.statbuf.st_mode & S_IFDIR) { in SaveToFile()
|
H A D | tcp.cpp | 119 int rc = write(fd, reinterpret_cast<const char*>(data), cnt); in WriteUvTcpFd() local 121 int rc = send(fd, reinterpret_cast<const char*>(data), cnt, 0); in WriteUvTcpFd() 123 if (rc < 0) { in WriteUvTcpFd() 138 WRITE_LOG(LOG_FATAL, "WriteUvTcpFd fd:%d send rc:%d err:%d", fd, rc, err); in WriteUvTcpFd() 143 data += rc; in WriteUvTcpFd() 144 cnt -= rc; in WriteUvTcpFd()
|
H A D | decompress.cpp | 56 int rc = uv_fs_lstat(nullptr, &req, tarPath.c_str(), nullptr); in CheckPath() local 58 if (rc != 0 || !(req.statbuf.st_mode & S_IFREG)) { in CheckPath() 67 rc = uv_fs_lstat(nullptr, &req, decPath.c_str(), nullptr); in CheckPath() 69 if (rc == 0) { in CheckPath()
|
H A D | file_descriptor.cpp | 105 int rc = epoll_wait(epfd, events, epollSize, SECONDS_TIMEOUT * TIME_BASE); in FileIOOnThread() local 113 int rc = select(thisClass->fdIO + 1, &rset, nullptr, nullptr, &timeout); in FileIOOnThread() local 115 if (rc < 0) { in FileIOOnThread() 123 } else if (rc == 0) { in FileIOOnThread() 124 WRITE_LOG(LOG_WARN, "FileIOOnThread select rc = 0, timeout."); in FileIOOnThread() 339 ssize_t rc = write(fdIO, data, cnt); in CtxFileIOWrite() local 340 if (rc < 0) { in CtxFileIOWrite() 348 WRITE_LOG(LOG_FATAL, "CtxFileIOWrite fdIO:%d rc:%d error:%d", fdIO, rc, errno); in CtxFileIOWrite() 352 data += rc; in CtxFileIOWrite() [all...] |
H A D | entry.cpp | 39 int rc = uv_fs_lstat(nullptr, &req, path.c_str(), nullptr); in Entry() local 41 if (rc == 0) { in Entry()
|
H A D | base.cpp | 570 int rc = uv_fs_chmod(nullptr, &req, path.c_str(), 0664, nullptr); in ChmodLogFile() local 571 if (rc < 0) { in ChmodLogFile() 573 uv_strerror_r(rc, buffer, BUF_SIZE_DEFAULT); in ChmodLogFile() 1405 int rc = 0; in ProgramMutex() local 1407 rc = uv_fs_ftruncate(nullptr, &req, fd, 0, nullptr); in ProgramMutex() 1408 if (rc == -1) { in ProgramMutex() 1417 rc = uv_fs_write(nullptr, &req, fd, &wbf, 1, 0, nullptr); in ProgramMutex() 1418 if (rc == -1) { in ProgramMutex() 2025 string rc(ustr); in UnicodeToUtf8() 2028 return rc; in UnicodeToUtf8() 2186 int rc = 0; CloseFd() local [all...] |
/developtools/hdc/src/register/ |
H A D | hdc_jdwp.cpp | 54 ssize_t rc = write(cfd_, buf, bufLen); in SendBuf() local 55 if (rc < 0) { in SendBuf() 85 int rc = 0; in Connect2Jdwp() local 87 rc = connect(cfd_, reinterpret_cast<struct sockaddr *>(&caddr), caddrLen); in Connect2Jdwp() 88 if (rc == 0) { in Connect2Jdwp() 95 if (rc != 0) { in Connect2Jdwp() 162 int rc = epoll_ctl(efd, EPOLL_CTL_ADD, cfd_, &ev); in ReadFromJdwp() local 163 if (rc == -1) { in ReadFromJdwp() 172 rc = epoll_wait(efd, evs, maxevents, sec * ms); in ReadFromJdwp() 173 if (rc < in ReadFromJdwp() 279 int rc = WatchParameter(PERSIST_HDC_JDWP, eventCallback, this); AddWatchHdcdJdwp() local 285 int rc = RemoveParameterWatcher(PERSIST_HDC_JDWP, nullptr, nullptr); DelWatchHdcdJdwp() local [all...] |
/developtools/hdc/hdc_rust/src/cffi/ |
H A D | utils.cpp | 98 int rc = ftruncate(fd, 0); in ProgramMutex() local 99 if (rc == -1) { in ProgramMutex() 103 rc = fwrite(&pidBuf, sizeof(char), strlen(pidBuf), fp); in ProgramMutex() 104 if (rc == -1) { in ProgramMutex() 152 int rc = ftruncate(fd, 0); in ProgramMutex() local 153 if (rc == -1) { in ProgramMutex() 157 rc = write(fd, &pidBuf, strlen(pidBuf)); in ProgramMutex() 158 if (rc == -1) { in ProgramMutex()
|
H A D | bridge.cpp | 102 int rc = write(fd, ptr, cnt);
in WriteClient() local 103 if (rc < 0) {
in WriteClient() 106 WRITE_LOG(LOG_FATAL, "WriteClient fd:%d send rc:%d err:%d", fd, rc, err);
in WriteClient() 116 ptr += rc;
in WriteClient() 117 cnt -= rc;
in WriteClient()
|
H A D | mount.cpp | 58 int rc = fclose(fp);
in FindMountDeviceByPath() local 59 if (rc != 0) {
in FindMountDeviceByPath() 60 WRITE_LOG(LOG_WARN, "fclose rc:%d error:%d", rc, errno);
in FindMountDeviceByPath()
|
H A D | oh_usb.cpp | 99 int rc = 0;
in CloseUsbFd() local 104 rc = close(fd);
in CloseUsbFd() 105 if (rc < 0) {
in CloseUsbFd() 117 return rc;
in CloseUsbFd()
|
H A D | uart.cpp | 557 int rc = 0;
local 561 rc = close(fd);
562 if (rc < 0) {
573 return rc;
|
/developtools/hdc/src/host/ |
H A D | server_for_client.cpp | 57 int rc = uv_accept(server, (uv_stream_t *)&hChannel->hWorkTCP); in AcceptClient() local 58 if (rc < 0) { in AcceptClient() 59 WRITE_LOG(LOG_FATAL, "AcceptClient uv_accept error rc:%d uid:%u", rc, uid); in AcceptClient() 108 int rc = uv_ip6_addr(channelHost.c_str(), channelPort, &addr); in SetTCPListen() local 109 if (rc != 0) { in SetTCPListen() 110 uv_strerror_r(rc, buffer, BUF_SIZE_DEFAULT); in SetTCPListen() 111 WRITE_LOG(LOG_FATAL, "uv_ip6_addr %d %s", rc, buffer); in SetTCPListen() 114 rc = uv_tcp_bind(&tcpListen, (const struct sockaddr *)&addr, 0); in SetTCPListen() 115 if (rc ! in SetTCPListen() 907 int rc = Base::SendToPollFd(hSession->ctrlFd[STREAM_MAIN], ctrlMsg.data(), ctrlMsg.size()); ChannelSendSessionCtrlMsg() local [all...] |
H A D | ext_client.cpp | 49 int rc = uv_dlopen(path.c_str(), &lib); in Init() local 50 if (rc != 0) { in Init() 156 int rc = uv_dlsym(&lib, name, (void **) &listTargets); in ListTargets() local 157 if (rc != 0) { in ListTargets() 314 int rc = uv_dlsym(&lib, name, (void **) &command); in HandleLib() local 315 if (rc != 0) { in HandleLib() 356 int rc = uv_dlopen(path.c_str(), &uvLib); in WaitForExtent() local 357 if (rc != 0) { in WaitForExtent() 430 int rc = uv_dlsym(lib, name, (void **) ®istExec); in RegistExecFunc() local 431 if (rc in RegistExecFunc() [all...] |
H A D | client.cpp | 98 int rc = uv_kill(pid, SIGKILL); in StartServer() local 99 WRITE_LOG(LOG_DEBUG, "uv_kill rc:%d", rc); in StartServer() 126 int rc = uv_kill(pid, SIGKILL); in KillServer() local 127 if (rc == 0) { in KillServer() 132 uv_strerror_r(rc, buf, size); in KillServer()
|
/developtools/profiler/host/smartperf/client/client_command/ |
H A D | smartperf_command.cpp | 169 int rc = 0; in GetItemInfo() local 197 return rc; in GetItemInfo() 211 int rc = 0; in ExecCommand() local 227 rc = GetItemInfo(spMap); in ExecCommand() 228 if (rc == -1) { in ExecCommand()
|
/developtools/hdc/src/daemon/ |
H A D | main.cpp | 259 int rc = setuid(0); in NeedDropRootPrivileges() local 260 if (rc != 0) { in NeedDropRootPrivileges() 265 WRITE_LOG(LOG_DEBUG, "Root run rc:%d", rc); in NeedDropRootPrivileges()
|
H A D | daemon_unity.cpp | 125 int rc = fclose(fp); in FindMountDeviceByPath() local 126 if (rc != 0) { in FindMountDeviceByPath() 127 WRITE_LOG(LOG_WARN, "fclose rc:%d error:%d", rc, errno); in FindMountDeviceByPath()
|
H A D | daemon_app.cpp | 255 int rc = RemoveDir(path); in RemovePath() local 256 WRITE_LOG(LOG_INFO, "RemoveDir rc:%d path:%s", rc, path.c_str()); in RemovePath()
|
/developtools/hiperf/src/ |
H A D | perf_file_writer.cpp | 79 bool rc = true; in Close() local 82 rc = false; in Close() 85 rc = false; in Close() 90 rc = false; in Close() 118 return rc; in Close()
|
H A D | utilities.cpp | 434 int rc = 0; in UncompressFile() local 435 const char *err = gzerror(fgz.get(), &rc); in UncompressFile() 436 if (rc != Z_OK) { in UncompressFile() 437 HLOGE("gzfread return %d:%s", rc, err); in UncompressFile()
|
H A D | perf_events.cpp | 1232 int rc = ioctl(item.fd.Get(), PERF_EVENT_IOC_SET_OUTPUT, mmapItem.fd); in CreateSpeMmap() local 1233 if (rc != 0) { in CreateSpeMmap() 1268 int rc = ioctl(item.fd.Get(), PERF_EVENT_IOC_SET_OUTPUT, mmapItem.fd); in CreateMmap() local 1269 if (rc != 0) { in CreateMmap()
|
/developtools/profiler/device/plugins/native_daemon/src/ |
H A D | utilities.cpp | 387 int rc = 0; in UncompressFile() local 388 const char *err = gzerror(fgz.get(), &rc); in UncompressFile() 389 if (rc != Z_OK) { in UncompressFile() 390 HLOGE("gzfread return %d:%s", rc, err); in UncompressFile()
|
/developtools/profiler/device/plugins/ftrace_plugin/tools/device_kernel_version/default/event_formatters/ |
H A D | ftrace_net_event_formatter.cpp | 106 int len = snprintf_s(buffer, BUFFER_SIZE, BUFFER_SIZE - 1, "net_dev_xmit: dev=%s skbaddr=%p len=%u rc=%d", 107 msg.name().c_str(), msg.skbaddr(), msg.len(), msg.rc());
|