Searched refs:fd (Results 101 - 125 of 200) sorted by relevance

12345678

/system/core/libdiskconfig/
H A Dwrite_lst.c70 wlist_commit(int fd, struct write_list *lst, int test) argument
73 if (lseek64(fd, lst->offset, SEEK_SET) != (loff_t)lst->offset) {
79 if (write(fd, lst->data, lst->len) != (int)lst->len) {
/system/core/toolbox/
H A Dtouch.c17 int i, fd, aflag = 0, mflag = 0, debug = 0, flags = 0; local
62 if ((fd=creat(file, 0666)) != -1)
63 close(fd);
H A Dsendevent.c51 int fd; local
61 fd = open(argv[1], O_RDWR);
62 if(fd < 0) {
66 if (ioctl(fd, EVIOCGVERSION, &version)) {
74 ret = write(fd, &event, sizeof(event));
H A Dalarm.c75 res = ioctl(fd, RTC_ALM_READ, &tm);
95 res = ioctl(fd, RTC_RD_TIME, &tm);
133 res = ioctl(fd, RTC_ALM_SET, &tm);
138 res = ioctl(fd, RTC_AIE_ON);
171 FD_SET(fd, &rfds);
172 res = select(fd + 1, &rfds, NULL, NULL, &timeout);
179 read(fd, &event, sizeof(event));
H A Dgetevent.c43 static int print_input_props(int fd) argument
52 res = ioctl(fd, EVIOCGPROP(sizeof(bits)), bits);
75 static int print_possible_events(int fd, int print_flags) argument
89 res = ioctl(fd, EVIOCGBIT(i, bits_size), bits);
102 res2 = ioctl(fd, EVIOCGKEY(res), bits + bits_size);
119 res2 = ioctl(fd, EVIOCGLED(res), bits + bits_size);
124 res2 = ioctl(fd, EVIOCGSND(res), bits + bits_size);
129 res2 = ioctl(fd, EVIOCGSW(bits_size), bits + bits_size);
177 if(ioctl(fd, EVIOCGABS(j * 8 + k), &abs) == 0) {
297 int fd; local
[all...]
H A Dnandread.c27 int fd; local
102 fd = open(devname, O_RDONLY);
103 if (fd < 0) {
124 ret = ioctl(fd, MEMGETINFO, &mtdinfo);
150 ret = ioctl(fd, ECCGETLAYOUT, &ecclayout);
163 ret = ioctl(fd, ECCGETSTATS, &initial_ecc);
180 ret = ioctl(fd, MTDFILEMODE, MTD_MODE_RAW);
193 lseek64(fd, pos, SEEK_SET);
194 ret = read(fd, buffer, mtdinfo.writesize + rawmode);
201 ret = ioctl(fd, MEMREADOO
[all...]
H A Ddd.c161 in.fd = STDIN_FILENO;
163 in.fd = open(in.name, O_RDONLY, 0);
164 if (in.fd < 0) {
171 /* Ensure in.fd is outside the stdio descriptor range */
172 in.fd = redup_clean_fd(in.fd);
186 out.fd = STDOUT_FILENO;
191 out.fd = open(out.name, O_RDWR | OFLAGS /*, DEFFILEMODE */);
197 if (out.fd < 0) {
198 out.fd
310 redup_clean_fd(int fd) argument
604 bwrite(int fd, const void *buf, size_t len) argument
[all...]
H A Dps.c40 int fd, r; local
57 fd = open(cmdline, O_RDONLY);
58 if(fd == 0) {
61 r = read(fd, cmdline, 1023);
62 close(fd);
68 fd = open(statline, O_RDONLY);
69 if(fd == 0) return -1;
70 r = read(fd, statline, 1023);
71 close(fd);
/system/media/wilhelm/src/android/
H A Dandroid_LocAVPlayer.cpp63 } else if (mPlayer->setDataSource(mDataLocator.fdi.fd, mDataLocator.fdi.offset,
68 // Binder dups the fd for use by mediaserver, so if we own the fd then OK to close now
70 (void) ::close(mDataLocator.fdi.fd);
71 mDataLocator.fdi.fd = -1;
/system/core/libcutils/
H A Drecord_stream.c34 int fd; member in struct:RecordStream
45 extern RecordStream *record_stream_new(int fd, size_t maxRecordLen) argument
53 ret->fd = fd;
115 * Reads the next record from stream fd
166 countRead = read (p_rs->fd, p_rs->read_end, p_rs->buffer_end - p_rs->read_end);
H A Dbuffer.c77 ssize_t bufferRead(Buffer* buffer, int fd) { argument
80 ssize_t bytesRead = read(fd,
96 ssize_t bufferWrite(Buffer* buffer, int fd) { argument
100 ssize_t bytesWritten = write(fd,
H A Dmq.c173 SelectableFd* fd; member in struct:PeerProxy
211 static void setNonBlocking(int fd) { argument
213 if ((flags = fcntl(fd, F_GETFL, 0)) < 0) {
216 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
221 /** Closes a fd and logs a warning if the close fails. */
222 static void closeWithWarning(int fd) { argument
223 int result = close(fd);
408 // Remove the fd from the selector.
409 if (peerProxy->fd != NULL) {
410 peerProxy->fd
515 peerProxyWrite(SelectableFd* fd) argument
561 peerProxyBeforeSelect(SelectableFd* fd) argument
706 peerProxySetFd(PeerProxy* peerProxy, SelectableFd* fd) argument
965 peerProxyRead(SelectableFd* fd) argument
[all...]
/system/extras/sane_schedstat/
H A Dsane_schedstat.c143 int fd; local
147 fd = open("/proc/schedstat", O_RDONLY);
148 if (fd < 0) return -1;
149 i = read(fd, buf, sizeof(buf) - 1);
150 close(fd);
/system/core/sh/
H A Dmain.c281 int fd; local
286 if ((fd = open(name, O_RDONLY)) >= 0)
287 setinputfd(fd, 1);
289 if (fd < 0)
317 int fd; local
320 if ((fd = open(name, O_RDONLY)) >= 0)
321 setinputfd(fd, 1);
H A Dnodes.h105 int fd; member in struct:nfile
114 int fd; member in struct:ndup
123 int fd; member in struct:nhere
/system/core/adb/
H A Dtransport.c137 read_packet(int fd, const char* name, apacket** ppacket) argument
144 snprintf(buff, sizeof buff, "fd=%d", fd);
148 r = adb_read(fd, p, len);
153 D("%s: read_packet (fd=%d), error ret=%d errno=%d: %s\n", name, fd, r, errno, strerror(errno));
168 write_packet(int fd, const char* name, apacket** ppacket) argument
174 snprintf(buff, sizeof buff, "fd=%d", fd);
185 r = adb_write(fd,
198 transport_socket_events(int fd, unsigned events, void *_t) argument
523 transport_read_action(int fd, struct tmsg* m) argument
545 transport_write_action(int fd, struct tmsg* m) argument
988 readx(int fd, void *ptr, size_t len) argument
1020 writex(int fd, const void *ptr, size_t len) argument
[all...]
H A Dbackup_service.c27 int fd; member in struct:__anon272
45 adb_close(params->fd);
144 params->fd = s[0];
H A Dsysdeps_win32.c124 _fh_from_int( int fd )
128 fd -= WIN32_FH_BASE;
130 if (fd < 0 || fd >= _win32_fh_count) {
131 D( "_fh_from_int: invalid fd %d\n", fd + WIN32_FH_BASE );
136 f = &_win32_fhs[fd];
139 D( "_fh_from_int: invalid fd %d\n", fd + WIN32_FH_BASE );
357 D( "adb_open: '%s' => fd
402 adb_read(int fd, void* buf, int len) argument
414 adb_write(int fd, const void* buf, int len) argument
426 adb_lseek(int fd, int pos, int where) argument
438 adb_shutdown(int fd) argument
452 adb_close(int fd) argument
781 disable_tcp_nagle(int fd) argument
1339 int fd = _fh_to_int(f); local
1377 event_looper_hook( EventLooper looper, int fd, int events ) argument
1409 event_looper_unhook( EventLooper looper, int fd, int events ) argument
1748 int fd = fde->fd - WIN32_FH_BASE; local
1778 int fd = fde->fd - WIN32_FH_BASE; local
1829 fdevent_create(int fd, fd_func func, void *arg) argument
1847 fdevent_install(fdevent *fde, int fd, fd_func func, void *arg) argument
[all...]
H A Dadb.h95 ** us to our fd event system. For remote asockets
99 int fd; member in struct:asocket
173 int fd; member in struct:atransport
181 /* usb handle or socket fd as needed */
211 int fd; member in struct:alistener
229 asocket *create_local_socket(int fd);
312 void framebuffer_service(int fd, void *cookie);
313 void log_service(int fd, void *cookie);
314 void remount_service(int fd, void *cookie);
443 int sendfailmsg(int fd, cons
[all...]
/system/core/gpttool/
H A Dgpttool.c89 int fd; local
90 fd = open("/dev/urandom", O_RDONLY);
91 read(fd, uuid, 16);
92 close(fd);
260 int fd; local
291 fd = open(device, O_RDWR);
292 if (fd < 0) {
296 if (ioctl(fd, BLKGETSIZE64, &sz)) {
367 write(fd, &ptbl, sizeof(ptbl));
368 fsync(fd);
[all...]
/system/core/init/
H A Dbuiltins.c51 int fd, ret, len; local
53 fd = open(path, O_WRONLY|O_CREAT, 0622);
55 if (fd < 0)
61 ret = write(fd, value, len);
64 close(fd);
91 int fd, ret; local
93 fd = open("/dev/tty0", O_RDWR | O_SYNC);
94 if (fd < 0)
97 ret = ioctl(fd, KDSKBENT, kbe);
99 close(fd);
329 int mode, loop, fd; local
[all...]
/system/extras/tests/sdcard/
H A Dsysutil.h113 // Fsync the given fd and drop caches. Fsync is needed because dirty
119 void fsyncAndDropCaches(int fd, int code = 3);
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/libpixelflinger/codeflinger/
H A Dblending.cpp73 int fd = component==GGLFormat::ALPHA ? mBlendDstA : mBlendDst; local
76 const int blending = blending_codes(fs, fd);
101 (fs==GGL_DST_COLOR && fd==GGL_ONE_MINUS_DST_COLOR) ||
102 (fs==GGL_SRC_COLOR && fd==GGL_ONE_MINUS_SRC_COLOR) ||
103 (fs==GGL_DST_ALPHA && fd==GGL_ONE_MINUS_DST_ALPHA) ||
104 (fs==GGL_SRC_ALPHA && fd==GGL_ONE_MINUS_SRC_ALPHA);
107 (fs==GGL_ONE_MINUS_DST_COLOR && fd==GGL_DST_COLOR) ||
108 (fs==GGL_ONE_MINUS_SRC_COLOR && fd==GGL_SRC_COLOR) ||
109 (fs==GGL_ONE_MINUS_DST_ALPHA && fd==GGL_DST_ALPHA) ||
110 (fs==GGL_ONE_MINUS_SRC_ALPHA && fd
[all...]
/system/core/logcat/
H A Dlogcat.cpp58 int fd; member in struct:log_device_t
262 if (dev->fd > max) {
263 max = dev->fd;
272 FD_SET(dev->fd, &readset);
279 if (FD_ISSET(dev->fd, &readset)) {
282 ret = read(dev->fd, entry->buf, LOGGER_ENTRY_MAX_LEN);
595 int fd; local
601 fd = open("/proc/cmdline", O_RDONLY);
602 if (fd >= 0) {
603 int n = read(fd, cmdlin
[all...]

Completed in 244 milliseconds

12345678