patch-2.1.79 linux/arch/sparc64/kernel/binfmt_aout32.c
Next file: linux/arch/sparc64/kernel/dtlb_miss.S
Previous file: linux/arch/sparc64/kernel/Makefile
Back to the patch index
Back to the overall index
- Lines: 58
- Date:
Mon Jan 12 15:15:44 1998
- Orig file:
v2.1.78/linux/arch/sparc64/kernel/binfmt_aout32.c
- Orig date:
Sat Oct 25 02:44:15 1997
diff -u --recursive --new-file v2.1.78/linux/arch/sparc64/kernel/binfmt_aout32.c linux/arch/sparc64/kernel/binfmt_aout32.c
@@ -57,11 +57,12 @@
* macros to write out all the necessary info.
*/
#define DUMP_WRITE(addr,nr) \
-while (file.f_op->write(inode,&file,(char *)(addr),(nr)) != (nr)) goto close_coredump
+while (file.f_op->write(&file,(char *)(addr),(nr),&file.f_pos) != (nr)) \
+ goto close_coredump
#define DUMP_SEEK(offset) \
if (file.f_op->llseek) { \
- if (file.f_op->llseek(inode,&file,(offset),0) != (offset)) \
+ if (file.f_op->llseek(&file,(offset),0) != (offset)) \
goto close_coredump; \
} else file.f_pos = (offset)
@@ -81,7 +82,7 @@
struct dentry * dentry = NULL;
struct inode * inode = NULL;
struct file file;
- unsigned short fs;
+ mm_segment_t fs;
int has_dumped = 0;
char corefile[6+sizeof(current->comm)];
unsigned long dump_start, dump_size;
@@ -256,7 +257,7 @@
unsigned long p = bprm->p;
unsigned long fd_offset;
unsigned long rlim;
- int retval;
+int retval;
ex = *((struct exec *) bprm->buf); /* exec-header */
if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
@@ -285,8 +286,6 @@
return retval;
/* OK, This is the point of no return */
- memcpy(¤t->tss.core_exec, &ex, sizeof(struct exec));
-
current->mm->end_code = ex.a_text +
(current->mm->start_code = N_TXTADDR(ex));
current->mm->end_data = ex.a_data +
@@ -420,13 +419,13 @@
/* Seek into the file */
if (file->f_op->llseek) {
- if ((error = file->f_op->llseek(inode, file, 0, 0)) != 0)
+ if ((error = file->f_op->llseek(file, 0, 0)) != 0)
return -ENOEXEC;
} else
file->f_pos = 0;
set_fs(KERNEL_DS);
- error = file->f_op->read(inode, file, (char *) &ex, sizeof(ex));
+ error = file->f_op->read(file, (char *) &ex, sizeof(ex), &file->f_pos);
set_fs(USER_DS);
if (error != sizeof(ex))
return -ENOEXEC;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov