As we handle missing sendfile() inside lib/sendfile.c, remove the WITH_SENDFILE ifdefs.
authorJeremy Allison <jra@samba.org>
Mon, 13 Dec 2010 22:00:34 +0000 (14:00 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 13 Dec 2010 22:47:07 +0000 (23:47 +0100)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec 13 23:47:07 CET 2010 on sn-devel-104

source3/smbd/reply.c
source3/utils/status_profile.c

index 5af5dacc9b1c56a24a12968af61e4ce7d91b7969..9601f5353acbc9396f08b01c47789f41f0c467f4 100644 (file)
@@ -2864,7 +2864,6 @@ static ssize_t fake_sendfile(files_struct *fsp, SMB_OFF_T startpos,
        return (ssize_t)nread;
 }
 
        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).
 /****************************************************************************
  Deal with the case of sendfile reading less bytes from the file than
  requested. Fill with zeros (all we can do).
@@ -2934,7 +2933,6 @@ static void sendfile_short_send(files_struct *fsp,
                SAFE_FREE(buf);
        }
 }
                SAFE_FREE(buf);
        }
 }
-#endif /* defined WITH_SENDFILE */
 
 /****************************************************************************
  Return a readbraw error (4 bytes of zero).
 
 /****************************************************************************
  Return a readbraw error (4 bytes of zero).
@@ -2978,7 +2976,6 @@ static void send_file_readbraw(connection_struct *conn,
        char *outbuf = NULL;
        ssize_t ret=0;
 
        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
        /*
         * We can only use sendfile on a non-chained packet 
         * but we can use on a non-oplocked file. tridge proved this
@@ -3053,7 +3050,6 @@ static void send_file_readbraw(connection_struct *conn,
        }
 
 normal_readbraw:
        }
 
 normal_readbraw:
-#endif
 
        outbuf = TALLOC_ARRAY(NULL, char, nread+4);
        if (!outbuf) {
 
        outbuf = TALLOC_ARRAY(NULL, char, nread+4);
        if (!outbuf) {
@@ -3528,7 +3524,6 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
                goto nosendfile_read;
        }
 
                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
        /*
         * We can only use sendfile on a non-chained packet
         * but we can use on a non-oplocked file. tridge proved this
@@ -3621,8 +3616,6 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
 
 normal_read:
 
 
 normal_read:
 
-#endif
-
        if ((smb_maxcnt & 0xFF0000) > 0x10000) {
                uint8 headerbuf[smb_size + 2*12];
 
        if ((smb_maxcnt & 0xFF0000) > 0x10000) {
                uint8 headerbuf[smb_size + 2*12];
 
index d39ae2d074183875d71d4c25c855369ac60b6cd0..ec0ea03806668cf817bdc4a7d062c39278eaa873 100644 (file)
@@ -81,11 +81,9 @@ bool status_profile_dump(bool verbose)
        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);
        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);
        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);
        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);