diff options
author | Thomas Haller <thaller@redhat.com> | 2015-01-10 18:43:10 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-03-03 11:13:51 +0100 |
commit | 887a1ab397052b0eac16db9b02738863dda419b9 (patch) | |
tree | ffd53b64e517840be9d9da28c5b1b22c3e9ad455 /src | |
parent | 7d440b700688f81f6e3f54b3220930131ade2d1b (diff) | |
download | NetworkManager-887a1ab397052b0eac16db9b02738863dda419b9.tar.gz |
dhcp: add systemd's path-util.c for path_kill_slashes()
tempfn_xxxxxx() now uses path_kill_slashes(). Add path-util.c
from systemd source to provide it.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/dhcp-manager/systemd-dhcp/src/shared/path-util.c | 8 | ||||
-rw-r--r-- | src/dhcp-manager/systemd-dhcp/src/shared/path-util.h | 2 | ||||
-rw-r--r-- | src/dhcp-manager/systemd-dhcp/src/shared/util.c | 2 |
4 files changed, 14 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index f51d57da28..c71dc9ad7e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -99,6 +99,8 @@ libsystemd_dhcp_la_SOURCES = \ dhcp-manager/systemd-dhcp/src/shared/log.h \ dhcp-manager/systemd-dhcp/src/shared/fileio.h \ dhcp-manager/systemd-dhcp/src/shared/fileio.c \ + dhcp-manager/systemd-dhcp/src/shared/path-util.c \ + dhcp-manager/systemd-dhcp/src/shared/path-util.h \ dhcp-manager/systemd-dhcp/src/shared/strv.h \ dhcp-manager/systemd-dhcp/src/shared/strv.c \ dhcp-manager/systemd-dhcp/src/shared/unaligned.h \ diff --git a/src/dhcp-manager/systemd-dhcp/src/shared/path-util.c b/src/dhcp-manager/systemd-dhcp/src/shared/path-util.c index 12d1ec321f..003a790db3 100644 --- a/src/dhcp-manager/systemd-dhcp/src/shared/path-util.c +++ b/src/dhcp-manager/systemd-dhcp/src/shared/path-util.c @@ -19,6 +19,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "nm-sd-adapt.h" + +#if 0 /* NM_IGNORED */ #include <string.h> #include <unistd.h> #include <errno.h> @@ -31,7 +34,9 @@ #include "util.h" #include "log.h" #include "strv.h" +#endif /* NM_IGNORED */ #include "path-util.h" +#if 0 /* NM_IGNORED */ #include "missing.h" bool path_is_absolute(const char *p) { @@ -331,6 +336,7 @@ char **path_strv_resolve_uniq(char **l, const char *prefix) { return strv_uniq(l); } +#endif /* NM_IGNORED */ char *path_kill_slashes(char *path) { char *f, *t; @@ -367,6 +373,7 @@ char *path_kill_slashes(char *path) { return path; } +#if 0 /* NM_IGNORED */ char* path_startswith(const char *path, const char *prefix) { assert(path); assert(prefix); @@ -684,3 +691,4 @@ int fsck_exists(const char *fstype) { return 0; } +#endif /* NM_IGNORED */ diff --git a/src/dhcp-manager/systemd-dhcp/src/shared/path-util.h b/src/dhcp-manager/systemd-dhcp/src/shared/path-util.h index bcf116ed3d..c754c60b7f 100644 --- a/src/dhcp-manager/systemd-dhcp/src/shared/path-util.h +++ b/src/dhcp-manager/systemd-dhcp/src/shared/path-util.h @@ -21,6 +21,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "nm-sd-adapt.h" + #include <stdbool.h> #include "macro.h" diff --git a/src/dhcp-manager/systemd-dhcp/src/shared/util.c b/src/dhcp-manager/systemd-dhcp/src/shared/util.c index 3ac18a7ef0..d1dc229689 100644 --- a/src/dhcp-manager/systemd-dhcp/src/shared/util.c +++ b/src/dhcp-manager/systemd-dhcp/src/shared/util.c @@ -85,7 +85,9 @@ #include "log.h" #include "strv.h" #include "mkdir.h" +#endif /* NM_IGNORED */ #include "path-util.h" +#if 0 /* NM_IGNORED */ #include "exit-status.h" #include "hashmap.h" #include "env-util.h" |