OSDN Git Service

Fix to properly wipe filesystems larger than 4 gigabytes.
authorKen Sumrall <ksumrall@android.com>
Sat, 12 Feb 2011 02:36:42 +0000 (18:36 -0800)
committerKen Sumrall <ksumrall@android.com>
Wed, 23 Mar 2011 03:10:06 +0000 (20:10 -0700)
Pass the wipe size to the wipe function in a 64 bit int.

Change-Id: Ia6a0c70c8ddacaae35d17732d61b126219e5c158

ext4_utils/wipe.c
ext4_utils/wipe.h

index 990b82f..c7329cf 100644 (file)
@@ -30,7 +30,7 @@
 #define BLKSECDISCARD _IO(0x12,125)
 #endif
 
-int wipe_block_device(int fd, int len)
+int wipe_block_device(int fd, s64 len)
 {
        u64 range[2];
        int ret;
@@ -54,7 +54,7 @@ int wipe_block_device(int fd, int len)
        return 0;
 }
 #else
-int wipe_block_device(int fd, int len)
+int wipe_block_device(int fd, s64 len)
 {
        error("wipe not supported on non-linux platforms");
        return 1;
index 0b54b46..814877d 100644 (file)
@@ -17,6 +17,6 @@
 #ifndef _WIPE_H_
 #define _WIPE_H_
 
-int wipe_block_device(int fd, int len);
+int wipe_block_device(int fd, s64 len);
 
 #endif