[systemd-commits] src/core src/libsystemd src/network src/nspawn src/udev

Lennart Poettering lennart at kemper.freedesktop.org
Thu Feb 13 03:45:44 CET 2014


 src/core/loopback-setup.c              |    6 +++---
 src/libsystemd/sd-rtnl/rtnl-internal.h |    2 +-
 src/libsystemd/sd-rtnl/rtnl-util.c     |    4 ++--
 src/libsystemd/sd-rtnl/rtnl-util.h     |    4 ++--
 src/libsystemd/sd-rtnl/sd-rtnl.c       |    8 ++++----
 src/libsystemd/sd-rtnl/test-rtnl.c     |   20 ++++++++++----------
 src/network/networkd-address.c         |    4 ++--
 src/network/networkd-link.c            |    6 +++---
 src/network/networkd-netdev.c          |    4 ++--
 src/network/networkd-route.c           |    2 +-
 src/nspawn/nspawn.c                    |    4 ++--
 src/udev/udev-event.c                  |    2 +-
 12 files changed, 33 insertions(+), 33 deletions(-)

New commits:
commit cf6a8911738fe2635a5210769d5348b05b166691
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Feb 13 03:44:14 2014 +0100

    rtnl: drop "sd_" prefix from cleanup macros
    
    The "sd_" prefix is supposed to be used on exported symbols only, and
    not in the middle of names. Let's drop it from the cleanup macros hence,
    to make things simpler.
    
    The bus cleanup macros don't carry the "sd_" either, so this brings the
    APIs a bit nearer.

diff --git a/src/core/loopback-setup.c b/src/core/loopback-setup.c
index 9058b6f..e8c4630 100644
--- a/src/core/loopback-setup.c
+++ b/src/core/loopback-setup.c
@@ -48,7 +48,7 @@ static int pipe_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
 }
 
 static int add_addresses(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_address, int *counter) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *ipv4 = NULL, *ipv6 = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *ipv4 = NULL, *ipv6 = NULL;
         int r;
 
         r = sd_rtnl_message_addr_new(RTM_NEWADDR, if_loopback, AF_INET, &ipv4);
@@ -110,7 +110,7 @@ static int add_addresses(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_ad
 }
 
 static int start_interface(sd_rtnl *rtnl, int if_loopback, struct in_addr *ipv4_address, int *counter) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         r = sd_rtnl_message_link_new(RTM_SETLINK, if_loopback, &req);
@@ -157,7 +157,7 @@ static int check_loopback(void) {
 }
 
 int loopback_setup(void) {
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
         int r, if_loopback, counter = 0;
         bool eperm = false;
         struct in_addr ipv4_address;
diff --git a/src/libsystemd/sd-rtnl/rtnl-internal.h b/src/libsystemd/sd-rtnl/rtnl-internal.h
index 4bfcb83..28c7b96 100644
--- a/src/libsystemd/sd-rtnl/rtnl-internal.h
+++ b/src/libsystemd/sd-rtnl/rtnl-internal.h
@@ -103,4 +103,4 @@ int socket_read_message(sd_rtnl *nl, sd_rtnl_message **ret);
 
 /* Make sure callbacks don't destroy the rtnl connection */
 #define RTNL_DONT_DESTROY(rtnl) \
-        _cleanup_sd_rtnl_unref_ _unused_ sd_rtnl *_dont_destroy_##rtnl = sd_rtnl_ref(rtnl)
+        _cleanup_rtnl_unref_ _unused_ sd_rtnl *_dont_destroy_##rtnl = sd_rtnl_ref(rtnl)
diff --git a/src/libsystemd/sd-rtnl/rtnl-util.c b/src/libsystemd/sd-rtnl/rtnl-util.c
index 29250c9..ba4fab0 100644
--- a/src/libsystemd/sd-rtnl/rtnl-util.c
+++ b/src/libsystemd/sd-rtnl/rtnl-util.c
@@ -28,7 +28,7 @@
 #include "rtnl-internal.h"
 
 int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *message = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *message = NULL;
         int r;
 
         assert(rtnl);
@@ -52,7 +52,7 @@ int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name) {
 
 int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias,
                              const struct ether_addr *mac, unsigned mtu) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *message = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *message = NULL;
         bool need_update = false;
         int r;
 
diff --git a/src/libsystemd/sd-rtnl/rtnl-util.h b/src/libsystemd/sd-rtnl/rtnl-util.h
index d590ca7..33746af 100644
--- a/src/libsystemd/sd-rtnl/rtnl-util.h
+++ b/src/libsystemd/sd-rtnl/rtnl-util.h
@@ -42,5 +42,5 @@ int rtnl_message_link_get_ifname(sd_rtnl_message *m, const char **ret);
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl*, sd_rtnl_unref);
 DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl_message*, sd_rtnl_message_unref);
 
