Sync OpenBSD patchset 927:

Allow the initial context on prompts to be set with the new -I option to
command-prompt. From Tiago Cunha.
This commit is contained in:
Tiago Cunha
2011-07-03 21:52:50 +00:00
parent ff7343c203
commit e097f0b4ee
5 changed files with 77 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/* $Id: cmd-confirm-before.c,v 1.13 2011-01-07 14:45:34 tcunha Exp $ */
/* $Id$ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@ -87,9 +87,8 @@ cmd_confirm_before_exec(struct cmd *self, struct cmd_ctx *ctx)
cdata = xmalloc(sizeof *cdata);
cdata->cmd = xstrdup(args->argv[0]);
cdata->c = c;
status_prompt_set(cdata->c, buf,
cmd_confirm_before_callback, cmd_confirm_before_free, cdata,
PROMPT_SINGLE);
status_prompt_set(cdata->c, buf, NULL, cmd_confirm_before_callback,
cmd_confirm_before_free, cdata, PROMPT_SINGLE);
xfree(buf);
return (1);