| 7091 | static int g_agent_uninstall_errors = 0; |
| 7092 | |
| 7093 | static void plan_record(const char *agent, const char *kind, const char *path) { |
| 7094 | if (!g_install_plan || !path || !path[0]) { |
| 7095 | return; |
| 7096 | } |
| 7097 | cbm_install_plan_t *pl = g_install_plan; |
| 7098 | if (pl->count >= pl->cap) { |
| 7099 | int ncap = pl->cap ? pl->cap * 2 : CLI_BUF_16; |
| 7100 | cbm_plan_entry_t *ni = realloc(pl->items, (size_t)ncap * sizeof(*ni)); |
| 7101 | if (!ni) { |
| 7102 | return; |
| 7103 | } |
| 7104 | pl->items = ni; |
| 7105 | pl->cap = ncap; |
| 7106 | } |
| 7107 | cbm_plan_entry_t *e = &pl->items[pl->count++]; |
| 7108 | snprintf(e->agent, sizeof(e->agent), "%s", agent); |
| 7109 | snprintf(e->kind, sizeof(e->kind), "%s", kind); |
| 7110 | snprintf(e->path, sizeof(e->path), "%s", path); |
| 7111 | } |
| 7112 | |
| 7113 | static void record_agent_config_error(bool uninstalling, const char *agent, const char *operation, |
| 7114 | const char *path) { |
no outgoing calls
no test coverage detected