chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path: after installing inotify watches, recheck file again to fix race
[elogind.git]
/
src
/
label.c
diff --git
a/src/label.c
b/src/label.c
index 218d0dfa06f119e34991f2bd4d281c163e5b9f9f..09ded642fb1d51003230b09e41e484ae0dd48209 100644
(file)
--- a/
src/label.c
+++ b/
src/label.c
@@
-65,7
+65,7
@@
int label_init(void) {
return r;
}
return r;
}
-int label_fix(const char *path) {
+int label_fix(const char *path
, bool ignore_enoent
) {
int r = 0;
#ifdef HAVE_SELINUX
int r = 0;
#ifdef HAVE_SELINUX
@@
-90,6
+90,10
@@
int label_fix(const char *path) {
/* If the FS doesn't support labels, then exit without warning */
if (r < 0 && errno == ENOTSUP)
return 0;
/* If the FS doesn't support labels, then exit without warning */
if (r < 0 && errno == ENOTSUP)
return 0;
+
+ /* Ignore ENOENT in some cases */
+ if (r < 0 && ignore_enoent && errno == ENOENT)
+ return 0;
}
}
}
}