diff options
| author | Tom Zhu <ling.zhu@motorola.com> | 2009-09-30 14:25:47 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2009-09-30 14:25:47 -0700 |
| commit | 4d0b21f4ac5908f695c9c0759c3a34511d8fd97b (patch) | |
| tree | 7ce80c6d81400b7f0525c5927d18d5c0ec9f508c | |
| parent | a39840b0402f9345e037396639223ef2004fa5fd (diff) | |
| parent | 4833d9f4986d6dafacff841beb3bf93172c84bdc (diff) | |
| download | system_core-4d0b21f4ac5908f695c9c0759c3a34511d8fd97b.tar.gz system_core-4d0b21f4ac5908f695c9c0759c3a34511d8fd97b.tar.bz2 system_core-4d0b21f4ac5908f695c9c0759c3a34511d8fd97b.zip | |
am 4833d9f4: init: builtins: trancate target file in do_copy
Merge commit '4833d9f4986d6dafacff841beb3bf93172c84bdc' into eclair-plus-aosp
* commit '4833d9f4986d6dafacff841beb3bf93172c84bdc':
init: builtins: trancate target file in do_copy
| -rw-r--r-- | init/builtins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/builtins.c b/init/builtins.c index 1e7cb4e8..b4af700b 100644 --- a/init/builtins.c +++ b/init/builtins.c @@ -459,7 +459,7 @@ int do_copy(int nargs, char **args) if ((fd1 = open(args[1], O_RDONLY)) < 0) goto out_err; - if ((fd2 = open(args[2], O_WRONLY|O_CREAT, 0660)) < 0) + if ((fd2 = open(args[2], O_WRONLY|O_CREAT|O_TRUNC, 0660)) < 0) goto out_err; if (!(buffer = malloc(info.st_size))) |
