commit | cc6da3fbb1196e6895e32e9e4b37a8e1d705c539 | [log] [tgz] |
---|---|---|
author | Logan <tzuhsiang.chien@gmail.com> | Fri Jan 07 10:45:52 2011 +0800 |
committer | Logan <tzuhsiang.chien@gmail.com> | Fri Jan 07 10:45:52 2011 +0800 |
tree | 03511090a9ddfe18ed18839cb436ddcb71bd5782 | |
parent | 89eb47f387f96e63cad73a4f832ac737b9d73969 [diff] [blame] |
Add LOGE when failed to truncate the file.
diff --git a/lib/bcc/FileHandle.cpp b/lib/bcc/FileHandle.cpp index c4c3954..e19d0d1 100644 --- a/lib/bcc/FileHandle.cpp +++ b/lib/bcc/FileHandle.cpp
@@ -168,7 +168,9 @@ void FileHandle::truncate() { if (mFD >= 0) { - ftruncate(mFD, 0); + if (ftruncate(mFD, 0) != 0) { + LOGE("Unable to truncate the file.\n"); + } } }