summaryrefslogtreecommitdiff
path: root/src/basic/btrfs-util.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/basic/btrfs-util.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/basic/btrfs-util.c')
-rw-r--r--src/basic/btrfs-util.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/basic/btrfs-util.c b/src/basic/btrfs-util.c
index f799f8dcc2..4c90bc0c80 100644
--- a/src/basic/btrfs-util.c
+++ b/src/basic/btrfs-util.c
@@ -26,6 +26,7 @@
#include <linux/btrfs.h>
#endif
+#include "alloc-util.h"
#include "btrfs-ctree.h"
#include "btrfs-util.h"
#include "copy.h"
@@ -36,6 +37,7 @@
#include "path-util.h"
#include "selinux-util.h"
#include "smack-util.h"
+#include "stat-util.h"
#include "string-util.h"
#include "util.h"
@@ -60,13 +62,13 @@ static int validate_subvolume_name(const char *name) {
static int open_parent(const char *path, int flags) {
_cleanup_free_ char *parent = NULL;
- int r, fd;
+ int fd;
assert(path);
- r = path_get_parent(path, &parent);
- if (r < 0)
- return r;
+ parent = dirname_malloc(path);
+ if (!parent)
+ return -ENOMEM;
fd = open(parent, flags);
if (fd < 0)