chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: when enabling a generated unit file, return a clean error
[elogind.git]
/
src
/
basic
/
path-util.c
diff --git
a/src/basic/path-util.c
b/src/basic/path-util.c
index fb23917dc6ae96da722b0b20c319f9198235ce51..b222146c73f49f0fa2212c19939ffcfdbdd209ae 100644
(file)
--- a/
src/basic/path-util.c
+++ b/
src/basic/path-util.c
@@
-1,5
+1,3
@@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-20,11
+18,11
@@
***/
#include <errno.h>
***/
#include <errno.h>
-#include <
fcntl
.h>
+#include <
limits
.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat
vfs
.h>
+#include <sys/stat.h>
#include <unistd.h>
/* When we include libgen.h because we need dirname() we immediately
#include <unistd.h>
/* When we include libgen.h because we need dirname() we immediately
@@
-34,18
+32,16
@@
#undef basename
#include "alloc-util.h"
#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 "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 "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] == '/';
bool path_is_absolute(const char *p) {
return p[0] == '/';
@@
-55,8
+51,7
@@
bool is_path(const char *p) {
return !!strchr(p, '/');
}
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;
int path_split_and_make_absolute(const char *p, char ***ret) {
char **l;
int r;
@@
-118,8
+113,7
@@
int path_make_absolute_cwd(const char *p, char **ret) {
return 0;
}
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;
int path_make_relative(const char *from_dir, const char *to_path, char **_r) {
char *r, *p;
unsigned n_parents;
@@
-447,8
+441,7
@@
bool path_equal_or_files_same(const char *a, const char *b) {
return path_equal(a, b) || files_same(a, b) > 0;
}
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);
char* path_join(const char *root, const char *path, const char *rest) {
assert(path);
@@
-464,9
+457,6
@@
char* path_join(const char *root, const char *path, const char *rest) {
rest && rest[0] == '/' ? rest+1 : rest,
NULL);
}
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;
int find_binary(const char *name, char **ret) {
int last_error, r;
@@
-802,8
+792,7
@@
bool hidden_file(const char *filename) {
return hidden_file_allow_backup(filename);
}
return hidden_file_allow_backup(filename);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
bool is_device_path(const char *path) {
/* Returns true on paths that refer to a device, either in
bool is_device_path(const char *path) {
/* Returns true on paths that refer to a device, either in