Searched refs:fd (Results 26 - 50 of 200) sorted by relevance

12345678

/system/core/adb/
H A Dservices.c42 void (*func)(int fd, void *cookie);
43 int fd; member in struct:stinfo
51 sti->func(sti->fd, sti->cookie);
59 static void dns_service(int fd, void *cookie) argument
69 writex(fd, &zero, 4);
71 writex(fd, hp->h_addr, 4);
74 adb_close(fd);
83 int fd; local
85 fd = adb_creat("/tmp/update", 0644);
86 if(fd <
110 restart_root_service(int fd, void *cookie) argument
137 restart_tcp_service(int fd, void *cookie) argument
161 restart_usb_service(int fd, void *cookie) argument
175 reboot_service(int fd, void *arg) argument
351 subproc_waiter_service(int fd, void *cookie) argument
513 wait_for_state(int fd, void* cookie) argument
564 int fd = create_service_thread(wait_for_state, sinfo); local
[all...]
H A Dsysdeps.h78 static __inline__ void close_on_exec(int fd) argument
83 extern void disable_tcp_nagle(int fd);
114 extern int adb_read(int fd, void* buf, int len);
115 extern int adb_write(int fd, const void* buf, int len);
116 extern int adb_lseek(int fd, int pos, int where);
117 extern int adb_shutdown(int fd);
118 extern int adb_close(int fd);
120 static __inline__ int unix_close(int fd) argument
122 return close(fd);
127 static __inline__ int unix_read(int fd, voi argument
134 unix_write(int fd, const void* buf, size_t len) argument
198 int fd; member in struct:fdevent
218 adb_socket_setbufsize( int fd, int bufsize ) argument
300 close_on_exec(int fd) argument
330 int fd = open( pathname, options ); local
339 adb_shutdown(int fd) argument
346 adb_close(int fd) argument
354 adb_read(int fd, void* buf, size_t len) argument
362 adb_write(int fd, const void* buf, size_t len) argument
369 adb_lseek(int fd, int pos, int where) argument
385 int fd = creat(path, mode); local
398 int fd; local
428 adb_socket_setbufsize( int fd, int bufsize ) argument
434 disable_tcp_nagle(int fd) argument
[all...]
H A Dfile_sync_service.c155 int fd; local
157 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode);
158 if(fd < 0 && errno == ENOENT) {
160 fd = adb_open_mode(path, O_WRONLY | O_CREAT | O_EXCL, mode);
162 if(fd < 0 && errno == EEXIST) {
163 fd = adb_open_mode(path, O_WRONLY, mode);
165 if(fd < 0) {
168 fd = -1;
193 if(fd < 0)
195 if(writex(fd, buffe
322 int fd, r; local
359 file_sync_service(int fd, void *cookie) argument
[all...]
H A Dfdevent.h33 typedef void (*fd_func)(int fd, unsigned events, void *userdata);
36 * Note: use FD_TIMER as 'fd' to create a fd-less object
39 fdevent *fdevent_create(int fd, fd_func func, void *arg);
48 void fdevent_install(fdevent *fde, int fd, fd_func func, void *arg);
72 int fd; member in struct:fdevent
H A Dlog_service.c31 void write_log_entry(int fd, struct logger_entry *buf);
33 void log_service(int fd, void *cookie) argument
67 write_log_entry(fd, entry);
71 unix_close(fd);
86 /* prints one log entry into the file descriptor fd */
87 void write_log_entry(int fd, struct logger_entry *buf) argument
91 writex(fd, buf, size);
H A Dtransport_local.c112 int fd = -1; local
117 fd = socket_network_client(host, adb_port, SOCK_STREAM);
120 if (fd < 0) {
121 fd = socket_loopback_client(adb_port, SOCK_STREAM);
124 if (fd >= 0) {
125 D("client: connected on remote on fd %d\n", fd);
126 close_on_exec(fd);
127 disable_tcp_nagle(fd);
129 register_socket_transport(fd, bu
156 int serverfd, fd; local
209 int fd = t->sfd; local
[all...]
/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 DLoop.cpp39 int fd; local
48 if ((fd = open(filename, O_RDWR)) < 0) {
57 rc = ioctl(fd, LOOP_GET_STATUS64, &li);
58 close(fd);
81 int fd; local
92 if ((fd = open(filename, O_RDWR)) < 0) {
101 rc = ioctl(fd, LOOP_GET_STATUS64, &li);
102 close(fd);
127 int fd; local
149 if ((fd
234 int fd; local
[all...]
/system/core/init/
H A Dutil.c86 int fd, ret; local
88 fd = socket(PF_UNIX, type, 0);
89 if (fd < 0) {
105 ret = bind(fd, (struct sockaddr *) &addr, sizeof (addr));
117 return fd;
122 close(fd);
131 int fd; local
134 fd = open(fn, O_RDONLY);
135 if(fd < 0) return 0;
137 sz = lseek(fd,
169 int fd; local
340 int fd; local
362 int fd, n; local
408 int fd; local
[all...]
H A Dbootchart.c50 unix_read(int fd, void* buff, int len) argument
53 do { ret = read(fd, buff, len); } while (ret < 0 && errno == EINTR);
58 unix_write(int fd, const void* buff, int len) argument
61 do { ret = write(fd, buff, len); } while (ret < 0 && errno == EINTR);
69 int fd = open(filename, O_RDONLY); local
70 if (fd >= 0) {
71 len = unix_read(fd, buff, buffsize-1);
72 close(fd);
82 int fd; member in struct:__anon356
90 buff->fd
161 close_on_exec(int fd) argument
188 int fd, ret, len; local
217 int fd; local
258 int fd; local
342 int fd = open( LOG_ACCT, O_WRONLY|O_CREAT|O_TRUNC,0644); local
[all...]
H A Dproperty_service.h26 void get_property_workspace(int *fd, int *sz);
H A Dkeychords.c67 int fd, ret; local
75 fd = open("/dev/keychord", O_RDWR);
76 if (fd < 0) {
80 fcntl(fd, F_SETFD, FD_CLOEXEC);
82 ret = write(fd, keychords, keychords_length);
85 close(fd);
86 fd = -1;
92 keychord_fd = fd;
/system/netd/
H A Dmain.cpp93 int dfd, fd; local
97 fd = openat(dfd, "uevent", O_WRONLY);
98 if(fd >= 0) {
99 write(fd, "add\n", 4);
100 close(fd);
112 fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY);
113 if(fd < 0)
116 d2 = fdopendir(fd);
118 close(fd);
/system/core/libcutils/
H A Dabort_socket.c26 struct asocket *asocket_init(int fd) { argument
32 flags = fcntl(fd, F_GETFL);
35 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK))
52 s->fd = fd;
65 ret = connect(s->fd, addr, addrlen);
73 pfd[0].fd = s->fd;
76 pfd[1].fd = s->abort_fd[0];
102 if (getsockopt(s->fd, SOL_SOCKE
[all...]
H A Dpartition_utils.c42 int fd, ret, wiped; local
44 if ((fd = open(source, O_RDONLY)) < 0) {
48 ret = read(fd, buf, sizeof(buf));
49 close(fd);
H A Dprocess_name.c79 int fd = open(PROCESS_NAME_DEVICE, O_RDWR); local
80 if (fd < 0)
82 write(fd, process_name, strlen(process_name) + 1);
83 close(fd);
H A Duio.c22 int readv( int fd, struct iovec* vecs, int count ) argument
31 int ret = read( fd, buf, len );
49 int writev( int fd, const struct iovec* vecs, int count ) argument
58 int ret = write( fd, buf, len );
H A Dzygote.c45 static int send_request(int fd, int sendStdio, int argc, const char **argv) argument
93 ret = sendmsg(fd, &msg, MSG_NOSIGNAL);
100 // Only send the fd's once
125 ret = sendmsg(fd, &msg, MSG_NOSIGNAL);
145 ret = recvmsg(fd, &msg, MSG_NOSIGNAL | MSG_WAITALL);
164 int fd; local
169 fd = socket_local_client(ZYGOTE_SOCKET,
172 if (fd < 0) {
181 pid = send_request(fd, 1, argc + 1, newargv);
190 err = read(fd,
218 int fd = -1; local
[all...]
H A Dsockets.c25 bool socket_peer_is_trusted(int fd) argument
30 int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);
/system/core/include/cutils/
H A Drecord_stream.h18 * A simple utility for reading fixed records out of a stream fd
31 extern RecordStream *record_stream_new(int fd, size_t maxRecordLen);
/system/extras/fatblock/
H A Dfdpool.h23 int fd; member in struct:pooled_fd
/system/core/toolbox/
H A Duptime.c60 int fd, result; local
62 fd = open("/dev/alarm", O_RDONLY);
63 if (fd < 0)
64 return fd;
66 result = ioctl(fd, ANDROID_ALARM_GET_TIME(ANDROID_ALARM_ELAPSED_REALTIME), &ts);
67 close(fd);
/system/core/liblinenoise/
H A Dlinenoise.c116 static int enableRawMode(int fd) { argument
124 if (tcgetattr(fd,&orig_termios) == -1) goto fatal;
142 if (tcsetattr(fd,TCSADRAIN,&raw) < 0) goto fatal;
151 static void disableRawMode(int fd) { argument
153 if (rawmode && tcsetattr(fd,TCSADRAIN,&orig_termios) != -1)
187 static void refreshLine(int fd, const char *prompt, char *buf, size_t len, size_t pos, size_t cols) { argument
202 if (write(fd,seq,strlen(seq)) == -1) return;
204 if (write(fd,prompt,strlen(prompt)) == -1) return;
205 if (write(fd,buf,len) == -1) return;
208 if (write(fd,se
214 linenoisePrompt(int fd, char *buf, size_t buflen, const char *prompt) argument
365 int fd = STDIN_FILENO; local
[all...]
/system/core/mkbootimg/
H A Dmkbootimg.c32 int fd; local
35 fd = open(fn, O_RDONLY);
36 if(fd < 0) return 0;
38 sz = lseek(fd, 0, SEEK_END);
41 if(lseek(fd, 0, SEEK_SET) != 0) goto oops;
46 if(read(fd, data, sz) != sz) goto oops;
47 close(fd);
53 close(fd);
77 int write_padding(int fd, unsigned pagesize, unsigned itemsize) argument
88 if(write(fd, paddin
109 int fd; local
[all...]
/system/extras/tests/framebuffer/
H A Drefresh.c33 int fd = -1; local
37 while ((fd==-1) && device_template[i]) {
39 fd = open(name, O_RDWR, 0);
42 if (fd < 0)
46 if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo) == -1)
50 if (ioctl(fd, FBIOGET_VSCREENINFO, &info) == -1)
61 if (ioctl(fd, FBIOPUT_VSCREENINFO, &info) == -1) {
67 if (ioctl(fd, FBIOGET_VSCREENINFO, &info) == -1)
81 printf( "using (fd=%d)\n"
91 fd,
[all...]

Completed in 268 milliseconds

12345678