[PATCH 05/17] vipw: use rpmatch to yes/no question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 login-utils/vipw.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/login-utils/vipw.c b/login-utils/vipw.c
index c0ed0b3..992a3a3 100644
--- a/login-utils/vipw.c
+++ b/login-utils/vipw.c
@@ -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);
 		}
 	}
-- 
1.7.9.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux