return log_oom();
bool wipe;
- r = prompt_loop_yes_no(question, /* def= */ false, &wipe);
+ r = prompt_loop_yes_no(question, "no", /* def= */ false, &wipe);
if (r < 0)
return r;
return parse_boolean(name) >= 0;
}
-int prompt_loop_yes_no(const char *question, bool def, bool *ret) {
+int prompt_loop_yes_no(const char *question, const char *prefill, bool def, bool *ret) {
int r;
assert(question);
assert(ret);
- char **l = STRV_MAKE("yes", "no");
+ char **menu = STRV_MAKE("yes", "no");
_cleanup_free_ char *reply = NULL;
r = prompt_loop(question,
GLYPH_WARNING_SIGN,
- /* prefill= */ def ? "yes" : "no",
- /* menu= */ l,
+ /* prefill= */ prefill,
+ /* menu= */ menu,
/* accepted= */ NULL,
/* ellipsize_percentage= */ 20,
/* n_columns= */ 2,
PromptFlags flags,
char **ret);
-int prompt_loop_yes_no(const char *question, bool def, bool *ret);
+int prompt_loop_yes_no(const char *question, const char *prefill, bool def, bool *ret);
int chrome_show(const char *top, const char *bottom);
void chrome_hide(void);