diff options
author | Anton Altaparmakov | 2005-05-21 23:00:02 +0200 |
---|---|---|
committer | Anton Altaparmakov | 2005-05-21 23:00:02 +0200 |
commit | 67394f8f069c2fdf90f3b6d851824c07815442af (patch) | |
tree | 0c33e62d34dbaecea434ae9ece3cc0c56db8b1f7 /arch/um/include/sysdep-x86_64/checksum.h | |
parent | Merge with /usr/src/ntfs-2.6.git (diff) | |
parent | Automatic merge of rsync://www.parisc-linux.org/~jejb/git/scsi-for-linus-2.6.git (diff) | |
download | kernel-qcow2-linux-67394f8f069c2fdf90f3b6d851824c07815442af.tar.gz kernel-qcow2-linux-67394f8f069c2fdf90f3b6d851824c07815442af.tar.xz kernel-qcow2-linux-67394f8f069c2fdf90f3b6d851824c07815442af.zip |
Merge with /usr/src/ntfs-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 |