Searched refs:fd (Results 51 - 75 of 218) sorted by relevance

123456789

/system/core/libsync/
H A Dsync.c30 int sync_wait(int fd, int timeout) argument
34 return ioctl(fd, SYNC_IOC_WAIT, &to);
52 struct sync_fence_info_data *sync_fence_info(int fd) argument
62 err = ioctl(fd, SYNC_IOC_FENCE_INFO, info);
96 int sw_sync_timeline_inc(int fd, unsigned count) argument
100 return ioctl(fd, SW_SYNC_IOC_INC, &arg);
103 int sw_sync_fence_create(int fd, const char *name, unsigned value) argument
111 err = ioctl(fd, SW_SYNC_IOC_CREATE_FENCE, &data);
H A Dsync_test.c31 int fd[2]; member in struct:sync_thread_data
42 err = sync_wait(sync_data->fd[i], 10000);
51 info = sync_fence_info(sync_data->fd[i]);
95 int fd = sw_sync_fence_create(sync_timeline_fd, str, val); local
96 if (fd < 0) {
100 sync_data[i].fd[j] = fd;
101 printf("sync_data[%d].fd[%d] = %d;\n", i, j, fd);
109 sync_data[3].fd[
[all...]
/system/core/adb/
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
242 int res, fd; local
334 int fd = t->sfd; local
[all...]
H A Dfile_sync_client.c65 void sync_quit(int fd) argument
72 writex(fd, &msg.req, sizeof(msg.req));
77 int sync_ls(int fd, const char *path, sync_ls_cb func, void *cookie) argument
89 if(writex(fd, &msg.req, sizeof(msg.req)) ||
90 writex(fd, path, len)) {
95 if(readx(fd, &msg.dent, sizeof(msg.dent))) break;
102 if(readx(fd, buf, len)) break;
112 adb_close(fd);
126 int sync_readtime(int fd, const char *path, unsigned *timestamp) argument
134 if(writex(fd,
151 sync_start_readtime(int fd, const char *path) argument
167 sync_finish_readtime(int fd, unsigned int *timestamp, unsigned int *mode, unsigned int *size) argument
185 sync_readmode(int fd, const char *path, unsigned *mode) argument
210 write_data_file(int fd, const char *path, syncsendbuf *sbuf) argument
247 write_data_buffer(int fd, char* file_buffer, int size, syncsendbuf *sbuf) argument
273 write_data_link(int fd, const char *path, syncsendbuf *sbuf) argument
297 sync_send(int fd, const char *lpath, const char *rpath, unsigned mtime, mode_t mode, int verifyApk) argument
441 sync_recv(int fd, const char *rpath, const char *lpath) argument
543 int fd = adb_connect("sync:"); local
674 copy_local_dir_remote(int fd, const char *lpath, const char *rpath, int checktimestamps, int listonly) argument
746 int fd; local
871 copy_remote_dir_local(int fd, const char *rpath, const char *lpath, int checktimestamps) argument
948 int fd; local
1010 int fd = adb_connect("sync:"); local
[all...]
H A Dfdevent.c73 fprintf(stderr,"FDE #%03d %c%c%c %s\n", fde->fd,
95 static void fdevent_subproc_event_func(int fd, unsigned events, void *userdata);
135 if(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fde->fd, &ev)) {
155 epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fde->fd, &ev);
181 if(epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fde->fd, &ev)) {
186 if(epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fde->fd, &ev)) {
196 if(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fde->fd, &ev)) {
262 if(fde->fd >= select_n) {
263 select_n = fde->fd + 1;
271 FD_CLR(fde->fd,
517 fdevent_subproc_event_func(int fd, unsigned ev, void *userdata) argument
575 fdevent_create(int fd, fd_func func, void *arg) argument
593 fdevent_install(fdevent *fde, int fd, fd_func func, void *arg) argument
[all...]
/system/core/libion/
H A Dion_test.c26 int _ion_alloc_test(int *fd, struct ion_handle **handle) argument
30 *fd = ion_open();
31 if (*fd < 0)
32 return *fd;
34 ret = ion_alloc(*fd, len, align, heap_mask, alloc_flags, handle);
43 int fd, ret; local
46 if(_ion_alloc_test(&fd, &handle))
49 ret = ion_free(fd, handle);
54 ion_close(fd);
60 int fd, map_f local
121 int fd, share_fd, ret; local
156 int fd, recv_fd; local
[all...]
/system/core/toolbox/
H A Dload_policy.c13 int fd, rc, vers; local
24 fd = open(path, O_RDONLY);
25 if (fd < 0) {
30 if (fstat(fd, &sb) < 0) {
35 map = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
47 close(fd);
H A Dmd5.c23 int fd; local
27 fd = open(path, O_RDONLY);
28 if (fd < 0) {
39 rlen = read(fd, buf, sizeof(buf));
43 (void)close(fd);
49 if (close(fd)) {
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);
H A Drotatefb.c18 int fd; local
43 fd = open(fbdev, O_RDWR);
44 if(fd < 0) {
49 res = ioctl(fd, FBIOGET_VSCREENINFO, &fbinfo);
64 res = ioctl(fd, FBIOPUT_VSCREENINFO, &fbinfo);
H A Dsetkey.c23 int fd; local
31 fd = open(TTYDEV, O_RDWR | O_SYNC);
32 if (fd < 0) {
53 ret = ioctl(fd, KDSKBENT, &kbe);
63 ret = ioctl(fd, KDGKBENT, &kbe);
/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/libcutils/
H A Dfs.c78 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY)); local
79 if (fd == -1) {
85 if (TEMP_FAILURE_RETRY(read(fd, buf, BUF_SIZE)) == -1) {
93 close(fd);
97 close(fd);
109 int fd = TEMP_FAILURE_RETRY(mkstemp(temp)); local
110 if (fd == -1) {
121 if (TEMP_FAILURE_RETRY(write(fd, buf, len)) < len) {
125 if (close(fd) == -1) {
138 close(fd);
[all...]
H A Dandroid_reboot.c81 int fd, cnt = 0; local
86 fd = open("/proc/sysrq-trigger", O_WRONLY);
87 if (fd < 0) {
90 write(fd, "u", 1);
91 close(fd);
/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)
79 printf( "using (fd=%d)\n"
89 fd,
[all...]
H A Dmdp_test.c31 static int open_file(char *name, int *fd, int *len, int *fmt) argument
51 *fd = open(fn, O_RDONLY);
52 if (*fd < 0) {
57 if (fstat(*fd, &stat) < 0) {
64 printf("Successfully opened file %s (fmt=%d len=%d fd=%d)\n", fn, *fmt,
65 *len, *fd);
69 close(*fd);
73 static int get_pmem(int *fd, void **data, int sz) argument
75 *fd = open("/dev/pmem", O_RDWR | O_NONBLOCK | O_SYNC);
76 if (*fd <
95 get_framebuffer(int *fd, char **fb, int *width, int *height) argument
128 set_active_framebuffer(int fd, unsigned n) argument
[all...]
/system/core/libsparse/
H A Dsparse_read.c99 int fd, int64_t offset, unsigned int blocks, unsigned int block,
114 ret = sparse_file_add_fd(s, fd, offset, len, block);
122 ret = read_all(fd, copybuf, chunk);
130 lseek64(fd, len, SEEK_CUR);
137 int fd, unsigned int blocks, unsigned int block, uint32_t *crc32)
150 ret = read_all(fd, &fill_val, sizeof(fill_val));
178 int fd, unsigned int blocks, unsigned int block, uint32_t *crc32)
204 static int process_crc32_chunk(int fd, unsigned int chunk_size, uint32_t crc32) argument
213 ret = read_all(fd, &file_crc32, sizeof(file_crc32));
225 static int process_chunk(struct sparse_file *s, int fd, off64_ argument
98 process_raw_chunk(struct sparse_file *s, unsigned int chunk_size, int fd, int64_t offset, unsigned int blocks, unsigned int block, uint32_t *crc32) argument
136 process_fill_chunk(struct sparse_file *s, unsigned int chunk_size, int fd, unsigned int blocks, unsigned int block, uint32_t *crc32) argument
177 process_skip_chunk(struct sparse_file *s, unsigned int chunk_size, int fd, unsigned int blocks, unsigned int block, uint32_t *crc32) argument
277 sparse_file_read_sparse(struct sparse_file *s, int fd, bool crc) argument
359 sparse_file_read_normal(struct sparse_file *s, int fd) argument
410 sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc) argument
423 sparse_file_import(int fd, bool verbose, bool crc) argument
479 sparse_file_import_auto(int fd, bool crc) argument
[all...]
/system/extras/tests/iptables/qtaguid/
H A DsocketTag.cpp41 SockInfo() : fd(-1), addr(NULL) {};
44 int fd; member in class:android::SockInfo
98 fd = socket(AF_INET, SOCK_STREAM, 0);
99 if (fd < 0) {
103 if (doCtrlCommand("t %d %llu", fd, tag) < 0) {
105 close(fd);
110 close(fd);
113 if (doCtrlCommand("u %d", fd) < 0) {
115 close(fd);
262 EXPECT_GE(doCtrlCommand("t %d %llu %u", sock0.fd, ta
[all...]
/system/core/include/cutils/
H A Dsockets.h51 int fd; local
70 fd = strtol(val, NULL, 10);
74 return fd;
92 extern int socket_local_client_connect(int fd,
106 extern bool socket_peer_is_trusted(int fd);
/system/core/libsparse/include/sparse/
H A Dsparse.h122 * Associates a chunk of an existing fd with a sparse file cookie.
131 * The fd must remain open until the sparse file is closed or the fd block is
137 int fd, int64_t file_offset, unsigned int len, unsigned int block);
143 * @fd - file descriptor to write to
157 int sparse_file_write(struct sparse_file *s, int fd, bool gz, bool sparse,
199 * @fd - file descriptor to read from
211 int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc);
226 struct sparse_file *sparse_file_import(int fd, bool verbose, bool crc);
231 * @fd
[all...]
/system/extras/tests/cpueater/
H A Ddaemonize.c33 int pid, fd, mode; local
96 for (fd = 3; fd < 256; fd++) {
97 close(fd);
/system/vold/
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);
/system/core/sh/
H A Dinput.c91 int fd; /* file descriptor (or -1 if string) */ member in struct:parsefile
179 return parsefile != NULL && parsefile->fd == 0;
191 if (parsefile->fd == 0 && el) {
214 if (parsefile->fd == 0) {
252 nr = read(parsefile->fd, buf, BUFSIZ - 8);
259 if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
350 if (parsefile->fd == 0 && hist && something) {
435 int fd; local
439 if ((fd = open(fname, O_RDONLY)) < 0)
441 if (fd < 1
459 setinputfd(int fd, int push) argument
[all...]

Completed in 138 milliseconds

123456789