vold: fix 64 bit ioctl error
Changing the num_sectors used in ioctl with BLKGETSIZE because
the kernel expects an unsigned long type and then changes 64 bits
with a 64 bits userspace. This overwrites what's located close to
the parameter location if any.
Change-Id: I78fd61a1084de2741f39b926aa436462518709a0
Signed-off-by: Mateusz Nowak <mateusz.nowak@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
diff --git a/Loop.h b/Loop.h
index f7c0392..72130b0 100644
--- a/Loop.h
+++ b/Loop.h
@@ -31,8 +31,8 @@
static int create(const char *id, const char *loopFile, char *loopDeviceBuffer, size_t len);
static int destroyByDevice(const char *loopDevice);
static int destroyByFile(const char *loopFile);
- static int createImageFile(const char *file, unsigned int numSectors);
- static int resizeImageFile(const char *file, unsigned int numSectors);
+ static int createImageFile(const char *file, unsigned long numSectors);
+ static int resizeImageFile(const char *file, unsigned long numSectors);
static int dumpState(SocketClient *c);
};