Move everything to negative errno return types (#1499)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

This commit is contained in:
trapexit 2025-07-25 17:53:48 -05:00 • committed by GitHub
parent 2b500f194a
commit e8cd74cab0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
177 changed files with 5952 additions and 5843 deletions

View file

@ -14,6 +14,8 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "fs_copydata_copy_file_range.hpp"
#include "errno.hpp"
#include "fs_copy_file_range.hpp"
#include "fs_fstat.hpp"
@ -38,29 +40,28 @@ _copydata_copy_file_range(const int src_fd_,
do
{
rv = fs::copy_file_range(src_fd_,&src_off,dst_fd_,&dst_off,nleft,0);
if((rv == -1) && (errno == EINTR))
if(rv == -EINTR)
continue;
if((rv == -1) && (errno == EAGAIN))
if(rv == -EAGAIN)
continue;
if(rv == -1)
return -1;
if(rv == 0)
break;
if(rv < 0)
return rv;
nleft -= rv;
}
while(nleft > 0);
return size_;
return (size_ - nleft);
}
namespace fs
s64
fs::copydata_copy_file_range(const int src_fd_,
const int dst_fd_,
const u64 count_)
{
s64
copydata_copy_file_range(const int src_fd_,
const int dst_fd_,
const u64 count_)
{
return ::_copydata_copy_file_range(src_fd_,
dst_fd_,
count_);
}
return ::_copydata_copy_file_range(src_fd_,
dst_fd_,
count_);
}