diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
commit | 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch) | |
tree | 2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /net/khttpd | |
parent | 216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff) |
Merge with Linux 2.3.32.
Diffstat (limited to 'net/khttpd')
-rw-r--r-- | net/khttpd/datasending.c | 11 | ||||
-rw-r--r-- | net/khttpd/main.c | 7 |
2 files changed, 13 insertions, 5 deletions
diff --git a/net/khttpd/datasending.c b/net/khttpd/datasending.c index d435af64d..7a1afc1df 100644 --- a/net/khttpd/datasending.c +++ b/net/khttpd/datasending.c @@ -55,16 +55,23 @@ This send_actor is for use with do_generic_file_read (ie sendfile()) It sends the data to the socket indicated by desc->buf. */ -static int sock_send_actor(read_descriptor_t * desc, const char *area, unsigned long size) +static int sock_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size) { int written; + unsigned long kaddr; unsigned long count = desc->count; struct socket *sock = (struct socket *) desc->buf; + mm_segment_t old_fs; if (size > count) size = count; - written = SendBuffer_async(sock,(char *)area,size); + old_fs = get_fs(); + set_fs(KERNEL_DS); + kaddr = kmap(page); + written = SendBuffer_async(sock,(char *)kaddr + offset,size); + kunmap(page); + set_fs(old_fs); if (written < 0) { desc->error = written; written = 0; diff --git a/net/khttpd/main.c b/net/khttpd/main.c index 5746bc4f7..418037907 100644 --- a/net/khttpd/main.c +++ b/net/khttpd/main.c @@ -50,6 +50,10 @@ Userspace * ****************************************************************/ + +static int errno; +#define __KERNEL_SYSCALLS__ + #include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> @@ -176,9 +180,6 @@ static int MainDaemon(void *cpu_pointer) static int CountBuf[CONFIG_KHTTPD_NUMCPU]; -static int errno; -inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options); - /* |