]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd/sd-path/sd-path.c
util-lib: split our string related calls from util.[ch] into its own file string...
[thirdparty/systemd.git] / src / libsystemd / sd-path / sd-path.c
index 360c85405be8c4033293178fc299f95d7b64380d..927b6f8b2d667fce76e1888739b8ce841a9f540d 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "util.h"
+#include "sd-path.h"
+
 #include "architecture.h"
+#include "missing.h"
 #include "path-util.h"
+#include "string-util.h"
 #include "strv.h"
-#include "sd-path.h"
-#include "missing.h"
+#include "util.h"
 
 static int from_environment(const char *envname, const char *fallback, const char **ret) {
         assert(ret);
@@ -323,10 +325,10 @@ static int get_path(uint64_t type, char **buffer, const char **ret) {
                 return from_user_dir("XDG_DESKTOP_DIR", buffer, ret);
         }
 
-        return -ENOTSUP;
+        return -EOPNOTSUPP;
 }
 
-int sd_path_home(uint64_t type, const char *suffix, char **path) {
+_public_ int sd_path_home(uint64_t type, const char *suffix, char **path) {
         char *buffer = NULL, *cc;
         const char *ret;
         int r;
@@ -552,10 +554,10 @@ static int get_search(uint64_t type, char ***list) {
                                                NULL);
         }
 
-        return -ENOTSUP;
+        return -EOPNOTSUPP;
 }
 
-int sd_path_search(uint64_t type, const char *suffix, char ***paths) {
+_public_ int sd_path_search(uint64_t type, const char *suffix, char ***paths) {
         char **l, **i, **j, **n;
         int r;