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/fs/Ext4.h b/fs/Ext4.h
index a5efa74..f78dc95 100644
--- a/fs/Ext4.h
+++ b/fs/Ext4.h
@@ -30,9 +30,9 @@
status_t Check(const std::string& source, const std::string& target);
status_t Mount(const std::string& source, const std::string& target, bool ro,
bool remount, bool executable);
-status_t Format(const std::string& source, unsigned int numSectors,
+status_t Format(const std::string& source, unsigned long numSectors,
const std::string& target);
-status_t Resize(const std::string& source, unsigned int numSectors);
+status_t Resize(const std::string& source, unsigned long numSectors);
} // namespace ext4
} // namespace vold