xfs
[Top] [All Lists]

Re: [PATCH] xfsdump: handle Ctrl-D during prompts

To: Bill Kendall <wkendall@xxxxxxx>
Subject: Re: [PATCH] xfsdump: handle Ctrl-D during prompts
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 10 Nov 2011 03:31:14 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1320876946-27643-1-git-send-email-wkendall@xxxxxxx>
References: <1320876946-27643-1-git-send-email-wkendall@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Nov 09, 2011 at 04:15:46PM -0600, Bill Kendall wrote:
> xfsdump does not currently handle Ctrl-D well during a dialog
> prompt. If some text is entered followed by Ctrl-D, an assert
> will trip because xfsdump expects a new-line character at the
> end of the user's input (or if asserts are disabled, the last
> character the user entered will be dropped).
> 
> If Ctrl-D is entered without entering any response, some dialog
> callers (e.g., tree_subtree_inter()) will abort because they
> receive an unexpected response code.
> 
> This patch changes xfsdump to treat Ctrl-D as if the user hit
> enter. User input (if any) will be passed back to the caller,
> and a new line will be echoed to the terminal.

Shouldn't Ctrl+D cause us to ignore the input that was added
before?  That's what I would expect from command line applications.

<Prev in Thread] Current Thread [Next in Thread>