mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
core: when a unit's SourcePath points to API VFS pretend we are never out-of-date (#5487)
If the unit's SourcePath is below /proc then it's a unit genreated from a kernel resource (such as a .mount or .swap unit). And those we watch anyway, and hence should never be out-of-date. Fixes: #5461
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
ecadd9b3fd
commit
77969722aa
@@ -3154,6 +3154,11 @@ static bool fragment_mtime_newer(const char *path, usec_t mtime, bool path_maske
|
||||
if (!path)
|
||||
return false;
|
||||
|
||||
/* If the source is some virtual kernel file system, then we assume we watch it anyway, and hence pretend we
|
||||
* are never out-of-date. */
|
||||
if (PATH_STARTSWITH_SET(path, "/proc", "/sys"))
|
||||
return false;
|
||||
|
||||
if (stat(path, &st) < 0)
|
||||
/* What, cannot access this anymore? */
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user