summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-27 16:55:16 +0100
committerTom Gundersen <teg@jklm.no>2015-10-27 16:55:16 +0100
commit0d0696812980d8f41c54739ad73716a233a2fa7c (patch)
tree217d98308a3039e106efde5fd6a7b6a657916950 /src/core/socket.c
parentf47fc3ffc4b69a00083a76308f777b52afb8efbf (diff)
parent7760171904ef007f19e8f46aa240a00e382d5b74 (diff)
Merge pull request #1691 from poettering/util-lib-3
split up util.h and macro.h into even more bits
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 7f401025ed..f62466c6a0 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -31,6 +31,7 @@
#include "sd-event.h"
+#include "alloc-util.h"
#include "bus-error.h"
#include "bus-util.h"
#include "copy.h"
@@ -43,12 +44,15 @@
#include "log.h"
#include "missing.h"
#include "mkdir.h"
+#include "parse-util.h"
#include "path-util.h"
+#include "process-util.h"
#include "selinux-util.h"
#include "signal-util.h"
#include "smack-util.h"
#include "socket.h"
#include "special.h"
+#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "unit-name.h"
@@ -1168,9 +1172,9 @@ static int usbffs_dispatch_eps(SocketPort *p) {
_cleanup_free_ char *path = NULL;
int r, i, n, k;
- r = path_get_parent(p->path, &path);
- if (r < 0)
- return r;
+ path = dirname_malloc(p->path);
+ if (!path)
+ return -ENOMEM;
r = scandir(path, &ent, usbffs_select_ep, alphasort);
if (r < 0)