X-Spam-Check-By: sourceware.org
Date: Thu, 3 Aug 2006 21:21:35 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: cygwin copy problems usb 2.0
Message-ID: <20060803192135.GD5300@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <080320061908.15481.44D24998000AE51600003C7922064244130A050E040D0C079D0A@comcast.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <080320061908.15481.44D24998000AE51600003C7922064244130A050E040D0C079D0A@comcast.net>
User-Agent: Mutt/1.4.2i
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Aug  3 19:08, Eric Blake wrote:
> > 
> > Theoretically, it's possible to implement posix_fadvise only for offset=0
> > and length=<length-of-file>, and have it fail with EINVAL otherwise...
> > While technically not POSIX-compliant, it would still allow for better
> > implementation of things like copy...
> 
> Even better, have it return 0 for success but do nothing when offset!=0
> or len!= 0.  It's called posix_fadvise for a reason - the implementation is
> free to ignore the advice when it can't reasonably use it.  EINVAL should
> only be used when passing a bad argument (ie. outside the range of
> defined POSIX_FADV_* constants).
> 
> There is also posix_fallocate, which may help the case of cp.

Does cp already use ftruncate?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

