return 0;
}
+/// UNNEEDED by elogind
+#if 0
char **path_split_and_make_absolute(const char *p) {
char **l;
assert(p);
return l;
}
+#endif // 0
char *path_make_absolute(const char *p, const char *prefix) {
assert(p);
*_r = r;
return 0;
}
-#endif // 0
char **path_strv_make_absolute_cwd(char **l) {
char **s;
return l;
}
+#endif // 0
char **path_strv_resolve(char **l, const char *prefix) {
char **s;
* Which one is sorted before the other does not really matter.
* Here a relative path is ordered before an absolute path. */
d = (a[0] == '/') - (b[0] == '/');
- if (d)
+ if (d != 0)
return d;
for (;;) {
/* Alphabetical sort: "/foo/aaa" before "/foo/b" */
d = memcmp(a, b, MIN(j, k));
- if (d)
+ if (d != 0)
return (d > 0) - (d < 0); /* sign of d */
/* Sort "/foo/a" before "/foo/aaa" */
d = (j > k) - (j < k); /* sign of (j - k) */
- if (d)
+ if (d != 0)
return d;
a += j;
return path_compare(a, b) == 0;
}
+/// UNNEEDED by elogind
+#if 0
bool path_equal_or_files_same(const char *a, const char *b) {
return path_equal(a, b) || files_same(a, b) > 0;
}
rest && rest[0] == '/' ? rest+1 : rest,
NULL);
}
+#endif // 0
static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id) {
char path[strlen("/proc/self/fdinfo/") + DECIMAL_STR_MAX(int)];
canonical = canonicalize_file_name(t);
if (!canonical)
return -errno;
+
+ t = canonical;
}
- r = path_get_parent(canonical ?: t, &parent);
+ r = path_get_parent(t, &parent);
if (r < 0)
return r;
if (fd < 0)
return -errno;
- return fd_is_mount_point(fd, basename(canonical ?: t), flags);
+ return fd_is_mount_point(fd, basename(t), flags);
}
int path_is_read_only_fs(const char *path) {
return false;
}
+/// UNNEEDED by elogind
+#if 0
int path_is_os_tree(const char *path) {
char *p;
int r;
}
}
-/// UNNEEDED by elogind
-#if 0
bool paths_check_timestamp(const char* const* paths, usec_t *timestamp, bool update) {
bool changed = false;
const char* const* i;
return changed;
}
-#endif // 0
int fsck_exists(const char *fstype) {
_cleanup_free_ char *p = NULL, *d = NULL;
strcpy(p, path);
return n;
}
+#endif // 0