***/
#include <errno.h>
-#include <fcntl.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/statvfs.h>
+#include <sys/stat.h>
#include <unistd.h>
/* When we include libgen.h because we need dirname() we immediately
#undef basename
#include "alloc-util.h"
-#include "fd-util.h"
-#include "fileio.h"
+#include "extract-word.h"
#include "fs-util.h"
#include "log.h"
#include "macro.h"
#include "missing.h"
-#include "parse-util.h"
#include "path-util.h"
#include "stat-util.h"
#include "string-util.h"
#include "strv.h"
-#include "util.h"
+#include "time-util.h"
bool path_is_absolute(const char *p) {
return p[0] == '/';
return !!strchr(p, '/');
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int path_split_and_make_absolute(const char *p, char ***ret) {
char **l;
int r;
*ret = l;
return r;
}
-#endif // 0
char *path_make_absolute(const char *p, const char *prefix) {
assert(p);
return strjoin(prefix, "/", p, NULL);
}
+#endif // 0
int path_make_absolute_cwd(const char *p, char **ret) {
char *c;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int path_make_relative(const char *from_dir, const char *to_path, char **_r) {
char *r, *p;
unsigned n_parents;
return path_equal(a, b) || files_same(a, b) > 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
char* path_join(const char *root, const char *path, const char *rest) {
assert(path);
rest && rest[0] == '/' ? rest+1 : rest,
NULL);
}
-#endif // 0
-/// UNNEEDED by elogind
-#if 0
int find_binary(const char *name, char **ret) {
int last_error, r;
strcpy(p, path);
return n;
}
-#endif // 0
int parse_path_argument_and_warn(const char *path, bool suppress_root, char **arg) {
char *p;
*arg = p;
return 0;
}
+#endif // 0
char* dirname_malloc(const char *path) {
char *d, *dir, *dir2;
return hidden_file_allow_backup(filename);
}
+#if 0 /// UNNEEDED by elogind
bool is_device_path(const char *path) {
/* Returns true on paths that refer to a device, either in
path_startswith(path, "/dev/") ||
path_startswith(path, "/sys/");
}
+#endif // 0