/system/core/sh/bltin/ |
H A D | bltin.h | 62 #define fileno(f) ((f)->fd)
|
/system/core/sh/ |
H A D | eval.c | 559 result->fd = -1; 596 result->fd = pip[0]; 602 TRACE(("evalbackcmd done: fd=%d buf=0x%x nleft=%d jp=0x%x\n", 603 result->fd, result->buf, result->nleft, result->jp)); 1074 backcmd->fd = pip[0];
|
H A D | eval.h | 44 int fd; /* file descriptor to read from */ member in struct:backcmd
|
H A D | expand.c | 118 expandhere(union node *arg, int fd) argument 120 herefd = fd; 122 xwrite(fd, stackblock(), expdest - stackblock()); 442 if (in.fd < 0) 444 while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR); 464 if (in.fd >= 0) 465 close(in.fd);
|
H A D | histedit.c | 375 int fd; local 378 if ((fd = mkstemp(editfile)) < 0) 380 if ((efp = fdopen(fd, "w")) == NULL) { 381 close(fd);
|
H A D | init.c | 914 int fd; /* file descriptor (or -1 if string) */ member in struct:parsefile
|
H A D | input.c | 91 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...] |
H A D | jobs.c | 110 static pid_t tcgetpgrp(int fd); 111 static int tcsetpgrp(int fd, pid_t pgrp); 114 tcgetpgrp(int fd) argument 117 if (ioctl(fd, TIOCGPGRP, (char *)&pgrp) == -1) 124 tcsetpgrp(int fd, pid_tpgrp) argument 126 return ioctl(fd, TIOCSPGRP, (char *)&pgrp); 163 /* Move to a high fd */ 1355 if (n->nfile.fd != i) { 1356 s[0] = n->nfile.fd + '0';
|
H A D | main.c | 281 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 D | nodes.c | 274 new->nfile.fd = n->nfile.fd; 281 new->ndup.fd = n->ndup.fd; 287 new->nhere.fd = n->nhere.fd;
|
H A D | nodes.h | 105 int fd; member in struct:nfile 114 int fd; member in struct:ndup 123 int fd; member in struct:nhere
|
H A D | output.c | 113 file->fd = BLOCK_OUT; 151 if (dest->fd == BLOCK_OUT) { 161 } else if (dest->fd == MEM_OUT) { 188 if (dest->buf == NULL || dest->nextc == dest->buf || dest->fd < 0) 190 if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0) 251 strout.fd = BLOCK_OUT; 479 xwrite(int fd, char *buf, int nbytes) argument 488 i = write(fd, buf, n); 510 xioctl(int fd, unsigned long request, char *arg) argument 514 while ((i = ioctl(fd, reques [all...] |
H A D | output.h | 46 short fd; member in struct:output
|
H A D | parser.c | 630 synerror("Bad fd number"); 1192 * specifying the fd to be redirected. The variable "c" contains the 1197 char fd = *out; local 1202 np->nfile.fd = 1; 1215 np->nfile.fd = 0; 1220 np->nfile.fd = 0; 1247 if (fd != '\0') 1248 np->nfile.fd = digit_val(fd);
|
H A D | redir.c | 112 int fd; local 130 fd = n->nfile.fd; 133 n->ndup.dupfd == fd) 136 if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) { 139 if ((i = fcntl(fd, F_DUPFD, 10)) == -1) { 150 error("%d: %s", fd, strerror(errno)); 155 sv->renamed[fd] = i; 156 close(fd); 160 close(fd); 177 int fd = redir->nfile.fd; local [all...] |
H A D | show.c | 151 if (np->nfile.fd != dftfd) 152 fprintf(fp, "%d", np->nfile.fd);
|
/system/core/toolbox/ |
H A D | alarm.c | 75 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 D | cat.c | 189 int fd; local 191 fd = fileno(stdin); 196 fd = fileno(stdin); 199 fd = open(*argv, O_RDONLY|O_NONBLOCK, 0); 200 if (fd < 0) 203 if (fstat(fd, &st) == -1) { 204 close(fd); 208 close(fd); 213 else if ((fd = open(*argv, O_RDONLY, 0)) < 0) { 223 raw_cat(fd); [all...] |
H A D | date.c | 16 int fd; local 37 fd = open("/dev/alarm", O_RDWR); 40 ioctl(fd, ANDROID_ALARM_SET_RTC, &ts); 52 int fd; local 118 fd = open("/dev/alarm", O_RDWR); 121 res = ioctl(fd, ANDROID_ALARM_SET_RTC, &ts);
|
H A D | dd.c | 159 in.fd = STDIN_FILENO; 161 in.fd = open(in.name, O_RDONLY, 0); 162 if (in.fd < 0) { 169 /* Ensure in.fd is outside the stdio descriptor range */ 170 in.fd = redup_clean_fd(in.fd); 184 out.fd = STDOUT_FILENO; 189 out.fd = open(out.name, O_RDWR | OFLAGS, DEFFILEMODE); 195 if (out.fd < 0) { 196 out.fd 272 redup_clean_fd(int fd) argument 566 bwrite(int fd, const void *buf, size_t len) argument [all...] |
H A D | dd.h | 55 int fd; /* file descriptor */ member in struct:__anon476
|
H A D | getevent.c | 43 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...] |
/system/core/toolbox/cp/ |
H A D | utils.c | 313 /* set the mod/access times now after close of the fd */ 376 * in the stat structure. If fd is zero, also call set_utimes() to set 377 * the mod/access times. If fd is non-zero, the caller must do a utimes 378 * itself after close(fd). 381 setfile(struct stat *fs, int fd) argument 395 if (fd ? fchown(fd, fs->st_uid, fs->st_gid) : 404 if (fd ? fchmod(fd, fs->st_mode) : chmod(to.p_path, fs->st_mode)) { 406 if (fd [all...] |
/system/core/toolbox/grep/ |
H A D | file.c | 107 if (lseek(f->fd, 0, SEEK_SET) == -1) 109 nr = read(f->fd, buffer, MAXBUFSIZ); 117 nr = read(f->fd, buffer, MAXBUFSIZ); 207 (gzbufdesc = gzdopen(f->fd, "r")) == NULL) 211 (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) 226 close(f->fd); 244 f->fd = STDIN_FILENO; 245 } else if ((f->fd = open(path, O_RDONLY)) == -1) { 260 close(f->fd);
|
H A D | grep.h | 89 int fd; member in struct:file
|