patch-2.4.9 linux/fs/ncpfs/file.c

Next file: linux/fs/ncpfs/mmap.c
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/fs/ncpfs/file.c linux/fs/ncpfs/file.c
@@ -22,11 +22,6 @@
 #include <linux/ncp_fs.h>
 #include "ncplib_kernel.h"
 
-static inline unsigned int min(unsigned int a, unsigned int b)
-{
-	return a < b ? a : b;
-}
-
 static int ncp_fsync(struct file *file, struct dentry *dentry, int datasync)
 {
 	return 0;
@@ -157,8 +152,9 @@
 	/* First read in as much as possible for each bufsize. */
 	while (already_read < count) {
 		int read_this_time;
-		size_t to_read = min(bufsize - (pos % bufsize),
-				  count - already_read);
+		size_t to_read = min(unsigned int,
+				     bufsize - (pos % bufsize),
+				     count - already_read);
 
 		error = ncp_read_bounce(NCP_SERVER(inode),
 			 	NCP_FINFO(inode)->file_handle,
@@ -238,8 +234,9 @@
 	}
 	while (already_written < count) {
 		int written_this_time;
-		size_t to_write = min(bufsize - (pos % bufsize),
-				   count - already_written);
+		size_t to_write = min(unsigned int,
+				      bufsize - (pos % bufsize),
+				      count - already_written);
 
 		if (copy_from_user(bouncebuffer, buf, to_write)) {
 			errno = -EFAULT;
@@ -284,6 +281,7 @@
 
 struct file_operations ncp_file_operations =
 {
+	llseek:		generic_file_llseek,
 	read:		ncp_file_read,
 	write:		ncp_file_write,
 	ioctl:		ncp_ioctl,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)