summaryrefslogtreecommitdiffstats
path: root/sys-utils/switch_root.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/switch_root.c')
-rw-r--r--sys-utils/switch_root.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c
index dac946f8c..6822a5d0c 100644
--- a/sys-utils/switch_root.c
+++ b/sys-utils/switch_root.c
@@ -181,7 +181,8 @@ static int switchroot(const char *newroot)
if (pid <= 0) {
struct statfs stfs;
if (fstatfs(cfd, &stfs) == 0 &&
- (stfs.f_type == STATFS_RAMFS_MAGIC || stfs.f_type == STATFS_TMPFS_MAGIC))
+ (stfs.f_type == (__SWORD_TYPE)STATFS_RAMFS_MAGIC ||
+ stfs.f_type == (__SWORD_TYPE)STATFS_TMPFS_MAGIC))
recursiveRemove(cfd);
else
warn(_("old root filesystem is not an initramfs"));