HomeFreeBSD

daemon: move variables into struct daemon_state

Description

daemon: move variables into struct daemon_state

The fact that most of the daemon's state is stored on the stack
of the main() makes it hard to split the logic smaller chunks.
Which in turn leads to huge main func that does a a lot of things.
struct log_params existed because some variables need to be passed
into other functions together.

This change renames struct log_params into daemon_state
and moves the rest of the variables into it. This is a necessary
preparation step for further refactroing.

Reviewed by: imp

(cherry picked from commit 298a392ec31819c8440974eeb47dfed48568fd5e)

Details

Provenance
ihor_antonovs.familyAuthored on Mar 12 2023, 4:07 PM
kevansCommitted on Apr 9 2023, 10:49 PM
Parents
rG85e32e957fcc: Bump __FreeBSD_version for llvm 15.0.7 merge
Branches
Unknown
Tags
Unknown