| 7197 | static int g_agent_uninstall_errors = 0; |
| 7198 | |
| 7199 | static void plan_record(const char *agent, const char *kind, const char *path) { |
| 7200 | if (!g_install_plan || !path || !path[0]) { |
| 7201 | return; |
| 7202 | } |
| 7203 | cbm_install_plan_t *pl = g_install_plan; |
| 7204 | if (pl->count >= pl->cap) { |
| 7205 | int ncap = pl->cap ? pl->cap * 2 : CLI_BUF_16; |
| 7206 | cbm_plan_entry_t *ni = realloc(pl->items, (size_t)ncap * sizeof(*ni)); |
| 7207 | if (!ni) { |
| 7208 | return; |
| 7209 | } |
| 7210 | pl->items = ni; |
| 7211 | pl->cap = ncap; |
| 7212 | } |
| 7213 | cbm_plan_entry_t *e = &pl->items[pl->count++]; |
| 7214 | snprintf(e->agent, sizeof(e->agent), "%s", agent); |
| 7215 | snprintf(e->kind, sizeof(e->kind), "%s", kind); |
| 7216 | snprintf(e->path, sizeof(e->path), "%s", path); |
| 7217 | } |
| 7218 | |
| 7219 | static void record_agent_config_error(bool uninstalling, const char *agent, const char *operation, |
| 7220 | const char *path) { |
no outgoing calls
no test coverage detected