Lines Matching refs:io
350 struct io io; in filename__read_str() local
354 io.fd = open(filename, O_RDONLY); in filename__read_str()
355 if (io.fd < 0) in filename__read_str()
357 io__init(&io, io.fd, bf, sizeof(bf)); in filename__read_str()
359 err = io__getdelim(&io, buf, sizep, /*delim=*/-1); in filename__read_str()
365 close(io.fd); in filename__read_str()
450 struct io io; in sysfs__read_bool() local
460 io.fd = open(path, O_RDONLY); in sysfs__read_bool()
461 if (io.fd < 0) in sysfs__read_bool()
464 io__init(&io, io.fd, bf, sizeof(bf)); in sysfs__read_bool()
465 switch (io__get_char(&io)) { in sysfs__read_bool()
479 close(io.fd); in sysfs__read_bool()