patch-2.0.21-2.1.0 linux/fs/binfmt_elf.c

Next file: linux/fs/block_dev.c
Previous file: linux/fs/binfmt_aout.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file lx2.0/v2.0.21/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -108,7 +108,8 @@
 				  unsigned long load_addr,
 				  unsigned long interp_load_addr, int ibcs)
 {
-	unsigned long *argv, *envp, *dlinfo;
+	char **argv, **envp;
+	unsigned long *dlinfo;
 	unsigned long *sp;
 
 	/*
@@ -118,12 +119,12 @@
 	sp -= exec ? DLINFO_ITEMS*2 : 2;
 	dlinfo = sp;
 	sp -= envc+1;
-	envp = sp;
+	envp = (char **) sp;
 	sp -= argc+1;
-	argv = sp;
+	argv = (char **) sp;
 	if (!ibcs) {
-		put_user(envp,--sp);
-		put_user(argv,--sp);
+		put_user((unsigned long) envp,--sp);
+		put_user((unsigned long) argv,--sp);
 	}
 
 #define NEW_AUX_ENT(id, val) \
@@ -154,13 +155,13 @@
 		put_user(p,argv++);
 		while (get_user(p++)) /* nothing */ ;
 	}
-	put_user(0,argv);
+	put_user(NULL, argv);
 	current->mm->arg_end = current->mm->env_start = (unsigned long) p;
 	while (envc-->0) {
 		put_user(p,envp++);
 		while (get_user(p++)) /* nothing */ ;
 	}
-	put_user(0,envp);
+	put_user(NULL, envp);
 	current->mm->env_end = (unsigned long) p;
 	return sp;
 }
@@ -754,8 +755,8 @@
 		return -EACCES;
 
 	/* seek to the beginning of the file */
-	if (file->f_op->lseek) {
-		if ((error = file->f_op->lseek(inode, file, 0, 0)) != 0)
+	if (file->f_op->llseek) {
+		if ((error = file->f_op->llseek(inode, file, 0, 0)) != 0)
 			return -ENOEXEC;
 	} else
 		file->f_pos = 0;
@@ -863,8 +864,8 @@
 
 static int dump_seek(struct file *file, off_t off)
 {
-	if (file->f_op->lseek) {
-		if (file->f_op->lseek(file->f_inode, file, off, 0) != off)
+	if (file->f_op->llseek) {
+		if (file->f_op->llseek(file->f_inode, file, off, 0) != off)
 			return 0;
 	} else
 		file->f_pos = off;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov