Revert "init: use read_file and write_file to implement do_copy builtin"
Bug: 36726045
Test: gts-tradefed run gts --abi x86 -m GtsMediaTestCases -t com.google.android.media.gts.MediaCodecCencTest#testCENC_DASH_FMP4_H264_360P_PLAYREADY_CENC
This reverts commit 82bac0de6d95bcdf45729516f6a4f29eb2681118.
Change-Id: I3b754f429499daec804a0ad25529294216c39a40
diff --git a/init/util.cpp b/init/util.cpp
index 8a19939..73d97ed 100644
--- a/init/util.cpp
+++ b/init/util.cpp
@@ -185,8 +185,8 @@
}
bool write_file(const char* path, const char* content) {
- android::base::unique_fd fd(TEMP_FAILURE_RETRY(
- open(path, O_WRONLY | O_CREAT | O_NOFOLLOW | O_TRUNC | O_CLOEXEC, 0600)));
+ android::base::unique_fd fd(
+ TEMP_FAILURE_RETRY(open(path, O_WRONLY | O_CREAT | O_NOFOLLOW | O_CLOEXEC, 0600)));
if (fd == -1) {
PLOG(ERROR) << "write_file: Unable to open '" << path << "'";
return false;