util: rename parse_usec() to parse_sec() sinds the default unit is seconds

Internally we store all time values in usec_t, however parse_usec()
actually was used mostly to parse values in seconds (unless explicit
units were specified to define a different unit). Hence, be clear about
this and name the function about what we pass into it, not what we get
out of it.
This commit is contained in:
Lennart Poettering
2013-04-03 20:12:57 +02:00
parent 574d5f2dfc
commit 7f602784de
16 changed files with 35 additions and 35 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ static int parse_one_option(const char *option) {
opt_type = CRYPT_PLAIN;
else if (startswith(option, "timeout=")) {
if (parse_usec(option+8, &opt_timeout) < 0) {
if (parse_sec(option+8, &opt_timeout) < 0) {
log_error("timeout= parse failure, ignoring.");
return 0;
}