diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2016-12-28 16:06:19 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2017-03-24 08:34:25 +0800 |
commit | 82bac0de6d95bcdf45729516f6a4f29eb2681118 (patch) | |
tree | 8e75d7be44dc0d26b57df0ec7cd319ade698e7e0 /init/README.md | |
parent | 2a54ae97ebcb69fe0ca5807f860739f499079ca1 (diff) | |
download | core-82bac0de6d95bcdf45729516f6a4f29eb2681118.tar.gz core-82bac0de6d95bcdf45729516f6a4f29eb2681118.tar.bz2 core-82bac0de6d95bcdf45729516f6a4f29eb2681118.zip |
init: use read_file and write_file to implement do_copy builtin
this will make the implementation more cleaner,
and has error message output when failed on some operations
also add the O_TRUNC flag explicitly for the open function
called in write_file.
And add more test on read_file and write_file functions
Test: manual with hikey
Change-Id: Ifc1086a20e85db6980b497b1150a8a7952e672d6
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'init/README.md')
-rw-r--r-- | init/README.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/init/README.md b/init/README.md index 99522b95e..709c6675f 100644 --- a/init/README.md +++ b/init/README.md @@ -282,6 +282,11 @@ Commands `copy <src> <dst>` > Copies a file. Similar to write, but useful for binary/large amounts of data. + Regarding to the src file, copying from symbol link file and world-writable + or group-writable files are not allowed. + Regarding to the dst file, the default mode created is 0600 if it does not + exist. And it will be truncated if dst file is a normal regular file and + already exists. `domainname <name>` > Set the domain name. |