mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
EINVAL is also a valid error return, meaning "this filesystem
cannot do sendfile for this file"
This commit is contained in:
parent
c548e5c69f
commit
737f664604
@ -3198,8 +3198,9 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
|
||||
setup_readX_header((char *)headerbuf, smb_maxcnt);
|
||||
|
||||
if ((nread = SMB_VFS_SENDFILE(smbd_server_fd(), fsp, &header, startpos, smb_maxcnt)) == -1) {
|
||||
/* Returning ENOSYS means no data at all was sent. Do this as a normal read. */
|
||||
if (errno == ENOSYS) {
|
||||
/* Returning ENOSYS or EINVAL means no data at all was sent.
|
||||
Do this as a normal read. */
|
||||
if (errno == ENOSYS || errno == EINVAL) {
|
||||
goto normal_read;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user