chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
timedate: handle more nicely if something or somebody keeps open /dev/rtc and thus...
[elogind.git]
/
src
/
tmpfiles
/
tmpfiles.c
diff --git
a/src/tmpfiles/tmpfiles.c
b/src/tmpfiles/tmpfiles.c
index 3cc831a28e8812ab372dc3579da60b10f9a85a41..8051cb36ec6fd6fc0768e871b4aab0d6dca124a5 100644
(file)
--- a/
src/tmpfiles/tmpfiles.c
+++ b/
src/tmpfiles/tmpfiles.c
@@
-275,12
+275,15
@@
static int dir_cleanup(
continue;
if (fstatat(dirfd(d), dent->d_name, &s, AT_SYMLINK_NOFOLLOW) < 0) {
continue;
if (fstatat(dirfd(d), dent->d_name, &s, AT_SYMLINK_NOFOLLOW) < 0) {
+ if (errno == ENOENT)
+ continue;
- if (errno != ENOENT) {
+ /* FUSE, NFS mounts, SELinux might return EACCES */
+ if (errno == EACCES)
+ log_debug("stat(%s/%s) failed: %m", p, dent->d_name);
+ else
log_error("stat(%s/%s) failed: %m", p, dent->d_name);
log_error("stat(%s/%s) failed: %m", p, dent->d_name);
- r = -errno;
- }
-
+ r = -errno;
continue;
}
continue;
}
@@
-462,8
+465,10
@@
static int item_set_perms(Item *i, const char *path) {
}
static int write_one_file(Item *i, const char *path) {
}
static int write_one_file(Item *i, const char *path) {
- int r, e, fd, flags;
+ int e, flags;
+ int fd = -1;
struct stat st;
struct stat st;
+ int r = 0;
flags = i->type == CREATE_FILE ? O_CREAT|O_APPEND :
i->type == TRUNCATE_FILE ? O_CREAT|O_TRUNC : 0;
flags = i->type == CREATE_FILE ? O_CREAT|O_APPEND :
i->type == TRUNCATE_FILE ? O_CREAT|O_TRUNC : 0;
@@
-635,8
+640,9
@@
static int glob_item(Item *i, int (*action)(Item *, const char *)) {
}
static int create_item(Item *i) {
}
static int create_item(Item *i) {
- int
r,
e;
+ int e;
struct stat st;
struct stat st;
+ int r = 0;
assert(i);
assert(i);