Tools: hv: fix file overwriting of hv_fcopy_daemon
authorYue Zhang <yuezha@microsoft.com>
Sat, 28 Jun 2014 01:19:48 +0000 (18:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 21:21:26 +0000 (14:21 -0700)
commite013ac312c79379b26cf29012cfbb37c68f79283
tree684ca9c3ada56901c9c8756cce25a6353045873f
parentda86920f4a193c8d55cfcb006e2e74b4bfab21d0
Tools: hv: fix file overwriting of hv_fcopy_daemon

hv_fcopy_daemon fails to overwrite a file if the target file already
exits.

Add O_TRUNC flag on opening.

Signed-off-by: Yue Zhang <yuezha@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_fcopy_daemon.c