diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-02 20:38:16 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-03 20:12:57 +0200 |
commit | 7f602784de4fd378120e8ebfe6d830862b9cae03 (patch) | |
tree | e10d14f7b9a3154097b5f2cc2cc92ff0028101ed /src/journal | |
parent | 574d5f2dfc25226afc718aa5ba1a145fe5cad221 (diff) |
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.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journalctl.c | 2 | ||||
-rw-r--r-- | src/journal/journald-gperf.gperf | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 8661e5e33a..642e20d43f 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -355,7 +355,7 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_INTERVAL: - r = parse_usec(optarg, &arg_interval); + r = parse_sec(optarg, &arg_interval); if (r < 0 || arg_interval <= 0) { log_error("Failed to parse sealing key change interval: %s", optarg); return -EINVAL; diff --git a/src/journal/journald-gperf.gperf b/src/journal/journald-gperf.gperf index 57b45f9232..2ecba3bd0e 100644 --- a/src/journal/journald-gperf.gperf +++ b/src/journal/journald-gperf.gperf @@ -18,8 +18,8 @@ struct ConfigPerfItem; Journal.Storage, config_parse_storage, 0, offsetof(Server, storage) Journal.Compress, config_parse_bool, 0, offsetof(Server, compress) Journal.Seal, config_parse_bool, 0, offsetof(Server, seal) -Journal.SyncIntervalSec, config_parse_usec, 0, offsetof(Server, sync_interval_usec) -Journal.RateLimitInterval, config_parse_usec, 0, offsetof(Server, rate_limit_interval) +Journal.SyncIntervalSec, config_parse_sec, 0, offsetof(Server, sync_interval_usec) +Journal.RateLimitInterval, config_parse_sec, 0, offsetof(Server, rate_limit_interval) Journal.RateLimitBurst, config_parse_unsigned, 0, offsetof(Server, rate_limit_burst) Journal.SystemMaxUse, config_parse_bytes_off, 0, offsetof(Server, system_metrics.max_use) Journal.SystemMaxFileSize, config_parse_bytes_off, 0, offsetof(Server, system_metrics.max_size) @@ -27,8 +27,8 @@ Journal.SystemKeepFree, config_parse_bytes_off, 0, offsetof(Server, system_m Journal.RuntimeMaxUse, config_parse_bytes_off, 0, offsetof(Server, runtime_metrics.max_use) Journal.RuntimeMaxFileSize, config_parse_bytes_off, 0, offsetof(Server, runtime_metrics.max_size) Journal.RuntimeKeepFree, config_parse_bytes_off, 0, offsetof(Server, runtime_metrics.keep_free) -Journal.MaxRetentionSec, config_parse_usec, 0, offsetof(Server, max_retention_usec) -Journal.MaxFileSec, config_parse_usec, 0, offsetof(Server, max_file_usec) +Journal.MaxRetentionSec, config_parse_sec, 0, offsetof(Server, max_retention_usec) +Journal.MaxFileSec, config_parse_sec, 0, offsetof(Server, max_file_usec) Journal.ForwardToSyslog, config_parse_bool, 0, offsetof(Server, forward_to_syslog) Journal.ForwardToKMsg, config_parse_bool, 0, offsetof(Server, forward_to_kmsg) Journal.ForwardToConsole, config_parse_bool, 0, offsetof(Server, forward_to_console) |