diff options
author | Elliott Hughes <enh@google.com> | 2014-07-31 12:03:03 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-31 12:03:03 -0700 |
commit | 4568565e85bf2e1ea11b2e09d72e244088c05dbc (patch) | |
tree | c6871afe0c9d28ade1d966a3d5bb30bc77b0c462 | |
parent | a361503e3e68d1b26ce737547c4e1d53a03ec2d9 (diff) | |
download | system_core-4568565e85bf2e1ea11b2e09d72e244088c05dbc.zip system_core-4568565e85bf2e1ea11b2e09d72e244088c05dbc.tar.gz system_core-4568565e85bf2e1ea11b2e09d72e244088c05dbc.tar.bz2 |
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
-rw-r--r-- | sdcard/sdcard.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |