libsystem: introduce do_cp_force() and do_cp_mode_force()
authorWaLyong Cho <walyong.cho@samsung.com>
Tue, 15 Nov 2016 08:12:06 +0000 (17:12 +0900)
committerWaLyong Cho <walyong.cho@samsung.com>
Tue, 15 Nov 2016 08:12:08 +0000 (17:12 +0900)
commit920f4d6b249c198863b1935b189ccbfae517228d
treeeac8a96c50d2d1a89f76efdf01c51c0943596304
parentecb9c927e17ba677106181d8c487c775b30f78a7
libsystem: introduce do_cp_force() and do_cp_mode_force()

The origin do_cp() and do_cp_mode() always overwrite the destination
file. It does not make sense. So check the destination file exists, if
yes, return -EALREADY.
And to support force overwrite, add new do_cp_force() and
do_cp_mode_force(). Those does not check the destination file exist.

Change-Id: I9b0936f15195b737c4701bf1fa64ce49124873ce
Signed-off-by: WaLyong Cho <walyong.cho@samsung.com>
src/libsystem/libsystem.c
src/libsystem/libsystem.h
src/test/test-cp.c