diff --git a/ci_build.sh b/ci_build.sh index 284bbd4f..572c6d10 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -20,13 +20,13 @@ mv -n bin/kgc*.map bin/kgc*.sys _output/gcc/. mv -n bin/country.sys _output/gcc/. # GCC share ( + git submodule update --remote share cd share - git submodule update --init --recursive git clean -x -d -f env COMPILER=gcc ./build.sh ) -mv -n share/src/share.com _output/gcc/. -mv -n share/src/share.map _output/gcc/. +cp -p share/src/share.com _output/gcc/. +cp -p share/src/share.map _output/gcc/. # Open Watcom Environment Setup export WATCOM=$BUILD_DIR/_watcom @@ -95,13 +95,13 @@ if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then mv -n bin/country.sys _output/tc_dos/. # TC share ( + git submodule update --remote share cd share - git submodule update --init --recursive git clean -x -d -f env COMPILER=tcc2-emu ./build.sh ) - mv -n share/src/share.com _output/tc_dos/. - mv -n share/src/share.map _output/tc_dos/. + cp -p share/src/share.com _output/tc_dos/. + cp -p share/src/share.map _output/tc_dos/. fi echo done diff --git a/kernel/int2f.asm b/kernel/int2f.asm index 3e9462b8..d29f735e 100644 --- a/kernel/int2f.asm +++ b/kernel/int2f.asm @@ -357,17 +357,24 @@ SHARE_LOCK_UNLOCK: ; STATIC WORD share_is_file_open(const char far *filename) /* pointer to fully qualified filename */ global SHARE_IS_FILE_OPEN SHARE_IS_FILE_OPEN: - mov si, ds - mov es, si ; save ds - pop ax ; save return address - pop si ; filename - pop ds ; SEG filename - push ax ; restore return address + push bp + mov bp, sp + push si + push ds + lds si, [bp+4] ; DS:SI = filename mov ax, 0x10a6 - int 0x2f ; returns ax - mov si, es ; restore ds - mov ds, si - ret + clc + int 0x2f + jc .notopen ; someone returned an error + cmp ax, 1 ; only an explicit 1 means "open" + je .done +.notopen: + xor ax, ax +.done: + pop ds + pop si + pop bp + ret 4 ; Int 2F Multipurpose Remote System Calls ;