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/VolumeManager.h b/VolumeManager.h
index fa2237f..39fc8f9 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -143,9 +143,9 @@
/* ASEC */
int findAsec(const char *id, char *asecPath = NULL, size_t asecPathLen = 0,
const char **directory = NULL) const;
- int createAsec(const char *id, unsigned numSectors, const char *fstype,
+ int createAsec(const char *id, unsigned long numSectors, const char *fstype,
const char *key, const int ownerUid, bool isExternal);
- int resizeAsec(const char *id, unsigned numSectors, const char *key);
+ int resizeAsec(const char *id, unsigned long numSectors, const char *key);
int finalizeAsec(const char *id);
/**