patch-1.3.62 linux/fs/proc/array.c

Next file: linux/include/linux/msdos_fs.h
Previous file: linux/fs/fat/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.61/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -123,9 +123,6 @@
 };
 
 
-extern unsigned long prof_len;
-extern unsigned long * prof_buffer;
-extern unsigned long prof_shift;
 /*
  * This function accesses profiling information. The returned data is
  * binary: the sampling step and the actual contents of the profile
@@ -137,21 +134,21 @@
 	unsigned long p = file->f_pos;
 	int read;
 	char * pnt;
-	unsigned long sample_step = 1 << prof_shift;
+	unsigned int sample_step = 1 << prof_shift;
 
 	if (count < 0)
 		return -EINVAL;
-	if (p >= (prof_len+1)*sizeof(unsigned long))
+	if (p >= (prof_len+1)*sizeof(unsigned int))
 		return 0;
-	if (count > (prof_len+1)*sizeof(unsigned long) - p)
-		count = (prof_len+1)*sizeof(unsigned long) - p;
+	if (count > (prof_len+1)*sizeof(unsigned int) - p)
+		count = (prof_len+1)*sizeof(unsigned int) - p;
 	read = 0;
 
-	while (p < sizeof(unsigned long) && count > 0) {
+	while (p < sizeof(unsigned int) && count > 0) {
 		put_user(*((char *)(&sample_step)+p),buf);
 		buf++; p++; count--; read++;
 	}
-	pnt = (char *)prof_buffer + p - sizeof(unsigned long);
+	pnt = (char *)prof_buffer + p - sizeof(unsigned int);
 	memcpy_tofs(buf,(void *)pnt,count);
 	read += count;
 	file->f_pos += read;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this