Searched defs:fd (Results 151 - 175 of 208) sorted by relevance

123456789

/system/netd/server/
H A DNetdConstants.cpp116 int fd = open(path, O_WRONLY); local
117 if (fd < 0) {
122 if (write(fd, value, size) != size) {
124 close(fd);
127 close(fd);
133 int fd = open(path, O_RDONLY); local
136 if (fd < 0) {
141 size = read(fd, buf, *sizep);
144 close(fd);
148 close(fd);
[all...]
H A DTetherController.cpp69 int fd = open("/proc/sys/net/ipv4/ip_forward", O_WRONLY); local
70 if (fd < 0) {
75 if (write(fd, (enable ? "1" : "0"), 1) != 1) {
77 close(fd);
80 close(fd);
85 int fd = open("/proc/sys/net/ipv4/ip_forward", O_RDONLY); local
87 if (fd < 0) {
93 if (read(fd, &enabled, 1) != 1) {
95 close(fd);
99 close(fd);
[all...]
/system/core/adb/
H A Dfdevent.c65 fprintf(stderr,"FDE #%03d %c%c%c %s\n", fde->fd,
86 static void fdevent_subproc_event_func(int fd, unsigned events, void *userdata);
126 if(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fde->fd, &ev)) {
146 epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fde->fd, &ev);
172 if(epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fde->fd, &ev)) {
177 if(epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fde->fd, &ev)) {
187 if(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fde->fd, &ev)) {
253 if(fde->fd >= select_n) {
254 select_n = fde->fd + 1;
262 FD_CLR(fde->fd,
508 fdevent_subproc_event_func(int fd, unsigned ev, void *userdata) argument
566 fdevent_create(int fd, fd_func func, void *arg) argument
584 fdevent_install(fdevent *fde, int fd, fd_func func, void *arg) argument
[all...]
H A Djdwp_service.c317 int fd = proc->out_fds[0]; local
340 ((int*)CMSG_DATA(cmsg))[0] = fd;
360 adb_close(fd);
371 fd, proc->pid);
H A Dsockets.c37 int sendfailmsg(int fd, const char *reason) argument
44 if(writex(fd, buf, 8)) return -1;
45 return writex(fd, reason, len);
59 ** write to their fd.
162 int r = adb_write(s->fd, p->ptr, p->len);
218 D("LS(%d): destroying fde.fd=%d\n", s->id, s->fde.fd);
220 /* IMPORTANT: the remove closes the fd
243 D("entered. LS(%d) fd=%d\n", s->id, s->fd);
283 local_socket_event_func(int fd, unsigned ev, void *_s) argument
413 create_local_socket(int fd) argument
434 int fd; local
[all...]
H A Dadb.h102 ** us to our fd event system. For remote asockets
106 int fd; member in struct:asocket
185 int fd; member in struct:atransport
194 /* usb handle or socket fd as needed */
232 int fd; member in struct:alistener
250 asocket *create_local_socket(int fd);
330 void framebuffer_service(int fd, void *cookie);
331 void remount_service(int fd, void *cookie);
332 void disable_verity_service(int fd, void* cookie);
415 int sendfailmsg(int fd, cons
[all...]
H A Dfile_sync_client.c82 void sync_quit(int fd) argument
89 writex(fd, &msg.req, sizeof(msg.req));
94 int sync_ls(int fd, const char *path, sync_ls_cb func, void *cookie) argument
106 if(writex(fd, &msg.req, sizeof(msg.req)) ||
107 writex(fd, path, len)) {
112 if(readx(fd, &msg.dent, sizeof(msg.dent))) break;
119 if(readx(fd, buf, len)) break;
129 adb_close(fd);
143 int sync_readtime(int fd, const char *path, unsigned int *timestamp, argument
152 if(writex(fd,
170 sync_start_readtime(int fd, const char *path) argument
186 sync_finish_readtime(int fd, unsigned int *timestamp, unsigned int *mode, unsigned int *size) argument
204 sync_readmode(int fd, const char *path, unsigned *mode) argument
229 write_data_file(int fd, const char *path, syncsendbuf *sbuf, int show_progress) argument
282 write_data_buffer(int fd, char* file_buffer, int size, syncsendbuf *sbuf, int show_progress) argument
313 write_data_link(int fd, const char *path, syncsendbuf *sbuf) argument
337 sync_send(int fd, const char *lpath, const char *rpath, unsigned mtime, mode_t mode, int show_progress) argument
424 sync_recv(int fd, const char *rpath, const char *lpath, int show_progress) argument
551 int fd = adb_connect("sync:"); local
685 copy_local_dir_remote(int fd, const char *lpath, const char *rpath, int checktimestamps, int listonly) argument
758 int fd; local
896 copy_remote_dir_local(int fd, const char *rpath, const char *lpath, int copy_attrs) argument
957 int fd; local
1021 int fd = adb_connect("sync:"); local
[all...]
H A Dsysdeps.h80 static __inline__ void close_on_exec(int fd) argument
85 extern void disable_tcp_nagle(int fd);
116 extern int adb_read(int fd, void* buf, int len);
117 extern int adb_write(int fd, const void* buf, int len);
118 extern int adb_lseek(int fd, int pos, int where);
119 extern int adb_shutdown(int fd);
120 extern int adb_close(int fd);
122 static __inline__ int unix_close(int fd) argument
124 return close(fd);
129 static __inline__ int unix_read(int fd, voi argument
136 unix_write(int fd, const void* buf, size_t len) argument
202 int fd; member in struct:fdevent
222 adb_socket_setbufsize( int fd, int bufsize ) argument
322 close_on_exec(int fd) argument
352 int fd = TEMP_FAILURE_RETRY( open( pathname, options ) ); local
361 adb_shutdown(int fd) argument
368 adb_close(int fd) argument
376 adb_read(int fd, void* buf, size_t len) argument
384 adb_write(int fd, const void* buf, size_t len) argument
391 adb_lseek(int fd, int pos, int where) argument
407 int fd = TEMP_FAILURE_RETRY( creat( path, mode ) ); local
420 int fd; local
450 adb_socket_setbufsize( int fd, int bufsize ) argument
456 disable_tcp_nagle(int fd) argument
[all...]
H A Dusb_linux.c139 int fd ; local
173 if((fd = unix_open(devname, O_RDONLY | O_CLOEXEC)) < 0) {
177 desclength = adb_read(fd, devdesc, sizeof(devdesc));
183 adb_close(fd);
191 adb_close(fd);
204 adb_close(fd);
273 if (!fstat(fd, &st) && S_ISCHR(st.st_mode)) {
300 adb_close(fd);
483 D("[ usb read %d fd = %d], fname=%s\n", xfer, h->desc, h->fname);
510 D("[ kicking %p (fd
[all...]
/system/core/fastboot/
H A Dusb_linux.c158 int fd; local
164 fd = open(path, O_RDONLY);
165 if (fd >= 0) {
166 int chars_read = read(fd, info.serial_number,
168 close(fd);
246 int fd, n; local
252 fd = open(path, O_RDONLY);
253 if (fd < 0)
256 n = read(fd, buf, bufsize - 1);
257 close(fd);
310 int fd; local
441 int fd; local
453 int fd; local
[all...]
/system/core/fs_mgr/
H A Dfs_mgr.c178 int fd; local
181 fd = open(blockdev, O_RDONLY);
182 if (fd < 0) {
187 ioctl(fd, BLKROSET, &ON);
188 close(fd);
/system/core/gpttool/
H A Dgpttool.c88 int fd; local
89 fd = open("/dev/urandom", O_RDONLY);
90 read(fd, uuid, 16);
91 close(fd);
257 int fd; local
288 fd = open(device, O_RDWR);
289 if (fd < 0) {
293 if (ioctl(fd, BLKGETSIZE64, &sz)) {
364 write(fd, &ptbl, sizeof(ptbl));
365 fsync(fd);
[all...]
/system/core/init/
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:__anon146
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.c61 int fd; member in struct:__anon151
67 int fd = open(PROP_FILENAME, O_RDONLY | O_NOFOLLOW); local
68 if (fd < 0)
72 w->fd = fd;
89 fcntl(pa_workspace.fd, F_SETFD, FD_CLOEXEC);
163 int fd; local
166 fd = mkstemp(tempPath);
167 if (fd < 0) {
171 write(fd, valu
352 get_property_workspace(int *fd, int *sz) argument
443 int fd, length; local
554 int fd; local
[all...]
H A Dutil.c92 int fd, ret; local
98 fd = socket(PF_UNIX, type, 0);
99 if (fd < 0) {
125 ret = bind(fd, (struct sockaddr *) &addr, sizeof (addr));
140 return fd;
145 close(fd);
154 int fd; local
158 fd = open(fn, O_RDONLY);
159 if(fd < 0) return 0;
163 if (fstat(fd,
204 int fd; local
388 int fd; local
412 int fd, n; local
480 int fd; local
[all...]
/system/core/liblog/
H A Dlog_read.c141 * connect to peer named "name" on fd
142 * returns same fd or -1 on error.
143 * fd is not closed on error. that's your job.
147 int WEAK socket_local_client_connect(int fd, const char *name, int namespaceId, argument
160 if(connect(fd, (struct sockaddr *) &addr, alen) < 0) {
164 return fd;
172 * returns fd or -1 on error
311 p.fd = sock;
H A Dlog_read_kern.c156 int fd; member in struct:logger
180 if (logger->fd >= 0) {
181 close(logger->fd);
206 return ioctl(logger->fd, cmd);
345 logger->fd = open(n, logger_list->mode);
346 if (logger->fd < 0) {
552 p->fd = logger->fd;
615 result = read(logger->fd, logger_list->entry.buf,
/system/core/libutils/
H A DLooper.cpp53 int SimpleLooperCallback::handleEvent(int fd, int events, void* data) { argument
54 return mCallback(fd, events, data);
96 eventItem.data.fd = mWakeReadPipeFd;
166 int fd = response.request.fd; local
171 "fd=%d, events=0x%x, data=%p",
172 this, ident, fd, events, data);
174 if (outFd != NULL) *outFd = fd;
256 int fd = eventItems[i].data.fd; local
322 int fd = response.request.fd; local
404 addFd(int fd, int ident, int events, Looper_callbackFunc callback, void* data) argument
408 addFd(int fd, int ident, int events, const sp<LooperCallback>& callback, void* data) argument
466 removeFd(int fd) argument
[all...]
/system/core/logd/
H A DLogStatistics.cpp103 int fd = open(buffer, O_RDONLY); local
104 if (fd >= 0) {
105 ssize_t ret = read(fd, buffer, sizeof(buffer));
113 close(fd);
/system/core/logd/tests/
H A Dlogd_test.cpp51 .fd = sock,
443 int fd = socket_local_client("logdr", local
446 if (fd >= 0) {
455 user_logger_available = write(fd, ask, sizeof(ask)) == sizeof(ask);
457 user_logger_content = recv(fd, msg.buf, sizeof(msg), 0) > 0;
466 close(fd);
481 fd = open(loggers[i], O_RDONLY);
482 if (fd < 0) {
486 fcntl(fd, F_SETFL, O_RDONLY | O_NONBLOCK);
487 int result = TEMP_FAILURE_RETRY(read(fd, ms
[all...]
/system/core/logwrapper/
H A Dlogwrap.c299 .fd = parent_read,
304 int fd; local
337 fd = open(file_path, O_WRONLY | O_CREAT, 0664);
338 if (fd < 0) {
342 lseek(fd, 0, SEEK_END);
343 log_info.fp = fdopen(fd, "a");
455 fclose(log_info.fp); /* Also closes underlying fd */
/system/core/toolbox/upstream-netbsd/bin/dd/
H A Ddd.h88 int fd; /* file descriptor */ member in struct:__anon243
90 struct ddfops const *ops; /* ops to use with fd */
/system/extras/ksmutils/
H A Dksminfo.c199 int fd; local
224 fd = open(filename, O_RDONLY);
225 if (fd < 0) {
249 off = lseek(fd, vaddr, SEEK_SET);
254 len = read(fd, data, pm_kernel_pagesize(ker));
338 close(fd);
/system/extras/tests/sdcard/
H A Dsysutil.cpp84 int fd = open(filename, O_RDONLY); local
86 if (fd < 0)
105 s = read(fd, end, size);
127 close(fd);
148 int fd = open(filename, O_WRONLY); local
151 if (fd < 0)
167 ssize_t s = write(fd, start, size);
184 close(fd);
399 void fsyncAndDropCaches(int fd, int code) argument
401 fsync(fd);
[all...]
/system/core/adf/libadf/
H A Dadf.c93 dev->fd = open(filename, flags);
94 if (dev->fd < 0)
102 if (dev->fd >= 0)
103 close(dev->fd);
113 err = ioctl(dev->fd, ADF_GET_DEVICE_DATA, data);
142 err = ioctl(dev->fd, ADF_GET_DEVICE_DATA, data);
175 err = ioctl(dev->fd, ADF_POST_CONFIG, &data);
192 err = ioctl(dev->fd, attach ? ADF_ATTACH : ADF_DETACH, &data);
269 int fd = adf_interface_open(dev, in[i], O_RDONLY); local
270 if (fd <
339 int fd = open(filename, flags); local
345 adf_get_interface_data(int fd, struct adf_interface_data *data) argument
387 adf_interface_blank(int fd, __u8 mode) argument
395 adf_interface_set_mode(int fd, struct drm_mode_modeinfo *mode) argument
403 adf_interface_simple_buffer_alloc(int fd, __u32 w, __u32 h, __u32 format, __u32 *offset, __u32 *pitch) argument
423 adf_interface_simple_post(int fd, __u32 overlay_engine, __u32 w, __u32 h, __u32 format, int buf_fd, __u32 offset, __u32 pitch, int acquire_fence) argument
506 int fd = adf_overlay_engine_open(dev, in[i], O_RDONLY); local
577 int fd = open(filename, flags); local
583 adf_get_overlay_engine_data(int fd, struct adf_overlay_engine_data *data) argument
625 adf_overlay_engine_supports_format(int fd, __u32 format) argument
646 adf_set_event(int fd, enum adf_event_type type, bool enabled) argument
659 adf_read_event(int fd, struct adf_event **event) argument
[all...]

Completed in 313 milliseconds

123456789