chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1910cd0
)
tmpfiles: remove unnecessary function
author
Lennart Poettering
<lennart@poettering.net>
Wed, 11 Jun 2014 07:19:57 +0000
(09:19 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 11 Jun 2014 07:19:57 +0000
(09:19 +0200)
src/tmpfiles/tmpfiles.c
patch
|
blob
|
history
diff --git
a/src/tmpfiles/tmpfiles.c
b/src/tmpfiles/tmpfiles.c
index c6121bccf3641fb25a43dc9fd79b4194fe00bcd5..b80731d470eae158b2158dd58d45790cad48ab38 100644
(file)
--- a/
src/tmpfiles/tmpfiles.c
+++ b/
src/tmpfiles/tmpfiles.c
@@
-449,17
+449,15
@@
finish:
return r;
}
return r;
}
-static int item_set_perms
_full(Item *i, const char *path, bool ignore_enoent
) {
+static int item_set_perms
(Item *i, const char *path
) {
assert(i);
assert(path);
/* not using i->path directly because it may be a glob */
if (i->mode_set)
if (chmod(path, i->mode) < 0) {
assert(i);
assert(path);
/* not using i->path directly because it may be a glob */
if (i->mode_set)
if (chmod(path, i->mode) < 0) {
- if (errno != ENOENT || !ignore_enoent) {
- log_error("chmod(%s) failed: %m", path);
- return -errno;
- }
+ log_error("chmod(%s) failed: %m", path);
+ return -errno;
}
if (i->uid_set || i->gid_set)
}
if (i->uid_set || i->gid_set)
@@
-467,17
+465,11
@@
static int item_set_perms_full(Item *i, const char *path, bool ignore_enoent) {
i->uid_set ? i->uid : (uid_t) -1,
i->gid_set ? i->gid : (gid_t) -1) < 0) {
i->uid_set ? i->uid : (uid_t) -1,
i->gid_set ? i->gid : (gid_t) -1) < 0) {
- if (errno != ENOENT || !ignore_enoent) {
- log_error("chown(%s) failed: %m", path);
- return -errno;
- }
+ log_error("chown(%s) failed: %m", path);
+ return -errno;
}
}
- return label_fix(path, ignore_enoent, false);
-}
-
-static int item_set_perms(Item *i, const char *path) {
- return item_set_perms_full(i, path, false);
+ return label_fix(path, false, false);
}
static int write_one_file(Item *i, const char *path) {
}
static int write_one_file(Item *i, const char *path) {