Work around architectures having statfs.f_type defined as long
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 19 Mar 2014 13:26:02 +0000 (14:26 +0100)
committerNeilBrown <neilb@suse.de>
Wed, 19 Mar 2014 22:24:27 +0000 (09:24 +1100)
commit76d0f1886fdef89891d617df7e7f3fde89a38e1a
tree764c0697e915bc1f240634db774f4ca106578afa
parentfdcd157a8034fe5c896e49c4764d8ceef72e3741
Work around architectures having statfs.f_type defined as long

Having RAMFS_MAGIC defined as 0x858458f6 causing problems when trying
to compare it directly against statfs.f_type being cast from long to
unsigned long.

This hack is extremly ugly, but it should at least do the right thing
for every situation.

Thanks to Arnd Bergmann for suggesting the fix.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
util.c