-#define _cleanup_sd_rtnl_unref_ _cleanup_(sd_rtnl_unrefp)
-#define _cleanup_sd_rtnl_message_unref_ _cleanup_(sd_rtnl_message_unrefp)
+#define _cleanup_rtnl_unref_ _cleanup_(sd_rtnl_unrefp)
+#define _cleanup_rtnl_message_unref_ _cleanup_(sd_rtnl_message_unrefp)
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
index 04fcb3d..0588965 100644
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
@@ -71,7 +71,7 @@ static bool rtnl_pid_changed(sd_rtnl *rtnl) {
 }
 
 int sd_rtnl_open(uint32_t groups, sd_rtnl **ret) {
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
         socklen_t addrlen;
         int r;
 
@@ -241,7 +241,7 @@ static int dispatch_wqueue(sd_rtnl *rtnl) {
 }
 
 static int process_timeout(sd_rtnl *rtnl) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
         struct reply_callback *c;
         usec_t n;
         int r;
@@ -315,7 +315,7 @@ static int process_match(sd_rtnl *rtnl, sd_rtnl_message *m) {
 }
 
 static int process_running(sd_rtnl *rtnl, sd_rtnl_message **ret) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
         int r;
 
         assert(rtnl);
@@ -557,7 +557,7 @@ int sd_rtnl_call(sd_rtnl *nl,
 
         for (;;) {
                 usec_t left;
-                _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *incoming = NULL;
+                _cleanup_rtnl_message_unref_ sd_rtnl_message *incoming = NULL;
 
                 if (!room) {
                         sd_rtnl_message **q;
diff --git a/src/libsystemd/sd-rtnl/test-rtnl.c b/src/libsystemd/sd-rtnl/test-rtnl.c
index 2401514..bc88300 100644
--- a/src/libsystemd/sd-rtnl/test-rtnl.c
+++ b/src/libsystemd/sd-rtnl/test-rtnl.c
@@ -30,7 +30,7 @@
 #include "event-util.h"
 
 static void test_link_configure(sd_rtnl *rtnl, int ifindex) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *message;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *message;
         uint16_t type;
         const char *mac = "98:fe:94:3f:c6:18", *name = "test";
         unsigned int mtu = 1450;
@@ -130,7 +130,7 @@ static void test_link_get(sd_rtnl *rtnl, int ifindex) {
 }
 
 static void test_route(void) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req;
         struct in_addr addr;
         uint32_t index = 2;
         uint16_t type;
@@ -208,8 +208,8 @@ static int link_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
 
 static void test_event_loop(int ifindex) {
         _cleanup_event_unref_ sd_event *event = NULL;
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
         char *ifname;
 
         ifname = strdup("lo2");
@@ -240,8 +240,8 @@ static int pipe_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
 }
 
 static void test_async(int ifindex) {
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m = NULL, *r = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL, *r = NULL;
         uint32_t serial;
         char *ifname;
 
@@ -259,8 +259,8 @@ static void test_async(int ifindex) {
 }
 
 static void test_pipe(int ifindex) {
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m1 = NULL, *m2 = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *m1 = NULL, *m2 = NULL;
         int counter = 0;
 
         assert(sd_rtnl_open(0, &rtnl) >= 0);
@@ -281,7 +281,7 @@ static void test_pipe(int ifindex) {
 }
 
 static void test_container(void) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
         uint16_t type;
         void *data;
 
@@ -323,7 +323,7 @@ static void test_container(void) {
 }
 
 static void test_match(void) {
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
 
         assert(sd_rtnl_open(0, &rtnl) >= 0);
 
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index aa7927f..94e7a9c 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -95,7 +95,7 @@ void address_free(Address *address) {
 
 int address_drop(Address *address, Link *link,
                  sd_rtnl_message_handler_t callback) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         assert(address);
@@ -139,7 +139,7 @@ int address_drop(Address *address, Link *link,
 
 int address_configure(Address *address, Link *link,
                       sd_rtnl_message_handler_t callback) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         assert(address);
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 39c61d8..3ef7622 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -426,7 +426,7 @@ static int set_mtu_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
 }
 
 static int link_set_mtu(Link *link, uint32_t mtu) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         assert(link);
@@ -783,7 +783,7 @@ static int link_up_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
 }
 
 static int link_up(Link *link) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         assert(link);
@@ -950,7 +950,7 @@ static int link_get_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
 }
 
 static int link_get(Link *link) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         assert(link);
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index c9b9b2b..8c9fa62 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -84,7 +84,7 @@ static int netdev_enter_failed(NetDev *netdev) {
 }
 
 static int netdev_enslave_ready(NetDev *netdev, Link* link, sd_rtnl_message_handler_t callback) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         assert(netdev);
@@ -158,7 +158,7 @@ static int netdev_create_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userda
 }
 
 static int netdev_create(NetDev *netdev, Link *link, sd_rtnl_message_handler_t callback) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         const char *kind;
         int r;
 
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 29ee104..31d4177 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -96,7 +96,7 @@ void route_free(Route *route) {
 
 int route_configure(Route *route, Link *link,
                     sd_rtnl_message_handler_t callback) {
-        _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *req = NULL;
+        _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL;
         int r;
 
         assert(link);
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 160b50b..1437aa7 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1252,7 +1252,7 @@ static int reset_audit_loginuid(void) {
 }
 
 static int move_network_interfaces(pid_t pid) {
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
         char **i;
         int r;
 
@@ -1269,7 +1269,7 @@ static int move_network_interfaces(pid_t pid) {
         }
 
         STRV_FOREACH(i, arg_network_interfaces) {
-                _cleanup_sd_rtnl_message_unref_ sd_rtnl_message *m = NULL;
+                _cleanup_rtnl_message_unref_ sd_rtnl_message *m = NULL;
                 unsigned ifi;
 
                 ifi = if_nametoindex(*i);
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 228232b..c8e216c 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -748,7 +748,7 @@ out:
 static int rename_netif(struct udev_event *event)
 {
         struct udev_device *dev = event->dev;
-        _cleanup_sd_rtnl_unref_ sd_rtnl *rtnl = NULL;
+        _cleanup_rtnl_unref_ sd_rtnl *rtnl = NULL;
         char name[IFNAMSIZ];
         const char *oldname;
         int r;



More information about the systemd-commits mailing list