| 345 | } |
| 346 | |
| 347 | int |
| 348 | Store::write_config_data(int fd) const |
| 349 | { |
| 350 | for (unsigned i = 0; i < n_spans; i++) { |
| 351 | for (Span *sd = spans[i]; sd; sd = sd->link.next) { |
| 352 | char buf[PATH_NAME_MAX + 64]; |
| 353 | snprintf(buf, sizeof(buf), "%s %" PRId64 "\n", sd->pathname.get(), sd->blocks * static_cast<int64_t>(STORE_BLOCK_SIZE)); |
| 354 | if (ink_file_fd_writestring(fd, buf) == -1) { |
| 355 | return (-1); |
| 356 | } |
| 357 | } |
| 358 | } |
| 359 | return 0; |
| 360 | } |
| 361 | |
| 362 | const char * |
| 363 | Span::init(const char *path, int64_t size) |
no test coverage detected