Re: cp file with zero size: EINVAL

From: Colin Percival <colin.percival_at_wadham.ox.ac.uk>
Date: Fri, 23 Jan 2004 09:18:15 +0000
At 09:08 23/01/2004, Bjoern A. Zeeb wrote:
>I am running a kernel about a week old (HEAD) and some world from
>around 22 Sep.  For some reason I had not installed world yet (though
>built).
>
>Now I am seeing this:
>
>bz_at_host:~> touch abc
>bz_at_host:~> ls -l abc
>-rw-rw-r--    1 bz       staff           0 Jan 23 08:51 abc
>bz_at_host:~> cp abc abd
>cp: abc: Invalid argument

   I suspect that this problem was fixed by the following commit; try
using a more recent cp and tell us if it's still broken.

 >alc         2003/11/12 21:26:55 PST
 >
 >  FreeBSD src repository
 >
 >  Modified files:
 >    bin/cp               utils.c
 >  Log:
 >  Don't mmap(2) and munmap(2) zero-length files.
 >
 >  Submitted by:   Wiktor Niesiobedzki <bsd_at_w.evip.pl>
 >
 >  Revision  Changes    Path
 >  1.42      +2 
-1 
<http://cvsweb.FreeBSD.org//src/bin/cp/utils.c.diff?r1=1.41&r2=1.42>src/bin/cp/utils.c

Colin Percival
Received on Fri Jan 23 2004 - 00:19:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:39 UTC