Fix minimal mv to work across fs
authormaximilian attems <max@stro.at>
Mon, 4 Jul 2011 15:51:52 +0000 (17:51 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 8 May 2016 20:59:37 +0000 (20:59 +0000)
commit4802d9533090e3d377e4632acfa183c3886797af
tree7de47554a571f60df0de0ce0e3c94c6989052936
parentd1ffb8b037926c39f192c3ac6b1081179e6a616a
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