]> git.hungrycats.org Git - bees/commit
lib: gather shared helper functions
authorZygo Blaxell <bees@furryterror.org>
Sat, 14 Mar 2026 08:37:20 +0000 (04:37 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sun, 30 Aug 2026 23:48:46 +0000 (19:48 -0400)
commitf8610fcd92fadeaebe26210b40b81635b27fec02
tree421570d4c29d21b2493ccaea44d42df24e592003
parentee65e8bd53f2a6e090f7dbe88d3a9820fd5a9e7c
lib: gather shared helper functions

Extract process-neutral helpers from bees-util.cc, bees-roots.cc, and
bees-trace.cc into a new bees-lib.cc so test binaries can link against
them without pulling in bees.cc (which contains main()).

Functions moved:
  pretty(), format_time(), exception_check(),
  bees_openat(), bees_openat2(),
  bees_readahead_check(), bees_readahead_nolock(),
  bees_readahead_pair(), bees_readahead(), bees_unreadahead(),
  bees_throttle() and bees_throttle_factor.

Assisted-by: Claude-Code:claude-opus-4-7
Assisted-by: Claude-Code:claude-sonnet-4-6
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/Makefile
src/bees-lib.cc [new file with mode: 0644]
src/bees-lib.h [new file with mode: 0644]
src/bees-roots.cc
src/bees-trace.cc
src/bees-util.cc
src/bees.h