diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -2227,15 +2227,7 @@ int continue_via_systemd(char *devnm, char *service_name) int in_initrd(void) { - /* This is based on similar function in systemd. */ - struct statfs s; - /* statfs.f_type is signed long on s390x and MIPS, causing all - sorts of sign extension problems with RAMFS_MAGIC being - defined as 0x858458f6 */ - return statfs("/", &s) >= 0 && - ((unsigned long)s.f_type == TMPFS_MAGIC || - ((unsigned long)s.f_type & 0xFFFFFFFFUL) == - ((unsigned long)RAMFS_MAGIC & 0xFFFFFFFFUL)); + return access("/etc/initrd-release", F_OK) >= 0; } void reopen_mddev(int mdfd) |