From 4568565e85bf2e1ea11b2e09d72e244088c05dbc Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 31 Jul 2014 12:03:03 -0700 Subject: Fix sdcard truncates. Use truncate64 instead of truncate so we don't truncate (ho ho) the offset. Bug: https://code.google.com/p/android/issues/detail?id=74039 Change-Id: I63711ccd299e3ebc475563b1999817d1919571ab --- sdcard/sdcard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c index 587a4cd..7bf6394 100644 --- a/sdcard/sdcard.c +++ b/sdcard/sdcard.c @@ -910,7 +910,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; } -- cgit v1.1