| 339 | static const char BOOTSTRAP_START_FAILURE_LOG_NAME[] = "cbm-daemon.start-failures.log"; |
| 340 | |
| 341 | bool cbm_daemon_bootstrap_log_directory(char *out, size_t capacity) { |
| 342 | if (!out || capacity == 0) { |
| 343 | return false; |
| 344 | } |
| 345 | out[0] = '\0'; |
| 346 | const char *cache = cbm_resolve_cache_dir(); |
| 347 | if (!cache || !cache[0]) { |
| 348 | return false; |
| 349 | } |
| 350 | int written = snprintf(out, capacity, "%s/logs", cache); |
| 351 | if (written <= 0 || (size_t)written >= capacity) { |
| 352 | out[0] = '\0'; |
| 353 | return false; |
| 354 | } |
| 355 | return true; |
| 356 | } |
| 357 | |
| 358 | /* One record field: the line format is tab-separated, so a tab or newline in |
| 359 | * a value (a path, in theory) becomes '?' rather than a parser ambiguity. */ |
no test coverage detected