Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 11 of 11) sorted by relevance

/test/vts-testcase/security/poc/target/kernel_bluetooth/30149612/
Dpoc.cpp14 int fd; in main() local
16 fd = socket(AF_BLUETOOTH, SOCK_STREAM, 3); in main()
17 if (fd == -1) { in main()
25 if (bind(fd, &sa, 2)) { in main()
27 close(fd); in main()
32 if (getsockname(fd, &sa, &len)) { in main()
34 close(fd); in main()
51 close(fd); in main()
/test/vts-testcase/kernel/api/qtaguid/
DSocketTagUserSpace.cpp54 if (bind(sock_server.fd, (struct sockaddr *)&server, sizeof(server)) < 0) { in server_download()
59 listen(sock_server.fd, 3); in server_download()
63 if (connect(sock_client.fd, (struct sockaddr *)&server, sizeof(server)), 0) { in server_download()
67 new_socket = accept(sock_server.fd, (struct sockaddr *)&client, in server_download()
75 send(sock_client.fd, "start", 5, 0); in server_download()
86 EXPECT_GE(recv(sock_client.fd, byte_buffer, 1024, 0), 0); in server_download()
93 fd = socket(AF_INET, SOCK_STREAM, 0); in setup()
94 if (fd < 0) { in setup()
98 if (qtaguid_tagSocket(fd, tag, getuid()) < 0) { in setup()
100 close(fd); in setup()
[all …]
DSocketTagUserSpace.h29 SockInfo() : fd(-1) {} in SockInfo()
38 int fd; variable
/test/vts-testcase/security/poc/target/kernel_sound/28838221/
Dpoc.cpp24 int fd; in main() local
27 fd = open(path, O_RDWR); in main()
28 if (fd < 0) { in main()
35 ret = write(fd, buf, SIZE); in main()
42 close(fd); in main()
/test/vts-testcase/kernel/api/tun/
Dvts_kernel_tun_test.cpp62 int fd = open(tun_device_.c_str(), O_RDWR | O_NONBLOCK); in TunInit() local
63 if (fd < 0) { in TunInit()
66 if (ioctl(fd, TUNSETIFF, (void *) &ifr) < 0) { in TunInit()
67 close(fd); in TunInit()
70 return fd; in TunInit()
/test/vts-testcase/security/poc/target/kernel_wifi/31707909/
Dpoc.cpp67 int fd, i, res; in poc() local
76 fd = socket(AF_INET, SOCK_STREAM, 0); in poc()
77 if (fd < 0) { in poc()
78 printf("open socket error : fd:0x%x %s \n", fd, strerror(errno)); in poc()
96 if ((res = ioctl(fd, 0x89F0, (struct ifreq *)&arg)) < 0) { in poc()
101 close(fd); in poc()
/test/vts/hals/light/bullhead/
Dlights.c61 int fd; in write_int() local
64 fd = open(path, O_RDWR); in write_int()
65 if (fd >= 0) { in write_int()
68 int amt = write(fd, buffer, bytes); in write_int()
69 close(fd); in write_int()
82 int fd; in write_on_off() local
85 fd = open(path, O_RDWR); in write_on_off()
86 if (fd >= 0) { in write_on_off()
89 int amt = write(fd, buffer, bytes); in write_on_off()
90 close(fd); in write_on_off()
/test/vts/drivers/hal/replayer/
DVtsHidlHalReplayer.cpp40 int fd = in ReplayTrace() local
42 if (fd < 0) { in ReplayTrace()
48 google::protobuf::io::FileInputStream input(fd); in ReplayTrace()
/test/vts/utils/native/libprofiling/
DVtsProfilingInterface.cpp78 int fd = open(file_path.c_str(), O_RDWR | O_CREAT | O_EXCL, in Init() local
80 if (fd < 0) { in Init()
85 trace_output_.reset(new google::protobuf::io::FileOutputStream(fd)); in Init()
/test/vts/utils/native/trace_processor/
DVtsTraceProcessor.cpp43 int fd = in ParseBinaryTrace() local
45 if (fd < 0) { in ParseBinaryTrace()
50 google::protobuf::io::FileInputStream input(fd); in ParseBinaryTrace()
110 int fd = open(output_file.c_str(), O_WRONLY | O_CREAT | O_EXCL, in WriteProfilingMsg() local
112 if (fd < 0) { in WriteProfilingMsg()
117 google::protobuf::io::FileOutputStream output(fd); in WriteProfilingMsg()
/test/vts/compilation_tools/vtsc/test/golden/DRIVER/
DBar.driver.cpp1284 … int fd = open(file_name.c_str(), fd_val.flags() | O_CREAT, fd_val.mode()); in CallFunction() local
1285 if (fd == -1) { in CallFunction()
1289 handle->data[fd_index] = fd; in CallFunction()