Merge pull request #22383 from yuwata/network-generator-keep-configuration

network: enable KeepConfiguration= when running on network filesystem
This commit is contained in:
Luca Boccassi
2022-02-07 18:06:24 +00:00
committed by GitHub
9 changed files with 60 additions and 10 deletions
+9
View File
@@ -249,6 +249,15 @@ int path_is_temporary_fs(const char *path) {
return is_temporary_fs(&s);
}
int path_is_network_fs(const char *path) {
struct statfs s;
if (statfs(path, &s) < 0)
return -errno;
return is_network_fs(&s);
}
int stat_verify_regular(const struct stat *st) {
assert(st);
+1
View File
@@ -53,6 +53,7 @@ int fd_is_temporary_fs(int fd);
int fd_is_network_fs(int fd);
int path_is_temporary_fs(const char *path);
int path_is_network_fs(const char *path);
/* Because statfs.t_type can be int on some architectures, we have to cast
* the const magic to the type, otherwise the compiler warns about