Whamcloud - gitweb
e2fsck: make the "fs is mounted; continue?" prompt more paranoid
authorTheodore Ts'o <tytso@mit.edu>
Sun, 8 May 2011 03:14:06 +0000 (23:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 8 May 2011 03:14:06 +0000 (23:14 -0400)
commit1760d167b2c0f91069a8b6e4a8fef1a5bc0f9ed1
tree8a055eed2e00a4a166eb4b5efae28bace7ebd4d4
parent05950620a807621e57008acb54602287ad768785
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