return (ssize_t)nread;
}
-#if defined(WITH_SENDFILE)
/****************************************************************************
Deal with the case of sendfile reading less bytes from the file than
requested. Fill with zeros (all we can do).
SAFE_FREE(buf);
}
}
-#endif /* defined WITH_SENDFILE */
/****************************************************************************
Return a readbraw error (4 bytes of zero).
char *outbuf = NULL;
ssize_t ret=0;
-#if defined(WITH_SENDFILE)
/*
* We can only use sendfile on a non-chained packet
* but we can use on a non-oplocked file. tridge proved this
}
normal_readbraw:
-#endif
outbuf = TALLOC_ARRAY(NULL, char, nread+4);
if (!outbuf) {
goto nosendfile_read;
}
-#if defined(WITH_SENDFILE)
/*
* We can only use sendfile on a non-chained packet
* but we can use on a non-oplocked file. tridge proved this
normal_read:
-#endif
-
if ((smb_maxcnt & 0xFF0000) > 0x10000) {
uint8 headerbuf[smb_size + 2*12];
d_printf("pwrite_count: %u\n", profile_p->syscall_pwrite_count);
d_printf("pwrite_time: %u\n", profile_p->syscall_pwrite_time);
d_printf("pwrite_bytes: %u\n", profile_p->syscall_pwrite_bytes);
-#ifdef WITH_SENDFILE
d_printf("sendfile_count: %u\n", profile_p->syscall_sendfile_count);
d_printf("sendfile_time: %u\n", profile_p->syscall_sendfile_time);
d_printf("sendfile_bytes: %u\n", profile_p->syscall_sendfile_bytes);
-#endif
d_printf("lseek_count: %u\n", profile_p->syscall_lseek_count);
d_printf("lseek_time: %u\n", profile_p->syscall_lseek_time);
d_printf("rename_count: %u\n", profile_p->syscall_rename_count);