]> git.ipfire.org Git - thirdparty/util-linux.git/commit - login-utils/chfn.c
chfn: rewrite prompt() to use strutils
authorSami Kerola <kerolasa@iki.fi>
Sun, 14 Dec 2014 11:37:03 +0000 (11:37 +0000)
committerSami Kerola <kerolasa@iki.fi>
Fri, 19 Dec 2014 09:11:03 +0000 (09:11 +0000)
commit5a57c00af0dec86997ce7b1c97812ec603b83263
tree665e79d3974cac448db25797e7df39e69189af1a
parent2401633559d89d178334dad1da64cd51584d77d5
chfn: rewrite prompt() to use strutils

The left and right white space trimming can be done with strutils.h
[lr]trim_whitespace() functions.

As a minor fix when user input exceeds maxium allowed gecos field length
the remaining characters in stdin are purged so that re-prompting works
correctly.

Additionally the prompt() is made to add message to check_gecos_string(),
so that there are less similar strings for translation project to deal.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/chfn.c