summaryrefslogtreecommitdiff
path: root/sdcard
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-07-31 12:03:03 -0700
committerElliott Hughes <enh@google.com>2014-07-31 12:20:14 -0700
commit853574ddc766da725dd114fe1d1102c59f713f3b (patch)
tree3d054ab4836ac3640d8b82d9df43585aff397e68 /sdcard
parente7ec28bba7bb8573a7719f38b423b16b8d7c07da (diff)
Fix sdcard truncates.
Use truncate64 instead of truncate so we don't truncate (ho ho) the offset. (cherrypick of 4568565e85bf2e1ea11b2e09d72e244088c05dbc.) Bug: https://code.google.com/p/android/issues/detail?id=74039 Change-Id: I63711ccd299e3ebc475563b1999817d1919571ab
Diffstat (limited to 'sdcard')
-rw-r--r--sdcard/sdcard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index e41359653..9b55b3356 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -903,7 +903,7 @@ static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler,
/* XXX: incomplete implementation on purpose.
* chmod/chown should NEVER be implemented.*/
- if ((req->valid & FATTR_SIZE) && truncate(path, req->size) < 0) {
+ if ((req->valid & FATTR_SIZE) && truncate64(path, req->size) < 0) {
return -errno;
}