From 4d6853243d234a9da34367e6753847b756d52a58 Mon Sep 17 00:00:00 2001 From: Matthias Koenig Date: Thu, 6 Nov 2008 15:49:30 +0100 Subject: [PATCH] cfdisk: accept yes/no as fallback Accept "yes" or "no" as fallback in case the question has not been translated. [kzak@redhat.com: note that rpmatch(3) looks at only the first character of response, but we need have to check the full yes/no string.] Signed-off-by: Matthias Koenig --- fdisk/cfdisk.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c index 9d32a190..04f4b604 100644 --- a/fdisk/cfdisk.c +++ b/fdisk/cfdisk.c @@ -1877,10 +1877,12 @@ write_part_table(void) { clear_warning(); if (len == GS_ESCAPE) return; - else if (strcasecmp(response, _("no")) == 0) { + else if (strcasecmp(response, _("no")) == 0 || + strcasecmp(response, "no") == 0) { print_warning(_("Did not write partition table to disk")); return; - } else if (strcasecmp(response, _("yes")) == 0) + } else if (strcasecmp(response, _("yes")) == 0 || + strcasecmp(response, "yes") == 0) done = TRUE; else print_warning(_("Please enter `yes' or `no'")); -- 2.39.5