patch-2.1.26 linux/include/asm-i386/checksum.h
Next file: linux/include/linux/fs.h
Previous file: linux/include/asm-alpha/system.h
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Fri Feb 7 15:54:54 1997
- Orig file:
v2.1.25/linux/include/asm-i386/checksum.h
- Orig date:
Thu Feb 6 12:42:11 1997
diff -u --recursive --new-file v2.1.25/linux/include/asm-i386/checksum.h linux/include/asm-i386/checksum.h
@@ -23,26 +23,42 @@
* better 64-bit) boundary
*/
-unsigned int csum_partial_copy_from_user( int * err, const char *src,
- char *dst, int len, int sum);
+unsigned int csum_partial_copy_generic( const char *src, char *dst, int len, int sum,
+ int *src_err_ptr, int *dst_err_ptr);
+
+extern __inline__
+unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
+ int len, int sum)
+{
+ int *src_err_ptr=NULL, *dst_err_ptr=NULL;
+
+ return csum_partial_copy_generic ( src, dst, len, sum, src_err_ptr, dst_err_ptr);
+}
+
+extern __inline__
+unsigned int csum_partial_copy_from_user ( const char *src, char *dst,
+ int len, int sum, int *err_ptr)
+{
+ int *dst_err_ptr=NULL;
+
+ return csum_partial_copy_generic ( src, dst, len, sum, err_ptr, dst_err_ptr);
+}
/*
- * I hope GCC will optimize 'dummy' away ...
+ * This combination is currently not used, but possible:
*/
-unsigned int csum_partial_copy_nocheck_generic( int * err, const char *src, char *dst,
- int len, int sum);
-
-extern __inline__ unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
- int len, int sum)
+extern __inline__
+unsigned int csum_partial_copy_to_user ( const char *src, char *dst,
+ int len, int sum, int *err_ptr)
{
- int dummy;
+ int *src_err_ptr=NULL;
- return csum_partial_copy_nocheck_generic ( &dummy, src, dst, len, sum);
+ return csum_partial_copy_generic ( src, dst, len, sum, src_err_ptr, err_ptr);
}
/*
- * These are the 'old' way of doing checksums, a warning message will be
+ * These are the old (and unsafe) way of doing checksums, a warning message will be
* printed if they are used and an exeption occurs.
*
* these functions should go away after some time.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov