Fix minimal mv to work across fs
authormaximilian attems <max@stro.at>
Mon, 4 Jul 2011 15:51:52 +0000 (17:51 +0200)
committerRaspbian forward porter <root@raspbian.org>
Tue, 17 May 2016 23:45:58 +0000 (23:45 +0000)
commitc571e8018fbef4ed9cdddecc26ac32d36ef23c50
treed2275084c942ce15a1cbcfaab1da6a18978a5b12
parentbf7ed5a795f6a9fb9cd02449c5e6d24f52907155
Fix minimal mv to work across fs

This is the use case in initramfs to keep data from /run to /root/run
before calling switch_root().

copy_file() doesn't yet catch EINTR, but that seems less of an issue
in initramfs.

copy_file() and much logic out of copy() is from Ulrich Dangel.
Thank you for the collaboration on this blocker for
http://bugs.debian.org/627808

While we are it require move to have mv at least 2 arguments passed.

Signed-off-by: Ulrich Dangel <uli@spamt.net>
Signed-off-by: maximilian attems <max@stro.at>
[bwh: This is no longer needed by initramfs-tools starting with version 0.121,
 so can be dropped after the stretch release]

Gbp-Pq: Name Fix-minimal-mv-to-work-across-fs
usr/utils/mv.c