projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43ad6e3
)
tmpfiles: create directories already with the right label, instead of creating them...
author
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Jun 2014 22:02:08 +0000
(
00:02
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 17 Jun 2014 22:09:46 +0000
(
00:09
+0200)
src/tmpfiles/tmpfiles.c
patch
|
blob
|
history
diff --git
a/src/tmpfiles/tmpfiles.c
b/src/tmpfiles/tmpfiles.c
index
25c2a8c
..
9790122
100644
(file)
--- a/
src/tmpfiles/tmpfiles.c
+++ b/
src/tmpfiles/tmpfiles.c
@@
-691,12
+691,12
@@
static int create_item(Item *i) {
RUN_WITH_UMASK(0000) {
mkdir_parents_label(i->path, 0755);
- r = mkdir(i->path, i->mode);
+ r = mkdir
_label
(i->path, i->mode);
}
- if (r < 0 &&
errno !=
EEXIST) {
- log_error("Failed to create directory %s: %
m", i->path
);
- return
-errno
;
+ if (r < 0 &&
r != -
EEXIST) {
+ log_error("Failed to create directory %s: %
s", i->path, strerror(-r)
);
+ return
r
;
}
if (stat(i->path, &st) < 0) {