diff options
author | Susant Sahani <ssahani@gmail.com> | 2015-11-03 21:59:42 +0530 |
---|---|---|
committer | Susant Sahani <ssahani@gmail.com> | 2015-11-03 21:59:42 +0530 |
commit | 1a14863e7e88a4694105071987dbafed27a263b2 (patch) | |
tree | 48eb5679aae3d870891f60576c467a61ed323b27 /src | |
parent | 87b8ce69f6684f698b699ce662c72de78ed43343 (diff) |
networkd: bridge prop convert to jiffies
Diffstat (limited to 'src')
-rw-r--r-- | src/network/networkd-netdev-bridge.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/network/networkd-netdev-bridge.c b/src/network/networkd-netdev-bridge.c index 2eeb86a683..57c58d83b4 100644 --- a/src/network/networkd-netdev-bridge.c +++ b/src/network/networkd-netdev-bridge.c @@ -72,20 +72,21 @@ static int netdev_bridge_post_create(NetDev *netdev, Link *link, sd_netlink_mess if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_INFO_DATA attribute: %m"); + /* convert to jiffes */ if (b->forward_delay > 0) { - r = sd_netlink_message_append_u32(req, IFLA_BR_FORWARD_DELAY, b->forward_delay / USEC_PER_SEC); + r = sd_netlink_message_append_u32(req, IFLA_BR_FORWARD_DELAY, usec_to_jiffies(b->forward_delay)); if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_FORWARD_DELAY attribute: %m"); } if (b->hello_time > 0) { - r = sd_netlink_message_append_u32(req, IFLA_BR_HELLO_TIME, b->hello_time / USEC_PER_SEC ); + r = sd_netlink_message_append_u32(req, IFLA_BR_HELLO_TIME, usec_to_jiffies(b->hello_time)); if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_HELLO_TIME attribute: %m"); } if (b->max_age > 0) { - r = sd_netlink_message_append_u32(req, IFLA_BR_MAX_AGE, b->max_age / USEC_PER_SEC); + r = sd_netlink_message_append_u32(req, IFLA_BR_MAX_AGE, usec_to_jiffies(b->max_age)); if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_BR_MAX_AGE attribute: %m"); } |