Lines Matching refs:io
259 getfdtype(IO *io)
264 if (fstat(io->fd, &sb) == -1)
265 err(1, "%s", io->name);
267 io->flags |= ISTRUNC;
269 if (ioctl(io->fd, FIODTYPE, &type) == -1) {
270 err(1, "%s", io->name);
273 io->flags |= ISTAPE;
275 io->flags |= ISSEEK;
277 io->flags |= ISCHR;
282 if (lseek(io->fd, (off_t)0, SEEK_CUR) == -1 && errno == ESPIPE)
283 io->flags |= ISPIPE;
285 io->flags |= ISSEEK;