execve: Correct cpm emulator loading
authorAlan Cox <alan@etchedpixels.co.uk>
Fri, 31 Oct 2014 16:24:54 +0000 (16:24 +0000)
committerAlan Cox <alan@etchedpixels.co.uk>
Fri, 31 Oct 2014 16:24:54 +0000 (16:24 +0000)
We moved to a real off_t and lseek behaviour but that didn't get propogated
into the CP/M emulator loading logic.

Kernel/syscall_other.c

index b46fa5e..e618621 100644 (file)
@@ -505,9 +505,7 @@ int16_t _execve(void)
 #ifdef CONFIG_CPM_EMU
        // Load the CP/M emulator if it is required
        if (emu_ino) {
-               emu_size =
-                   (512 * emu_ino->c_node.i_size.o_blkno) +
-                   emu_ino->c_node.i_size.o_offset;
+               emu_size = emu_ino->c_node.i_size;
                // round up to nearest multiple of 256 bytes, fit it in below ramtop
                emu_ptr =
                    (char *) (udata.u_top - ((emu_size + 255) & 0xff00));