OSDN Git Service

am c10f4331: am cd307b7c: Scrub the key from the disk with BLKSECDISCARD.
[android-x86/system-vold.git] / VoldUtil.c
index b5f9946..e5bc912 100644 (file)
 #include <sys/ioctl.h>
 #include <linux/fs.h>
 
-unsigned int get_blkdev_size(int fd)
-{
-  unsigned int nr_sec;
-
-  if ( (ioctl(fd, BLKGETSIZE, &nr_sec)) == -1) {
-    nr_sec = 0;
+void get_blkdev_size(int fd, unsigned long* nr_sec) {
+  if ((ioctl(fd, BLKGETSIZE, nr_sec)) == -1) {
+    *nr_sec = 0;
   }
-
-  return nr_sec;
 }