]> err.no Git - util-linux/commitdiff
cfdisk: accept yes/no as fallback
authorMatthias Koenig <mkoenig@suse.de>
Thu, 6 Nov 2008 14:49:30 +0000 (15:49 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 12 Dec 2008 11:27:48 +0000 (12:27 +0100)
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 <mkoenig@suse.de>
fdisk/cfdisk.c

index 9d32a1908d52404b41a8e20bfc76167b5cf67da9..04f4b604c1c22f23326d57b2afeb13c07129d6a9 100644 (file)
@@ -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'"));