projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21da610
)
bcachefs: Fix bch2_fsck_ask_yn()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 4 Jun 2023 22:08:56 +0000
(18:08 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:03 +0000
(17:10 -0400)
- getline() output includes a newline, without stripping that we were
just looping
- Make the prompt clearer
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/error.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/error.c
b/fs/bcachefs/error.c
index 545c55dabc277d341ee4e7c35343f83e9f734245..b08cd23dee00576640a0919b401d1c5729a1af61 100644
(file)
--- a/
fs/bcachefs/error.c
+++ b/
fs/bcachefs/error.c
@@
-85,12
+85,13
@@
enum ask_yn bch2_fsck_ask_yn(void)
bool ret;
while (true) {
- fputs(" (y,n,
Y,N
) ", stdout);
+ fputs(" (y,n,
or Y,N for all errors of this type
) ", stdout);
fflush(stdout);
if (getline(&buf, &buflen, stdin) < 0)
die("error reading from standard input");
+ strim(buf);
if (strlen(buf) != 1)
continue;