From c5fcf6e47056a861fb53d4f3bedec68230f9a4e9 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 13 Nov 2016 01:29:28 +0100 Subject: [PATCH] networkd-wait-online: move to separate subdirectory Also clean up the header files a bit. --- Makefile.am | 10 +++++----- .../{networkd-wait-online-link.c => wait-online/link.c} | 4 +++- .../{networkd-wait-online-link.h => wait-online/link.h} | 5 +++-- .../{networkd-wait-online-manager.c => wait-online/manager.c} | 4 ++-- src/network/{networkd-wait-online.h => wait-online/manager.h} | 3 +-- .../{networkd-wait-online.c => wait-online/wait-online.c} | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) rename src/network/{networkd-wait-online-link.c => wait-online/link.c} (98%) rename src/network/{networkd-wait-online-link.h => wait-online/link.h} (95%) rename src/network/{networkd-wait-online-manager.c => wait-online/manager.c} (99%) rename src/network/{networkd-wait-online.h => wait-online/manager.h} (97%) rename src/network/{networkd-wait-online.c => wait-online/wait-online.c} (99%) diff --git a/Makefile.am b/Makefile.am index 82879a1..be4a28b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5684,11 +5684,11 @@ systemd_networkd_wait_online_CFLAGS = \ systemd_networkd_wait_online_SOURCES = \ src/libsystemd-network/network-internal.h \ - src/network/networkd-wait-online.h \ - src/network/networkd-wait-online-link.h \ - src/network/networkd-wait-online.c \ - src/network/networkd-wait-online-manager.c \ - src/network/networkd-wait-online-link.c + src/network/wait-online/link.h \ + src/network/wait-online/link.c \ + src/network/wait-online/manager.h \ + src/network/wait-online/manager.c \ + src/network/wait-online/wait-online.c systemd_networkd_wait_online_LDADD = \ libsystemd-network.la \ diff --git a/src/network/networkd-wait-online-link.c b/src/network/wait-online/link.c similarity index 98% rename from src/network/networkd-wait-online-link.c rename to src/network/wait-online/link.c index e63ba07..bd8578c 100644 --- a/src/network/networkd-wait-online-link.c +++ b/src/network/wait-online/link.c @@ -21,7 +21,9 @@ #include "sd-network.h" #include "alloc-util.h" -#include "networkd-wait-online-link.h" +#include "hashmap.h" +#include "link.h" +#include "manager.h" #include "string-util.h" int link_new(Manager *m, Link **ret, int ifindex, const char *ifname) { diff --git a/src/network/networkd-wait-online-link.h b/src/network/wait-online/link.h similarity index 95% rename from src/network/networkd-wait-online-link.h rename to src/network/wait-online/link.h index dc35085..c846e60 100644 --- a/src/network/networkd-wait-online-link.h +++ b/src/network/wait-online/link.h @@ -20,9 +20,10 @@ along with systemd; If not, see . ***/ -typedef struct Link Link; +#include "sd-netlink.h" -#include "networkd-wait-online.h" +typedef struct Link Link; +typedef struct Manager Manager; struct Link { Manager *manager; diff --git a/src/network/networkd-wait-online-manager.c b/src/network/wait-online/manager.c similarity index 99% rename from src/network/networkd-wait-online-manager.c rename to src/network/wait-online/manager.c index 725b331..d51b0a5 100644 --- a/src/network/networkd-wait-online-manager.c +++ b/src/network/wait-online/manager.c @@ -22,10 +22,10 @@ #include #include "alloc-util.h" +#include "link.h" +#include "manager.h" #include "netlink-util.h" #include "network-internal.h" -#include "networkd-wait-online-link.h" -#include "networkd-wait-online.h" #include "time-util.h" #include "util.h" diff --git a/src/network/networkd-wait-online.h b/src/network/wait-online/manager.h similarity index 97% rename from src/network/networkd-wait-online.h rename to src/network/wait-online/manager.h index f91995c..052f6b9 100644 --- a/src/network/networkd-wait-online.h +++ b/src/network/wait-online/manager.h @@ -26,8 +26,7 @@ #include "hashmap.h" typedef struct Manager Manager; - -#include "networkd-wait-online-link.h" +typedef struct Link Link; struct Manager { Hashmap *links; diff --git a/src/network/networkd-wait-online.c b/src/network/wait-online/wait-online.c similarity index 99% rename from src/network/networkd-wait-online.c rename to src/network/wait-online/wait-online.c index 3220c4b..268cbdb 100644 --- a/src/network/networkd-wait-online.c +++ b/src/network/wait-online/wait-online.c @@ -22,7 +22,7 @@ #include "sd-daemon.h" -#include "networkd-wait-online.h" +#include "manager.h" #include "signal-util.h" #include "strv.h" -- 2.7.4