]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
vipw: use rpmatch to yes/no question
authorSami Kerola <kerolasa@iki.fi>
Tue, 28 Feb 2012 23:49:43 +0000 (00:49 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sun, 18 Mar 2012 13:28:04 +0000 (14:28 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/vipw.c

index c0ed0b3fb366cf74805d7c51346eb67968d0a2ae..992a3a3063643d7070e3c484049b9ff20da91d92 100644 (file)
@@ -347,11 +347,12 @@ int main(int argc, char *argv[])
                printf((program == VIGR)
                       ? _("You are using shadow groups on this system.\n")
                       : _("You are using shadow passwords on this system.\n"));
+               /* TRANSLATORS: this program uses for y and n rpmatch(3),
+                * which means they can be translated. */
                printf(_("Would you like to edit %s now [y/n]? "), orig_file);
 
-               /* EOF means no */
                if (fgets(response, sizeof(response), stdin)) {
-                       if (response[0] == 'y' || response[0] == 'Y')
+                       if (rpmatch(response) == 1)
                                edit_file(1);
                }
        }