diff options
author | <jgarzik@pretzel.yyz.us> | 2005-05-27 22:07:40 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-27 22:07:40 -0400 |
commit | ff0e0ea2f5d36fa90fc2c57fd019102b0a0cfabf (patch) | |
tree | 963cdd52a4032cd4827896c4e813cfbf6dd7b3e6 /arch/um/include/sysdep-x86_64/checksum.h | |
parent | 43f66a6ce8da299344cf1bc2ac2311889cc88555 (diff) | |
parent | 1f15d694522af9cd7492695f11dd2dc77b6cf098 (diff) |
Automatic merge of /spare/repo/netdev-2.6 branch we18
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 572c6c19be3..ea97005af69 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 |