[PATCH 0/1] Work around systems defining statfs.f_type as long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Hi

I was scratching my head over this build failure on s390x - thanks to
Arnd for suggesting the solution.

Allowing RAMFS_MAGIC to be defined as a number > 31 bits was a mistake
from the beginning, but trying to change it now is probably going to
cause even more headaches.

The problem is that some architectures, such as s390x and MIPS, define
statfs.f_type as signed long, which means the cast to unsigned long
and then comparing it against RAMFS_MAGIC is going to fail.  Instead
this patch brutally casts both to unsigned long and then masks off the
lower 32 bits and comparing those - this avoids having to add #ifdef
cases to the code.

Cheers,
Jes

Jes Sorensen (1):
  Work around architectures having statfs.f_type defined as long

 util.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux