summaryrefslogtreecommitdiffstats
path: root/sys-utils/switch_root.c
diff options
context:
space:
mode:
authorKarel Zak2014-11-10 11:29:42 +0100
committerKarel Zak2014-11-10 11:29:42 +0100
commit64d0cee6c00abb3efa89d53879c0bba15f7eb805 (patch)
treea41ed5121760f63976a1df22b91e4f44940b98c8 /sys-utils/switch_root.c
parentmkswap: make final report more human readable (diff)
downloadkernel-qcow2-util-linux-64d0cee6c00abb3efa89d53879c0bba15f7eb805.tar.gz
kernel-qcow2-util-linux-64d0cee6c00abb3efa89d53879c0bba15f7eb805.tar.xz
kernel-qcow2-util-linux-64d0cee6c00abb3efa89d53879c0bba15f7eb805.zip
include/statfs_magic: use macro rather than type for f_type
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/switch_root.c')
-rw-r--r--sys-utils/switch_root.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c
index c6a2eff8e..534d44ac7 100644
--- a/sys-utils/switch_root.c
+++ b/sys-utils/switch_root.c
@@ -181,8 +181,8 @@ static int switchroot(const char *newroot)
if (pid <= 0) {
struct statfs stfs;
if (fstatfs(cfd, &stfs) == 0 &&
- (stfs.f_type == (ul_statfs_ftype_t) STATFS_RAMFS_MAGIC ||
- stfs.f_type == (ul_statfs_ftype_t) STATFS_TMPFS_MAGIC))
+ (F_TYPE_EQUAL(stfs.f_type, STATFS_RAMFS_MAGIC) ||
+ F_TYPE_EQUAL(stfs.f_type, STATFS_TMPFS_MAGIC)))
recursiveRemove(cfd);
else
warn(_("old root filesystem is not an initramfs"));