summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2011-02-11 18:36:42 -0800
committerKen Sumrall <ksumrall@android.com>2011-02-11 18:36:42 -0800
commit61d6591c827dbea6db9bd29b17a5679d6e2c0d50 (patch)
tree8dfef2bcb423471c9a0ecee8673816356eccce73
parent957010bef327f255cdb6909109a1f31b5ee8f443 (diff)
downloadextras-61d6591c827dbea6db9bd29b17a5679d6e2c0d50.tar.gz
Fix to properly wipe filesystems larger than 4 gigabytes.
Pass the wipe size to the wipe function in a 64 bit int. Change-Id: Iac95693efa2d9cadbe77aa83b5ff01d7fc8d8b70
-rw-r--r--ext4_utils/wipe.c4
-rw-r--r--ext4_utils/wipe.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext4_utils/wipe.c b/ext4_utils/wipe.c
index 990b82fc..c7329cf3 100644
--- a/ext4_utils/wipe.c
+++ b/ext4_utils/wipe.c
@@ -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;
diff --git a/ext4_utils/wipe.h b/ext4_utils/wipe.h
index 0b54b465..814877d8 100644
--- a/ext4_utils/wipe.h
+++ b/ext4_utils/wipe.h
@@ -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