#include "sandbox.h" #include #include void sandbox_apply(struct s_sandboxenv *env) { apply_fs(env); } void prompt_sandbox(struct s_sandboxenv *env) { char *c = NULL; size_t size; do { if (c) free(c); c = NULL; printf("Apply (a) / Cancel (c) changes ?\n"); getline(&c, &size, stdin); } while (strcmp("a\n", c) && strcmp("c\n", c)); if (*c == 'c') return; sandbox_apply(env); }