MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / posix_log_refresh_locked

Function posix_log_refresh_locked

src/daemon/service.c:577–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577static bool posix_log_refresh_locked(const posix_log_path_t *path, int fd,
578 struct stat *status_out) {
579 struct stat current;
580 struct stat by_path;
581 if (!fd_regular_current_user(fd, &current) || current.st_size < 0 ||
582 fstatat(path->dir_fd, path->base, &by_path, AT_SYMLINK_NOFOLLOW) != 0 ||
583 !S_ISREG(by_path.st_mode) || current.st_dev != by_path.st_dev ||
584 current.st_ino != by_path.st_ino) {
585 return false;
586 }
587 *status_out = current;
588 return true;
589}
590
591static bool posix_log_append(const char *log_path, const char *record, size_t record_length,
592 size_t cap_bytes) {

Callers 1

posix_log_appendFunction · 0.85

Calls 1

fd_regular_current_userFunction · 0.85

Tested by

no test coverage detected