This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin copy problems usb 2.0


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]