Searched refs:fd (Results 1 - 25 of 27) sorted by relevance

12

/bootable/recovery/minadbd/
H A Dtransport.h24 int readx(int fd, void *ptr, size_t len);
25 int writex(int fd, const void *ptr, size_t len);
H A Dusb_linux_client.c35 int fd; member in struct:usb_handle
48 int fd; local
53 while (usb->fd != -1)
60 fd = unix_open("/dev/android_adb", O_RDWR);
61 if (fd < 0) {
63 fd = unix_open("/dev/android", O_RDWR);
65 if (fd < 0) {
68 } while (fd < 0);
71 close_on_exec(fd);
72 usb->fd
116 int fd; local
[all...]
H A Dservices.c32 void (*func)(int fd, void *cookie);
33 int fd; member in struct:stinfo
41 sti->func(sti->fd, sti->cookie);
50 int fd; local
54 fd = adb_creat(ADB_SIDELOAD_FILENAME, 0644);
55 if(fd < 0) {
64 if(writex(fd, buf, xfer)) break;
73 adb_close(fd);
85 static void echo_service(int fd, void *cookie)
93 r = read(fd, bu
[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
329 int fd = open(path, O_CREAT|O_WRONLY|O_TRUNC|O_NOFOLLOW, mode); local
342 int fd = open( pathname, options ); local
351 adb_shutdown(int fd) argument
358 adb_close(int fd) argument
366 adb_read(int fd, void* buf, size_t len) argument
374 adb_write(int fd, const void* buf, size_t len) argument
381 adb_lseek(int fd, int pos, int where) argument
397 int fd; local
427 adb_socket_setbufsize( int fd, int bufsize ) argument
433 disable_tcp_nagle(int fd) 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 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...]
H A Dsockets.c33 int sendfailmsg(int fd, const char *reason) argument
40 if(writex(fd, buf, 8)) return -1;
41 return writex(fd, reason, len);
55 ** write to their fd.
148 int r = adb_write(s->fd, p->ptr, p->len);
202 D("LS(%d): destroying fde.fd=%d\n", s->id, s->fde.fd);
204 /* IMPORTANT: the remove closes the fd
222 D("entered. LS(%d) fd=%d\n", s->id, s->fd);
256 local_socket_event_func(int fd, unsigned ev, void *_s) argument
386 create_local_socket(int fd) argument
406 int fd; local
[all...]
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
379 transport_read_action(int fd, struct tmsg* m) argument
401 transport_write_action(int fd, struct tmsg* m) argument
732 readx(int fd, void *ptr, size_t len) argument
764 writex(int fd, const void *ptr, size_t len) 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 */
205 asocket *create_local_socket(int fd);
281 void framebuffer_service(int fd, void *cookie);
282 void log_service(int fd, void *cookie);
283 void remount_service(int fd, void *cookie);
413 int sendfailmsg(int fd, const char *reason);
/bootable/recovery/minzip/
H A DSysUtil.h38 int sysLoadFileInShmem(int fd, MemMapping* pMap);
41 * Map a file (from fd's current offset) into a shared,
46 int sysMapFileInShmem(int fd, MemMapping* pMap);
51 int sysMapFileSegmentInShmem(int fd, off_t start, long length,
H A DSysUtil.c47 static int getFileStartAndLength(int fd, off_t *start_, size_t *length_) argument
55 start = lseek(fd, 0L, SEEK_CUR);
56 end = lseek(fd, 0L, SEEK_END);
57 (void) lseek(fd, start, SEEK_SET);
78 * everything from fd's current offset on.
83 int sysLoadFileInShmem(int fd, MemMapping* pMap) argument
91 if (getFileStartAndLength(fd, &start, &length) < 0)
98 actual = read(fd, memPtr, length);
112 * Map a file (from fd's current offset) into a shared, read-only memory
118 int sysMapFileInShmem(int fd, MemMappin argument
149 sysMapFileSegmentInShmem(int fd, off_t start, long length, MemMapping* pMap) argument
[all...]
H A DZip.c440 pArchive->fd = open(fileName, O_RDONLY, 0);
441 if (pArchive->fd < 0) {
447 if (sysMapFileInShmem(pArchive->fd, &map) != 0) {
486 if (pArchive->fd >= 0)
487 close(pArchive->fd);
495 pArchive->fd = -1;
542 n = read(pArchive->fd, buf, count);
608 int cc = read(pArchive->fd, readBuf, getSize);
680 oldOff = lseek(pArchive->fd, 0, SEEK_CUR);
683 lseek(pArchive->fd, pEntr
775 int fd = (int)cookie; local
801 mzExtractZipEntryToFile(const ZipArchive *pArchive, const ZipEntry *pEntry, int fd) argument
1127 int fd = creat(targetFile, UNZIP_FILEMODE); local
[all...]
H A DZip.h53 int fd; member in struct:ZipArchive
180 const ZipEntry *pEntry, int fd);
/bootable/recovery/minui/
H A Devents.c52 int fd; local
61 fd = openat(dirfd(dir), de->d_name, O_RDONLY);
62 if(fd < 0) continue;
65 if (ioctl(fd, EVIOCGBIT(0, sizeof(ev_bits)), ev_bits) < 0) {
66 close(fd);
73 close(fd);
77 ev_fds[ev_count].fd = fd;
90 int ev_add_fd(int fd, ev_callback cb, void *data) argument
95 ev_fds[ev_count].fd
135 ev_get_input(int fd, short revents, struct input_event *ev) argument
[all...]
H A Dminui.h52 typedef int (*ev_callback)(int fd, short revents, void *data);
57 int ev_add_fd(int fd, ev_callback cb, void *data);
67 int ev_get_input(int fd, short revents, struct input_event *ev);
H A Dgraphics.c69 int fd; local
72 fd = open("/dev/graphics/fb0", O_RDWR);
73 if (fd < 0) {
78 if (ioctl(fd, FBIOGET_VSCREENINFO, &vi) < 0) {
80 close(fd);
113 if (ioctl(fd, FBIOPUT_VSCREENINFO, &vi) < 0) {
115 close(fd);
119 if (ioctl(fd, FBIOGET_FSCREENINFO, &fi) < 0) {
121 close(fd);
125 bits = mmap(0, fi.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
[all...]
/bootable/recovery/
H A Dadb_install.cpp41 int fd = open("/sys/class/android_usb/android0/enable", O_WRONLY); local
42 if (fd < 0) {
46 if (write(fd, enabled ? "1" : "0", 1) < 0) {
49 if (close(fd) < 0) {
H A Dui.cpp60 int RecoveryUI::input_callback(int fd, short revents, void* data) argument
65 ret = ev_get_input(fd, revents, &ev);
192 int fd = open("/sys/class/android_usb/android0/state", O_RDONLY); local
193 if (fd < 0) {
201 int connected = (read(fd, &buf, 1) == 1) && (buf == 'C');
202 if (close(fd) < 0) {
H A Dinstall.cpp60 int fd = creat(binary, 0755); local
61 if (fd < 0) {
66 bool ok = mzExtractZipEntryToFile(zip, binary_entry, fd);
67 close(fd);
83 // - an fd to which the program can write in order to update the
H A Dui.h107 static int input_callback(int fd, short revents, void* data);
/bootable/recovery/tools/ota/
H A Dcheck-lost+found.c66 int fd = open(kMarkerFile, O_WRONLY|O_CREAT, 0444); local
67 if (fd >= 0 && close(fd) == 0) {
78 fd = open(fn, O_WRONLY|O_CREAT, 0444);
79 if (fd >= 0) { // Don't sweat it if we can't write the file.
80 write(fd, fn, sizeof(fn)); // write, you know, some data
81 close(fd);
/bootable/recovery/mtdutils/
H A Dmtdutils.c42 int fd; member in struct:MtdReadContext
49 int fd; member in struct:MtdWriteContext
75 int fd; local
107 fd = open(MTD_PROC_FILENAME, O_RDONLY);
108 if (fd < 0) {
111 nbytes = read(fd, buf, sizeof(buf) - 1);
112 close(fd);
243 int fd = open(mtddevname, O_RDONLY); local
244 if (fd < 0) return -1;
247 int ret = ioctl(fd, MEMGETINF
288 read_block(const MtdPartition *partition, int fd, char *data) argument
410 int fd = ctx->fd; local
[all...]
H A Dflash_image.c68 int fd = open(argv[2], O_RDONLY); local
69 if (fd < 0) die("error opening %s", argv[2]);
72 int headerlen = read(fd, header, sizeof(header));
104 while ((len = read(fd, buf, sizeof(buf))) > 0) {
125 if (lseek(fd, headerlen, SEEK_SET) != headerlen)
131 len = read(fd, buf, left > (int)sizeof(buf) ? (int)sizeof(buf) : left);
H A Dmounts.c64 int fd; local
89 fd = open(PROC_MOUNTS_FILENAME, O_RDONLY);
90 if (fd < 0) {
93 nbytes = read(fd, buf, sizeof(buf) - 1);
94 close(fd);
/bootable/recovery/updater/
H A Dupdater.c61 int fd = atoi(argv[2]); local
62 FILE* cmd_pipe = fdopen(fd, "wb");

Completed in 1016 milliseconds

12