Searched refs:fd (Results 1 - 25 of 218) sorted by last modified time

123456789

/system/security/keystore/
H A Dkeystore.cpp201 static size_t readFully(int fd, uint8_t* data, size_t size) { argument
204 ssize_t n = TEMP_FAILURE_RETRY(read(fd, data, size));
214 static size_t writeFully(int fd, uint8_t* data, size_t size) { argument
217 ssize_t n = TEMP_FAILURE_RETRY(write(fd, data, size));
1284 int fd = open(filename, O_NOFOLLOW, O_RDONLY); local
1285 if (fd < 0) {
1290 int ret = fstat(fd, &s);
1291 close(fd);
/system/vold/
H A DDevmapper.cpp57 int fd; local
58 if ((fd = open("/dev/device-mapper", O_RDWR)) < 0) {
68 if (ioctl(fd, DM_LIST_DEVICES, io)) {
72 close(fd);
80 close(fd);
91 if (ioctl(fd, DM_DEV_STATUS, io2)) {
113 close(fd);
140 int fd; local
141 if ((fd = open("/dev/device-mapper", O_RDWR)) < 0) {
150 if (ioctl(fd, DM_DEV_STATU
174 int fd; local
271 int fd; local
[all...]
H A DExt4.cpp71 int fd; local
H A DFat.cpp155 int fd; local
H A DLoop.cpp41 int fd; local
50 if ((fd = open(filename, O_RDWR)) < 0) {
59 rc = ioctl(fd, LOOP_GET_STATUS64, &li);
60 close(fd);
83 int fd; local
94 if ((fd = open(filename, O_RDWR)) < 0) {
103 rc = ioctl(fd, LOOP_GET_STATUS64, &li);
104 close(fd);
129 int fd; local
151 if ((fd
236 int fd; local
253 int fd; local
[all...]
H A DProcess.cpp67 int fd; local
69 fd = open(buffer, O_RDONLY);
70 if (fd < 0) {
73 int length = read(fd, buffer, max - 1);
75 close(fd);
88 sprintf(path, "/proc/%d/fd", pid);
H A DVolumeManager.cpp564 int fd = open(ftsent->fts_accpath, O_NOFOLLOW); local
565 if (fd < 0) {
571 result |= fchown(fd, AID_SYSTEM, privateFile? gid : AID_SYSTEM);
574 result |= fchmod(fd, 0755);
576 result |= fchmod(fd, privateFile ? 0640 : 0644);
578 close(fd);
826 int dirfd, fd; local
901 int fd; local
1038 int fd; local
1041 if ((fd
1145 int fd = open(device, O_RDONLY); local
1223 int fd; local
1278 int fd; local
[all...]
H A DXwarp.cpp68 int fd = open(XWARP_CFG, O_WRONLY); local
70 if (fd < 0)
75 if (write(fd, tmp, strlen(tmp)+1) < 0) {
77 close(fd);
81 close(fd);
H A Dcryptfs.c89 int fd, block_size; local
93 if ((fd = open(dev, O_RDONLY)) < 0) {
98 if (lseek64(fd, 1024, SEEK_SET) < 0) {
103 if (read(fd, &sb, sizeof(sb)) != sizeof(sb)) {
108 close(fd);
118 static unsigned int get_blkdev_size(int fd) argument
122 if ( (ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) {
148 int fd; local
160 if ( (fd = open(fname, O_RDWR)) < 0) {
165 if ( (nr_sec = get_blkdev_size(fd))
247 int fd; local
389 int fd; local
466 int fd; local
572 int fd; local
888 int nr_sec, fd; local
1030 unix_read(int fd, void* buff, int len) argument
1037 unix_write(int fd, const void* buff, int len) argument
1141 int rc=-1, fd, i, ret; local
1402 int fd = open("/cache/recovery/command", O_RDWR|O_CREAT|O_TRUNC, 0600); local
[all...]
H A Dmain.cpp103 int dfd, fd; local
107 fd = openat(dfd, "uevent", O_WRONLY);
108 if(fd >= 0) {
109 write(fd, "add\n", 4);
110 close(fd);
122 fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY);
123 if(fd < 0)
126 d2 = fdopendir(fd);
128 close(fd);
/system/bluetooth/bluedroid/
H A Dbluetooth.c52 int fd; local
57 fd = open(path, O_RDONLY);
58 if (fd < 0) {
62 sz = read(fd, &buf, sizeof(buf));
63 close(fd);
76 int fd = -1; local
84 fd = open(rfkill_state_path, O_RDONLY);
85 if (fd < 0) {
90 sz = read(fd, &buffer, 1);
107 if (fd >
113 int fd = -1; local
[all...]
/system/bluetooth/brcm_patchram_plus/
H A Dbrcm_patchram_plus.c569 read_event(int fd, uchar *buffer) argument
575 while ((count = read(fd, &buffer[i], len)) < len) {
583 while ((count = read(fd, &buffer[i], len)) < len) {
744 int fd; local
756 fd = open(path, O_RDONLY);
757 if (fd < 0) {
763 sz = read(fd, bdaddr, len);
767 close(fd);
771 close(fd);
/system/bluetooth/tools/
H A Dasocket_test.c52 int fd; member in struct:thread_args
82 printf("%d ", ufds[i].fd);
127 static int _close(int fd, int type) { argument
130 printf("%d: close(%d)\n", gettid(), fd);
131 ret = close(fd);
132 printf("%d: close(%d) = %d\n", gettid(), fd, ret);
138 static int _bind(int fd, int type) { argument
167 printf("%d: bind(%d)\n", gettid(), fd);
168 ret = bind(fd, addr, len);
169 printf("%d: bind(%d) = %d\n", gettid(), fd, re
175 _listen(int fd, int type) argument
186 _read(int fd) argument
199 _accept(int fd, int type) argument
238 _connect(int fd, int type) argument
274 _write(int fd, int type) argument
286 _shutdown(int fd, int how) argument
325 int fd = (int)args; local
335 int fd = (int)args; local
342 int fd = (int)args; local
351 thread_shutdown(int fd) argument
399 int fd; local
419 int fd; local
444 int fd; local
472 int fd; local
497 int fd; local
523 int fd; local
546 int fd; local
567 int fd; local
588 int fd; local
644 int fd; local
[all...]
H A Dpipetest.c37 static int _socketpair(int fd[2]) { argument
40 ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
46 static int _close(int fd) { argument
48 printf("%d: close(%d)\n", gettid(), fd);
49 ret = close(fd);
50 printf("%d: close(%d) = %d\n", gettid(), fd, ret);
65 printf("\tfd %d ", ufds[i].fd); print_events(ufds[i].revents);
72 static int _write(int fd, char *buf, int len) { argument
75 printf("%d: write(%d)\n", gettid(), fd);
76 ret = write(fd, bu
83 _read(int fd) argument
95 _shutdown(int fd, int how) argument
106 int fd = (int)args; local
116 int fd = (int)args; local
126 int fd = (int)args; local
138 int fd = (int)args; local
145 int fd = (int)args; local
154 int fd[2]; local
172 int fd[2]; local
193 int fd[2]; local
214 int fd[2]; local
231 int fd[2]; local
252 int fd[2]; local
270 int fd[2]; local
293 int fd[2]; local
342 int fd[2]; local
360 int fd[2]; local
371 int fd[2]; local
[all...]
H A Dsock_shutdown_bug_l2cap.c27 int fd; local
36 fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
37 flags = fcntl(fd, F_GETFL);
38 fcntl(fd, F_SETFL, flags | O_NONBLOCK);
40 connect(fd, (struct sockaddr *)&addr, sizeof(addr));
43 shutdown(fd, SHUT_RDWR);
45 close(fd);
H A Dsock_shutdown_bug_rfcomm.c28 int fd; local
37 fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
38 flags = fcntl(fd, F_GETFL);
39 fcntl(fd, F_SETFL, flags | O_NONBLOCK);
41 ret = connect(fd, (struct sockaddr *)&addr, sizeof(addr));
47 shutdown(fd, SHUT_RDWR);
50 fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
52 ret = connect(fd, (struct sockaddr *)&addr, sizeof(addr));
59 shutdown(fd, SHUT_RDWR);
H A Dsock_shutdown_bug_tcp.c26 int fd; local
34 fd = socket(PF_INET, SOCK_STREAM, 0);
36 ret = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
41 ret = listen(fd, 1);
48 close(fd);
52 fd = socket(PF_INET, SOCK_STREAM, 0);
54 ret = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
H A Dsock_shutdown_test.c50 int fd; member in struct:thread_args
109 static int _close(int fd) { argument
112 printf("%d: close(%d)\n", gettid(), fd);
113 ret = close(fd);
114 printf("%d: close(%d) = %d\n", gettid(), fd, ret);
120 static int _bind(int fd, int type) { argument
149 printf("%d: bind(%d)\n", gettid(), fd);
150 ret = bind(fd, addr, len);
151 printf("%d: bind(%d) = %d\n", gettid(), fd, ret);
157 static int _listen(int fd, in argument
168 _accept(int fd, int type) argument
207 _shutdown(int fd, int how) argument
226 int fd; local
[all...]
H A Dsocktest.c51 int fd; member in struct:thread_args
81 printf("%d ", ufds[i].fd);
126 static int _close(int fd, int type) { argument
129 printf("%ld: close(%d)\n", pthread_self(), fd);
130 ret = close(fd);
131 printf("%ld: close(%d) = %d\n", pthread_self(), fd, ret);
137 static int _bind(int fd, int type) { argument
166 printf("%ld: bind(%d)\n", pthread_self(), fd);
167 ret = bind(fd, addr, len);
168 printf("%ld: bind(%d) = %d\n", pthread_self(), fd, re
174 _listen(int fd, int type) argument
185 _read(int fd) argument
198 _accept(int fd, int type) argument
251 _connect(int fd, int type) argument
288 _write(int fd, int type) argument
300 _shutdown(int fd, int how) argument
339 int fd = (int)args; local
349 int fd = (int)args; local
356 int fd = (int)args; local
365 thread_shutdown(int fd) argument
413 int fd; local
433 int fd; local
458 int fd; local
486 int fd; local
510 int fd; local
541 int fd; local
569 int fd; local
595 int fd; local
618 int fd; local
639 int fd; local
660 int fd; local
716 int fd; local
[all...]
/system/core/adb/
H A Dadb.c624 int fd; local
627 fd = adb_socket_accept(_fd, &addr, &alen);
628 if(fd < 0) return;
630 adb_socket_setbufsize(fd, CHUNK_SIZE);
632 s = create_local_socket(fd);
638 adb_close(fd);
650 int fd; local
653 fd = adb_socket_accept(_fd, &addr, &alen);
654 if(fd < 0) return;
656 s = create_local_socket(fd);
872 int fd; local
1239 int port, fd; local
[all...]
H A Dadb.h101 ** us to our fd event system. For remote asockets
105 int fd; member in struct:asocket
181 int fd; member in struct:atransport
190 /* usb handle or socket fd as needed */
228 int fd; member in struct:alistener
246 asocket *create_local_socket(int fd);
329 void framebuffer_service(int fd, void *cookie);
330 void log_service(int fd, void *cookie);
331 void remount_service(int fd, void *cookie);
488 int sendfailmsg(int fd, cons
[all...]
H A Dadb_auth_client.c155 static void adb_auth_event(int fd, unsigned events, void *data) argument
162 ret = unix_read(fd, response, sizeof(response));
207 static void adb_auth_listener(int fd, unsigned events, void *data) argument
215 s = adb_socket_accept(fd, &addr, &alen);
226 int fd, ret; local
231 fd = android_get_control_socket("adbd");
232 if (fd < 0) {
237 ret = listen(fd, 4);
239 D("Failed to listen on '%d'\n", fd);
243 fdevent_install(&listener_fde, fd, adb_auth_listene
[all...]
H A Dadb_client.c86 static int switch_socket_transport(int fd) argument
118 if(writex(fd, tmp, 4) || writex(fd, service, len)) {
120 adb_close(fd);
125 if(adb_status(fd)) {
126 adb_close(fd);
134 int adb_status(int fd) argument
139 if(readx(fd, buf, 4)) {
155 if(readx(fd, buf, 4)) {
162 if(readx(fd, __adb_erro
174 int fd; local
212 int fd = _adb_connect("host:version"); local
282 int fd = adb_connect(service); local
302 int fd = adb_connect(service); local
[all...]
H A Dadb_client.h7 ** a valid fd for interacting with that service upon success
51 int adb_status(int fd);
H A Dbackup_service.c27 int fd; member in struct:__anon272
45 adb_close(params->fd);
144 params->fd = s[0];

Completed in 88 milliseconds

123456789