From 63c9c90a61781d307adc007a3957db62efb2049d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 18 Dec 2022 10:38:56 +0100 Subject: [PATCH] =?UTF-8?q?module/disk-io:=20rename=20=E2=80=98interval?= =?UTF-8?q?=E2=80=99=20to=20=E2=80=98poll-interval=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ doc/yambar-modules-disk-io.5.scd | 4 ++-- modules/disk-io.c | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c243d0..e64acd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ ## Unreleased ### Added ### Changed + +* disk-io: `interval` renamed to `poll-interval` + + ### Deprecated ### Removed ### Fixed diff --git a/doc/yambar-modules-disk-io.5.scd b/doc/yambar-modules-disk-io.5.scd index 4def79f..77220d9 100644 --- a/doc/yambar-modules-disk-io.5.scd +++ b/doc/yambar-modules-disk-io.5.scd @@ -35,7 +35,7 @@ currently present in the machine. :[ *Type* :[ *Req* :< *Description* -| interval +| poll-interval : int : no : Refresh interval of disk's stats in ms (default=500). @@ -50,7 +50,7 @@ formatting in b/s, kb/s, mb/s, or gb/s, as appropriate. bar: left: - disk-io: - interval: 1000 + poll-interval: 1000 content: map: conditions: diff --git a/modules/disk-io.c b/modules/disk-io.c index 4ce665f..8609c44 100644 --- a/modules/disk-io.c +++ b/modules/disk-io.c @@ -310,7 +310,7 @@ disk_io_new(uint16_t interval, struct particle *label) static struct module * from_conf(const struct yml_node *node, struct conf_inherit inherited) { - const struct yml_node *interval = yml_get_value(node, "interval"); + const struct yml_node *interval = yml_get_value(node, "poll-interval"); const struct yml_node *c = yml_get_value(node, "content"); return disk_io_new( @@ -326,7 +326,7 @@ conf_verify_interval(keychain_t *chain, const struct yml_node *node) if (yml_value_as_int(node) < SMALLEST_INTERVAL) { LOG_ERR( - "%s: interval value cannot be less than %d ms", + "%s: poll-interval value cannot be less than %d ms", conf_err_prefix(chain, node), SMALLEST_INTERVAL); return false; } @@ -338,7 +338,7 @@ static bool verify_conf(keychain_t *chain, const struct yml_node *node) { static const struct attr_info attrs[] = { - {"interval", false, &conf_verify_interval}, + {"poll-interval", false, &conf_verify_interval}, MODULE_COMMON_ATTRS, };