libfile: copy_file: Fix calling discard_range
discard range is called with unitialized size argument. Call it after stat() on the source filedescriptor. Also there's no point in continuing when stat() on the source filedescriptor fails, so bail out in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
---|
|
lib/libfile.c |
---|