| 7284 | static int g_agent_uninstall_errors = 0; |
| 7285 | |
| 7286 | static void plan_record(const char *agent, const char *kind, const char *path) { |
| 7287 | if (!g_install_plan || !path || !path[0]) { |
| 7288 | return; |
| 7289 | } |
| 7290 | cbm_install_plan_t *pl = g_install_plan; |
| 7291 | if (pl->count >= pl->cap) { |
| 7292 | int ncap = pl->cap ? pl->cap * 2 : CLI_BUF_16; |
| 7293 | cbm_plan_entry_t *ni = realloc(pl->items, (size_t)ncap * sizeof(*ni)); |
| 7294 | if (!ni) { |
| 7295 | return; |
| 7296 | } |
| 7297 | pl->items = ni; |
| 7298 | pl->cap = ncap; |
| 7299 | } |
| 7300 | cbm_plan_entry_t *e = &pl->items[pl->count++]; |
| 7301 | snprintf(e->agent, sizeof(e->agent), "%s", agent); |
| 7302 | snprintf(e->kind, sizeof(e->kind), "%s", kind); |
| 7303 | snprintf(e->path, sizeof(e->path), "%s", path); |
| 7304 | } |
| 7305 | |
| 7306 | static void record_agent_config_error(bool uninstalling, const char *agent, const char *operation, |
| 7307 | const char *path) { |
no outgoing calls
no test coverage detected