Searched defs:fd (Results 1 - 25 of 185) sorted by relevance

12345678

/system/core/include/cutils/
H A Dabort_socket.h38 * asocket_create() sets the fd to non-blocking mode. It must not be changed to
59 int fd; /* primary socket fd */ member in struct:asocket
63 /* Create an asocket from fd.
67 struct asocket *asocket_init(int fd);
/system/core/libcutils/
H A Dsockets.c25 bool socket_peer_is_trusted(int fd) argument
30 int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len);
H A Dload_file.c26 int fd; local
29 fd = open(fn, O_RDONLY);
30 if(fd < 0) return 0;
32 sz = lseek(fd, 0, SEEK_END);
35 if(lseek(fd, 0, SEEK_SET) != 0) goto oops;
40 if(read(fd, data, sz) != sz) goto oops;
41 close(fd);
48 close(fd);
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.c80 int fd = open(PROCESS_NAME_DEVICE, O_RDWR); local
81 if (fd < 0)
83 write(fd, process_name, strlen(process_name) + 1);
84 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 );
/system/extras/fatblock/
H A Dfdpool.h23 int fd; member in struct:pooled_fd
/system/bluetooth/tools/
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));
/system/extras/ext4_utils/
H A Dwipe.c33 int wipe_block_device(int fd, s64 len) argument
40 ret = ioctl(fd, BLKSECDISCARD, &range);
44 ret = ioctl(fd, BLKDISCARD, &range);
57 int wipe_block_device(int fd, s64 len) argument
/system/extras/tests/cpueater/
H A Dcpueater.c32 int fd; local
60 for (fd = 3; fd < 256; fd++) {
61 close(fd);
H A Ddaemonize.c33 int pid, fd, mode; local
96 for (fd = 3; fd < 256; fd++) {
97 close(fd);
/system/core/adb/
H A Dconsole.c8 int fd, port; local
18 fd = socket_loopback_client( port, SOCK_STREAM );
19 if (fd < 0) {
23 return fd;
29 int fd, nn; local
31 fd = connect_to_console();
32 if (fd < 0)
38 adb_write( fd, argv[nn], strlen(argv[nn]) );
39 adb_write( fd, (nn == argc-1) ? "\n" : " ", 1 );
41 adb_write( fd, QUI
[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 Dtest_track_devices.c17 unix_write( int fd, const char* buf, int len ) argument
21 int len2 = write(fd, buf, len);
35 unix_read( int fd, char* buf, int len ) argument
39 int len2 = read(fd, buf, len);
H A Dtest_track_jdwp.c17 unix_write( int fd, const char* buf, int len ) argument
21 int len2 = write(fd, buf, len);
35 unix_read( int fd, char* buf, int len ) argument
39 int len2 = read(fd, buf, len);
/system/core/init/
H A Dwatchdogd.c31 int fd; local
50 fd = open(DEV_NAME, O_RDWR);
51 if (fd < 0) {
56 ret = ioctl(fd, WDIOC_SETTIMEOUT, &timeout);
59 ret = ioctl(fd, WDIOC_GETTIMEOUT, &timeout);
73 write(fd, "", 1);
/system/core/sh/
H A Deval.h44 int fd; /* file descriptor to read from */ member in struct:backcmd
/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 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);
H A Dsmd.c9 int fd, len, r, port = 0; local
21 fd = open(devname, O_WRONLY);
22 if(fd < 0) {
29 r = write(fd, argv[0], len);
37 write(fd, argc ? " " : "\r", 1);
39 close(fd);
/system/extras/tests/ext4/
H A Dset_ext4_err_bit.c14 int fd; local
23 fd = open(argv[1], O_RDWR);
25 if (fd < 0) {
30 if (lseek(fd, SB_OFFSET, SEEK_SET) == -1) {
35 if (read(fd, sb, SB_SIZE) != SB_SIZE) {
48 if (lseek(fd, SB_OFFSET, SEEK_SET) == -1) {
53 if (write(fd, sb, SB_SIZE) != SB_SIZE) {
58 close(fd);

Completed in 472 milliseconds

12345678