diff options
author | Thomas Gleixner <tglx@tglx.tec.linutronix.de> | 2005-05-23 15:11:45 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 15:11:45 +0200 |
commit | f08276136bdc8607c1da493279569beb9859b133 (patch) | |
tree | 5a4e7ea9300eece5ff5187fa7f64f0f48f37cf12 /arch/um/include/sysdep-x86_64/checksum.h | |
parent | 7d27c8143c8234e1cae8285fd2d43c19dad69bde (diff) | |
parent | 1263cc67c09bc7f913a6877f3ba0427f0b76617e (diff) | |
download | linux-f08276136bdc8607c1da493279569beb9859b133.tar.gz linux-f08276136bdc8607c1da493279569beb9859b133.tar.bz2 linux-f08276136bdc8607c1da493279569beb9859b133.zip |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/um/include/sysdep-x86_64/checksum.h')
-rw-r--r-- | arch/um/include/sysdep-x86_64/checksum.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/arch/um/include/sysdep-x86_64/checksum.h b/arch/um/include/sysdep-x86_64/checksum.h index 572c6c19be33..ea97005af694 100644 --- a/arch/um/include/sysdep-x86_64/checksum.h +++ b/arch/um/include/sysdep-x86_64/checksum.h @@ -9,8 +9,6 @@ #include "linux/in6.h" #include "asm/uaccess.h" -extern unsigned int csum_partial_copy_from(const unsigned char *src, unsigned char *dst, int len, - int sum, int *err_ptr); extern unsigned csum_partial(const unsigned char *buff, unsigned len, unsigned sum); @@ -31,10 +29,15 @@ unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char * } static __inline__ -unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, - int len, int sum, int *err_ptr) +unsigned int csum_partial_copy_from_user(const unsigned char *src, + unsigned char *dst, int len, int sum, + int *err_ptr) { - return csum_partial_copy_from(src, dst, len, sum, err_ptr); + if(copy_from_user(dst, src, len)){ + *err_ptr = -EFAULT; + return(-1); + } + return csum_partial(dst, len, sum); } /** @@ -137,15 +140,6 @@ static inline unsigned add32_with_carry(unsigned a, unsigned b) return a; } -#endif +extern unsigned short ip_compute_csum(unsigned char * buff, int len); -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ +#endif |