summaryrefslogtreecommitdiffstats
path: root/libflash/libffs.c
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2017-04-20 15:39:44 +1000
committerMichael Neuling <mikey@neuling.org>2017-04-20 15:47:29 +1000
commit86d4bcbdcbf91717a62797494be40a18d1e43d6d (patch)
treed2bd4cbaec4ec88cb1955037b397d13c27be5451 /libflash/libffs.c
parent6e7a024d3afb28dcb951b8eb689a0c79964b537e (diff)
downloadtalos-skiboot-86d4bcbdcbf91717a62797494be40a18d1e43d6d.tar.gz
talos-skiboot-86d4bcbdcbf91717a62797494be40a18d1e43d6d.zip
libflash/file: Only use 64bit MTD erase ioctl() when needed
We recently made MTD 64 bit safe in e5720d3fe94 which now requires the 64 bit MTD erase ioctl. Unfortunately this ioctl is not present in older kernels used by some BMC vendors that use pflash. This patch addresses this by only using the 64bit version of the erase ioctl() if the parameters exceed 32bit in size. If an erase requires the 64bit ioctl() on a kernel which does not support it, the code will still attempt it. There is no way of knowing beforehand if the kernel supports it. The ioctl() will fail and an error will be returned from from the function. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Michael Neuling <mikey@neuling.org>
Diffstat (limited to 'libflash/libffs.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud