| 233 | static struct command_result *do_clean(struct clean_info *cinfo); |
| 234 | |
| 235 | static struct clean_info *new_clean_info(const tal_t *ctx, |
| 236 | struct command *cmd) |
| 237 | { |
| 238 | struct clean_info *cinfo = tal(ctx, struct clean_info); |
| 239 | cinfo->cmd = cmd; |
| 240 | cinfo->cleanup_reqs_remaining = 0; |
| 241 | |
| 242 | for (enum subsystem_type i = 0; i < NUM_SUBSYSTEM_TYPES; i++) { |
| 243 | struct per_subsystem *ps = &cinfo->per_subsystem[i]; |
| 244 | ps->cinfo = cinfo; |
| 245 | ps->type = i; |
| 246 | |
| 247 | for (enum subsystem_variant j = 0; j < NUM_SUBSYSTEM_VARIANTS; j++) { |
| 248 | struct per_variant *pv = &ps->variants[j]; |
| 249 | pv->per_subsystem = ps; |
| 250 | pv->variant = j; |
| 251 | |
| 252 | pv->age = 0; |
| 253 | } |
| 254 | } |
| 255 | return cinfo; |
| 256 | } |
| 257 | |
| 258 | static u64 *total_cleaned(const struct subsystem_and_variant *sv) |
| 259 | { |
no outgoing calls
no test coverage detected