1 diff -ur systemd-183.orig/src/shared/cgroup-util.c systemd-183/src/shared/cgroup-util.c
2 --- systemd-183.orig/src/shared/cgroup-util.c 2012-05-08 13:54:22.000000000 +0200
3 +++ systemd-183/src/shared/cgroup-util.c 2012-05-29 12:17:52.837133271 +0200
8 - if (!path_is_absolute(path) ||
9 + if (!sd_path_is_absolute(path) ||
11 strchr(controller, ':') ||
12 strchr(controller, '/'))
13 diff -ur systemd-183.orig/src/shared/conf-parser.c systemd-183/src/shared/conf-parser.c
14 --- systemd-183.orig/src/shared/conf-parser.c 2012-05-08 13:54:22.000000000 +0200
15 +++ systemd-183/src/shared/conf-parser.c 2012-05-29 12:17:29.397134096 +0200
20 - if (!path_is_absolute(rvalue)) {
21 + if (!sd_path_is_absolute(rvalue)) {
22 log_error("[%s:%u] Not an absolute path, ignoring: %s", filename, line, rvalue);
29 - if (!path_is_absolute(n[k])) {
30 + if (!sd_path_is_absolute(n[k])) {
31 log_error("[%s:%u] Not an absolute path, ignoring: %s", filename, line, rvalue);
34 diff -ur systemd-183.orig/src/shared/install.c systemd-183/src/shared/install.c
35 --- systemd-183.orig/src/shared/install.c 2012-05-23 00:50:59.000000000 +0200
36 +++ systemd-183/src/shared/install.c 2012-05-29 12:17:43.047133614 +0200
39 /* Check if the symlink itself matches what we
41 - if (path_is_absolute(name))
42 + if (sd_path_is_absolute(name))
43 found_path = path_equal(p, name);
45 found_path = streq(de->d_name, name);
47 /* Check if what the symlink points to
48 * matches what we are looking for */
49 - if (path_is_absolute(name))
50 + if (sd_path_is_absolute(name))
51 found_dest = path_equal(dest, name);
53 found_dest = streq(path_get_file_name(dest), name);
56 fn = path_get_file_name(*i);
58 - if (!path_is_absolute(*i) ||
59 + if (!sd_path_is_absolute(*i) ||
60 !unit_name_is_valid_no_type(fn, true)) {
67 - if (path_is_absolute(name_or_path))
68 + if (sd_path_is_absolute(name_or_path))
69 return install_info_add(c, NULL, name_or_path);
71 return install_info_add(c, name_or_path, NULL);
72 diff -ur systemd-183.orig/src/shared/label.c systemd-183/src/shared/label.c
73 --- systemd-183.orig/src/shared/label.c 2012-05-08 13:54:22.000000000 +0200
74 +++ systemd-183/src/shared/label.c 2012-05-29 12:19:01.103797530 +0200
76 if (!use_selinux() || !label_hnd)
79 - if (path_is_absolute(path))
80 + if (sd_path_is_absolute(path))
81 r = selabel_lookup_raw(label_hnd, &fcon, path, S_IFDIR);
85 - newpath = path_make_absolute_cwd(path);
86 + newpath = sd_path_make_absolute_cwd(path);
94 - if (path_is_absolute(path))
95 + if (sd_path_is_absolute(path))
96 r = selabel_lookup_raw(label_hnd, &fcon, path, S_IFSOCK);
100 - newpath = path_make_absolute_cwd(path);
101 + newpath = sd_path_make_absolute_cwd(path);
105 diff -ur systemd-183.orig/src/shared/path-util.c systemd-183/src/shared/path-util.c
106 --- systemd-183.orig/src/shared/path-util.c 2012-05-08 13:54:22.000000000 +0200
107 +++ systemd-183/src/shared/path-util.c 2012-05-29 12:19:13.310463764 +0200
110 #include "path-util.h"
112 -bool path_is_absolute(const char *p) {
113 +bool sd_path_is_absolute(const char *p) {
117 @@ -117,13 +117,13 @@
118 /* Makes every item in the list an absolute path by prepending
119 * the prefix, if specified and necessary */
121 - if (path_is_absolute(p) || !prefix)
122 + if (sd_path_is_absolute(p) || !prefix)
125 return join(prefix, "/", p, NULL);
128 -char *path_make_absolute_cwd(const char *p) {
129 +char *sd_path_make_absolute_cwd(const char *p) {
134 /* Similar to path_make_absolute(), but prefixes with the
135 * current working directory. */
137 - if (path_is_absolute(p))
138 + if (sd_path_is_absolute(p))
141 if (!(cwd = get_current_dir_name()))
146 - if (!(t = path_make_absolute_cwd(*s)))
147 + if (!(t = sd_path_make_absolute_cwd(*s)))
155 - t = path_make_absolute_cwd(*s);
156 + t = sd_path_make_absolute_cwd(*s);
160 diff -ur systemd-183.orig/src/shared/path-util.h systemd-183/src/shared/path-util.h
161 --- systemd-183.orig/src/shared/path-util.h 2012-05-08 23:35:09.000000000 +0200
162 +++ systemd-183/src/shared/path-util.h 2012-05-29 12:19:16.157130332 +0200
164 char **path_split_and_make_absolute(const char *p);
165 char *path_get_file_name(const char *p);
166 int path_get_parent(const char *path, char **parent);
167 -bool path_is_absolute(const char *p);
168 +bool sd_path_is_absolute(const char *p);
169 char *path_make_absolute(const char *p, const char *prefix);
170 -char *path_make_absolute_cwd(const char *p);
171 +char *sd_path_make_absolute_cwd(const char *p);
172 char *path_kill_slashes(char *path);
173 bool path_startswith(const char *path, const char *prefix);
174 bool path_equal(const char *a, const char *b);
175 diff -ur systemd-183.orig/src/shared/util.c systemd-183/src/shared/util.c
176 --- systemd-183.orig/src/shared/util.c 2012-05-22 16:10:22.000000000 +0200
177 +++ systemd-183/src/shared/util.c 2012-05-29 12:18:16.643799096 +0200
178 @@ -1380,7 +1380,7 @@
179 * filename, unless the latter is absolute anyway or the
182 - if (path_is_absolute(filename))
183 + if (sd_path_is_absolute(filename))
184 return strdup(filename);
186 if (!(e = strrchr(path, '/')))
187 @@ -5365,7 +5365,7 @@
191 -void* memdup(const void *p, size_t l) {
192 +void* sd_memdup(const void *p, size_t l) {
196 diff -ur systemd-183.orig/src/shared/util.h systemd-183/src/shared/util.h
197 --- systemd-183.orig/src/shared/util.h 2012-05-21 18:52:49.000000000 +0200
198 +++ systemd-183/src/shared/util.h 2012-05-29 12:15:17.357138754 +0200
201 #define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
203 -#define newdup(t, p, n) ((t*) memdup(p, sizeof(t)*(n)))
204 +#define newdup(t, p, n) ((t*) sd_memdup(p, sizeof(t)*(n)))
206 #define malloc0(n) (calloc((n), 1))
210 int fd_wait_for_event(int fd, int event, usec_t timeout);
212 -void* memdup(const void *p, size_t l);
213 +void* sd_memdup(const void *p, size_t l);
215 int is_kernel_thread(pid_t pid);