Lines Matching refs:fd
38 int fd; member
47 .fd = -1,
55 .fd = -1,
76 int fd; member
141 read(dev->fd, &msg[0]->raw[msg[0]->len], in hvlog_read_dev()
205 dev->fd = open(path, O_RDONLY); in hvlog_open_dev()
206 if (dev->fd < 0) { in hvlog_open_dev()
221 close(dev->fd); in hvlog_open_dev()
235 if (dev->fd > 0) in hvlog_close_dev()
236 close(dev->fd); in hvlog_close_dev()
305 if (log->fd >= 0) { in new_log_file()
308 close(log->fd); in new_log_file()
309 log->fd = -1; in new_log_file()
318 log->fd = open(file_name, O_RDWR | O_CREAT | O_TRUNC, 0666); in new_log_file()
319 if (log->fd < 0) { in new_log_file()
343 ret = write(log->fd, buf, len); in write_log_file()