[systemd-commits] 2 commits - src/shared TODO

Tom Gundersen tomegun at kemper.freedesktop.org
Thu Jan 30 08:25:02 PST 2014


 TODO                  |    2 +-
 src/shared/net-util.c |   11 +----------
 2 files changed, 2 insertions(+), 11 deletions(-)

New commits:
commit ba91431154ad7bac82ddf0a540ec1b40db62d782
Author: Tom Gundersen <teg at jklm.no>
Date:   Thu Jan 30 17:23:34 2014 +0100

    shared: net - use u32ctz to compute prefixlen

diff --git a/src/shared/net-util.c b/src/shared/net-util.c
index 630be18..ba21ae4 100644
--- a/src/shared/net-util.c
+++ b/src/shared/net-util.c
@@ -59,18 +59,9 @@ bool net_match_config(const struct ether_addr *match_mac,
 }
 
 unsigned net_netmask_to_prefixlen(const struct in_addr *addr) {
-        unsigned len = 0;
-        uint32_t mask;
-
         assert(addr);
 
-        mask = be32toh(addr->s_addr);
-        while (mask) {
-                len++;
-                mask = mask << 1;
-        }
-
-        return len;
+        return 32 - u32ctz(be32toh(addr->s_addr));
 }
 
 int config_parse_ifname(const char *unit,

commit 32216660c7f01bac69ee2ac924e53684a1f8d549
Author: Tom Gundersen <teg at jklm.no>
Date:   Thu Jan 30 16:46:27 2014 +0100

    TODO: update sd-rtnl section

diff --git a/TODO b/TODO
index e6e2a87..57e82ff 100644
--- a/TODO
+++ b/TODO
@@ -677,7 +677,7 @@ Features:
    - Check if Driver= is broken, or just my driver (bcma)
 
 * sd-rtnl:
-   - improve container support, and add support for entering containers when reading
+   - add support for exiting containers without reading them fully first
    - add support for more attribute types
 
 * networkd:



More information about the systemd-commits mailing list