Lines Matching refs:len
67 size_t len; /* length of message raw string */ member
84 size_t write_log_file(struct hvlog_file * log, const char *buf, size_t len);
120 size_t len = 0; in hvlog_read_dev() local
135 memcpy(&msg[0]->raw[msg[0]->len], dev->entry_latch, in hvlog_read_dev()
141 read(dev->fd, &msg[0]->raw[msg[0]->len], in hvlog_read_dev()
147 p = strstr(&msg[0]->raw[msg[0]->len], "][seq="); in hvlog_read_dev()
165 &msg[0]->raw[msg[0]->len], in hvlog_read_dev()
180 len = strnlen(&msg[0]->raw[msg[0]->len], LOG_MSG_SIZE); in hvlog_read_dev()
181 msg[0]->len += len; in hvlog_read_dev()
182 } while (len == LOG_ELEMENT_SIZE && in hvlog_read_dev()
183 msg[0]->len < LOG_MSG_SIZE - LOG_ELEMENT_SIZE); in hvlog_read_dev()
185 if (!msg[0]->len) in hvlog_read_dev()
188 msg[0]->raw[msg[0]->len] = '\n'; in hvlog_read_dev()
189 msg[0]->raw[msg[0]->len + 1] = 0; in hvlog_read_dev()
190 msg[0]->len++; in hvlog_read_dev()
335 size_t write_log_file(struct hvlog_file * log, const char *buf, size_t len) in write_log_file() argument
339 if (len >= log->left_space) in write_log_file()
343 ret = write(log->fd, buf, len); in write_log_file()
376 write_log_file(&cur_log, msg->raw, msg->len); in cur_read_func()
576 write_log_file(&last_log, msg->raw, msg->len); in main()