|
|
a2a4bc |
From 0e1bff5983c675544e79ee9e449e597f397c15b0 Mon Sep 17 00:00:00 2001
|
|
|
a2a4bc |
From: Theodore Ts'o <tytso@mit.edu>
|
|
|
a2a4bc |
Date: Mon, 27 May 2019 19:36:15 -0400
|
|
|
a2a4bc |
Subject: [PATCH] mke2fs: accept the english yes character to the proceed
|
|
|
a2a4bc |
question
|
|
|
a2a4bc |
|
|
|
a2a4bc |
In some cases if the translation file is missing some translations,
|
|
|
a2a4bc |
mke2fs can end up printing an English message, e.g.:
|
|
|
a2a4bc |
|
|
|
a2a4bc |
% LANG=it_IT.UTF-8 ./mke2fs /tmp/foo.img 8M
|
|
|
a2a4bc |
mke2fs 1.45.1 (12-May-2019)
|
|
|
a2a4bc |
/tmp/foo.img contiene un file system ext4
|
|
|
a2a4bc |
created on Mon May 27 19:35:48 2019
|
|
|
a2a4bc |
Proceed anyway? (y,N)
|
|
|
a2a4bc |
|
|
|
a2a4bc |
However, if there is a translation for string to match with "yY"
|
|
|
a2a4bc |
(e.g., to "sS" for Italian), then 'y' won't work. Fix this by falling
|
|
|
a2a4bc |
back to the english 'yY' characters.
|
|
|
a2a4bc |
|
|
|
a2a4bc |
Addresses-Debian-Bug: #907034
|
|
|
a2a4bc |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
|
a2a4bc |
---
|
|
|
a2a4bc |
misc/util.c | 5 ++++-
|
|
|
a2a4bc |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
a2a4bc |
|
|
|
a2a4bc |
diff --git a/misc/util.c b/misc/util.c
|
|
|
a2a4bc |
index 1d33883d..77991589 100644
|
|
|
a2a4bc |
--- a/misc/util.c
|
|
|
a2a4bc |
+++ b/misc/util.c
|
|
|
a2a4bc |
@@ -91,6 +91,7 @@ void proceed_question(int delay)
|
|
|
a2a4bc |
{
|
|
|
a2a4bc |
char buf[256];
|
|
|
a2a4bc |
const char *short_yes = _("yY");
|
|
|
a2a4bc |
+ const char *english_yes = "yY";
|
|
|
a2a4bc |
|
|
|
a2a4bc |
fflush(stdout);
|
|
|
a2a4bc |
fflush(stderr);
|
|
|
a2a4bc |
@@ -108,7 +109,9 @@ void proceed_question(int delay)
|
|
|
a2a4bc |
fputs(_("Proceed anyway? (y,N) "), stdout);
|
|
|
a2a4bc |
buf[0] = 0;
|
|
|
a2a4bc |
if (!fgets(buf, sizeof(buf), stdin) ||
|
|
|
a2a4bc |
- strchr(short_yes, buf[0]) == 0) {
|
|
|
a2a4bc |
+ strchr(_("nN"), buf[0]) ||
|
|
|
a2a4bc |
+ !(strchr(short_yes, buf[0]) ||
|
|
|
a2a4bc |
+ strchr(english_yes, buf[0]))) {
|
|
|
a2a4bc |
putc('\n', stdout);
|
|
|
a2a4bc |
exit(1);
|
|
|
a2a4bc |
}
|
|
|
a2a4bc |
--
|
|
|
a2a4bc |
2.20.1
|
|
|
a2a4bc |
|