From: Alan Cox Date: Fri, 31 Oct 2014 16:24:54 +0000 (+0000) Subject: execve: Correct cpm emulator loading X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c6c2008dbec848ef8fc42d25c8ac1d5e2e04e87f;p=FUZIX.git execve: Correct cpm emulator loading We moved to a real off_t and lseek behaviour but that didn't get propogated into the CP/M emulator loading logic. --- diff --git a/Kernel/syscall_other.c b/Kernel/syscall_other.c index b46fa5e6..e6186212 100644 --- a/Kernel/syscall_other.c +++ b/Kernel/syscall_other.c @@ -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));