[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cp(1) fails to copy file from /proc
From: |
Mike Frysinger |
Subject: |
Re: cp(1) fails to copy file from /proc |
Date: |
Sat, 18 Apr 2009 14:22:05 -0400 |
User-agent: |
KMail/1.11.1 (Linux/2.6.28; KDE/4.2.1; x86_64; ; ) |
On Friday 17 April 2009 18:28:07 James Youngman wrote:
> On Fri, Apr 17, 2009 at 5:46 PM, Jim Meyering <address@hidden> wrote:
> > diff --git a/src/copy.c b/src/copy.c
> > index 9b0e139..3cbeba4 100644
> > --- a/src/copy.c
> > +++ b/src/copy.c
> > @@ -699,10 +699,6 @@ copy_reg (char const *src_name, char const
> > *dst_name, goto close_src_and_dst_desc;
> > }
> > last_write_made_hole = false;
> > -
> > - /* A short read on a regular file means EOF. */
> > - if (n_read != buf_size && S_ISREG (src_open_sb.st_mode))
> > - break;
> > }
> > }
>
> The patch itself looks good, but it might be worth leaving in a
> comment indicating why the optimisation should not be reintroduced...
and/or a new test (i prefer the "and"):
if [ -e /proc/cpuinfo ] ; then
cp /proc/cpuinfo cpuinfo.cp
cat /proc/cpuinfo > cpuinfo.cat
cmp cpuinfo.cp cpuinfo.cat
fi
-mike
signature.asc
Description: This is a digitally signed message part.
- cp(1) fails to copy file from /proc, Jukka Salmi, 2009/04/16
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/16
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/16
- Re: cp(1) fails to copy file from /proc, James Youngman, 2009/04/17
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/17
- Re: cp(1) fails to copy file from /proc, James Youngman, 2009/04/17
- Re: cp(1) fails to copy file from /proc,
Mike Frysinger <=
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/18
- Re: cp(1) fails to copy file from /proc, Mike Frysinger, 2009/04/18
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/18
- Re: cp(1) fails to copy file from /proc, Andreas Schwab, 2009/04/19
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/19
- Re: cp(1) fails to copy file from /proc, James Youngman, 2009/04/19
- Re: cp(1) fails to copy file from /proc, Jim Meyering, 2009/04/23
- Re: cp(1) fails to copy file from /proc, Mike Frysinger, 2009/04/26