summaryrefslogtreecommitdiff
path: root/src/shared/dev-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-10-23 19:58:45 +0200
committerLennart Poettering <lennart@poettering.net>2014-10-23 21:36:56 +0200
commitc34255bdb217c2a1d3ac6348252437ab8be9ca46 (patch)
treeb74ff09f1fa73b640fe53a50bc76a7bbbbf9a9bc /src/shared/dev-setup.c
parentf3c80515c191b4447a2b0bc5a582dbffeca4679f (diff)
label: unify code to make directories, symlinks
Diffstat (limited to 'src/shared/dev-setup.c')
-rw-r--r--src/shared/dev-setup.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/shared/dev-setup.c b/src/shared/dev-setup.c
index ae1c3d9d4e..e8b0810d23 100644
--- a/src/shared/dev-setup.c
+++ b/src/shared/dev-setup.c
@@ -32,24 +32,6 @@
#include "util.h"
#include "label.h"
-static int symlink_and_label(const char *old_path, const char *new_path) {
- int r;
-
- assert(old_path);
- assert(new_path);
-
- r = mac_selinux_create_file_prepare(new_path, S_IFLNK);
- if (r < 0)
- return r;
-
- if (symlink(old_path, new_path) < 0)
- r = -errno;
-
- mac_selinux_create_file_clear();
-
- return r;
-}
-
int dev_setup(const char *prefix) {
const char *j, *k;
@@ -75,9 +57,9 @@ int dev_setup(const char *prefix) {
if (!link_name)
return -ENOMEM;
- symlink_and_label(j, link_name);
+ symlink_label(j, link_name);
} else
- symlink_and_label(j, k);
+ symlink_label(j, k);
}
return 0;