diff options
author | Wonsik Kim <wonsik@google.com> | 2017-03-31 00:21:59 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-31 00:22:00 +0000 |
commit | 3428d0c2c0b0056dadbc561d86b66ec83b960583 (patch) | |
tree | a0652a7d7b433e32bcb480dc74d1f915e312fecd /init/util.cpp | |
parent | c1314c8b13ef718b24372b6749725bdf7e76d46d (diff) | |
parent | 395e29472fa012c4177d981d9ce699625b706f4f (diff) | |
download | core-3428d0c2c0b0056dadbc561d86b66ec83b960583.tar.gz core-3428d0c2c0b0056dadbc561d86b66ec83b960583.tar.bz2 core-3428d0c2c0b0056dadbc561d86b66ec83b960583.zip |
Merge "Revert "init: use read_file and write_file to implement do_copy builtin""
Diffstat (limited to 'init/util.cpp')
-rw-r--r-- | init/util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/util.cpp b/init/util.cpp index 8a1993987..73d97edc7 100644 --- a/init/util.cpp +++ b/init/util.cpp @@ -185,8 +185,8 @@ bool read_file(const char* path, std::string* content) { } 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; |