mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
Return error from fget_write() rather than hardcoding EBADF now that
fget_write() DTRT. Requested by: bde
This commit is contained in:
parent
38f63f7e47
commit
af56abaab5
2 changed files with 3 additions and 3 deletions
|
|
@ -398,7 +398,7 @@ kern_writev(struct thread *td, int fd, struct uio *auio)
|
|||
|
||||
error = fget_write(td, fd, &fp);
|
||||
if (error)
|
||||
return (EBADF);
|
||||
return (error);
|
||||
error = dofilewrite(td, fd, fp, auio, (off_t)-1, 0);
|
||||
fdrop(fp, td);
|
||||
return (error);
|
||||
|
|
@ -444,7 +444,7 @@ kern_pwritev(td, fd, auio, offset)
|
|||
|
||||
error = fget_write(td, fd, &fp);
|
||||
if (error)
|
||||
return (EBADF);
|
||||
return (error);
|
||||
if (!(fp->f_ops->fo_flags & DFLAG_SEEKABLE))
|
||||
error = ESPIPE;
|
||||
else if (offset < 0 && fp->f_vnode->v_type != VCHR)
|
||||
|
|
|
|||
|
|
@ -1447,7 +1447,7 @@ _aio_aqueue(struct thread *td, struct aiocb *job, struct aio_liojob *lj,
|
|||
uma_zfree(aiocb_zone, aiocbe);
|
||||
if (type == 0)
|
||||
suword(&job->_aiocb_private.error, EBADF);
|
||||
return (EBADF);
|
||||
return (error);
|
||||
}
|
||||
aiocbe->fd_file = fp;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue