Whamcloud - gitweb
e2fsck: make the "fs is mounted; continue?" prompt more paranoid 22/1322/1
authorTheodore Ts'o <tytso@mit.edu>
Sun, 8 May 2011 03:14:06 +0000 (23:14 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 1 Sep 2011 22:54:56 +0000 (16:54 -0600)
commit117109b89a4baa514e7c7c2090b4226ffd69f933
tree3d750cb686def5c57e79bf642ecce52b1099d34f
parent8a3627a630c43c4cdd41e015e62b4fa5654ad3ac
e2fsck: make the "fs is mounted; continue?" prompt more paranoid

A user received the "file system is mounted; do you really want to
continue" prompt, and then instead of typing "n" for no, forgot that
he hadn't declined to continuation question, and typed the up-arrow
key, which in his locale, the 'A' in "^[[A" was interpreted as "yes",
and he lost data.

This was clearly the user's fault, but to make e2fsck a bit safer
against user stupidity/carelessness, we will change the "fs is
mounted; continue?" prompt to default to no, and treat the escape
character (along with the return and space characters, currently) as a
request for the default answer.

Addresses-Debian-Bug: #619859
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/unix.c
e2fsck/util.c