summaryrefslogtreecommitdiff
path: root/src/basic/path-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-22 19:28:31 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-24 23:03:49 +0200
commit0f4743651081b5367ab06f238827ddfd4da74e74 (patch)
tree43b072e7eb30af4c4c80fa451768ecd8eb14a1d9 /src/basic/path-util.h
parent85eca92e2061043d733991b386d8dc10fad0fc30 (diff)
util-lib: get_current_dir_name() can return errors other than ENOMEM
get_current_dir_name() can return a variety of errors, not just ENOMEM, hence don't blindly turn its errors to ENOMEM, but return correct errors in path_make_absolute_cwd(). This trickles down into a couple of other functions, some of which receive unrelated minor fixes too with this commit.
Diffstat (limited to 'src/basic/path-util.h')
-rw-r--r--src/basic/path-util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/path-util.h b/src/basic/path-util.h
index 03e1ac5d60..c37c131bff 100644
--- a/src/basic/path-util.h
+++ b/src/basic/path-util.h
@@ -36,11 +36,11 @@
#endif
bool is_path(const char *p) _pure_;
-char** path_split_and_make_absolute(const char *p);
+int path_split_and_make_absolute(const char *p, char ***ret);
int path_get_parent(const char *path, char **parent);
bool path_is_absolute(const char *p) _pure_;
char* path_make_absolute(const char *p, const char *prefix);
-char* path_make_absolute_cwd(const char *p);
+int path_make_absolute_cwd(const char *p, char **ret);
int path_make_relative(const char *from_dir, const char *to_path, char **_r);
char* path_kill_slashes(char *path);
char* path_startswith(const char *path, const char *prefix) _pure_;
@@ -49,7 +49,7 @@ bool path_equal(const char *a, const char *b) _pure_;
bool path_equal_or_files_same(const char *a, const char *b);
char* path_join(const char *root, const char *path, const char *rest);
-char** path_strv_make_absolute_cwd(char **l);
+int path_strv_make_absolute_cwd(char **l);
char** path_strv_resolve(char **l, const char *prefix);
char** path_strv_resolve_uniq(char **l, const char *prefix);