xfs
[Top] [All Lists]

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

To: Bill Kendall <wkendall@xxxxxxx>
Subject: Re: [PATCH v2] xfsdump: handle Ctrl-D during prompts
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 14 Nov 2011 05:29:58 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1320951342-15477-1-git-send-email-wkendall@xxxxxxx>
References: <1320951342-15477-1-git-send-email-wkendall@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Nov 10, 2011 at 12:55:42PM -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 behave like other interactive
> commands (xfs_db, bash, parted, ...) with respect to Ctrl-D.
> If Ctrl-D precedes any input, an empty string is returned.
> If Ctrl-D follows some input, it is ignored and xfsdump will
> continue to wait for more input.
> 
> Signed-off-by: Bill Kendall <wkendall@xxxxxxx>

Looks good, I'll put this in during the next round of userspace updates.

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