diff --git a/kernel/blockio.c b/kernel/blockio.c index 9a66fad..0c02db1 100644 --- a/kernel/blockio.c +++ b/kernel/blockio.c @@ -342,7 +342,7 @@ BOOL flush(void) } while (FP_OFF(bp) != FP_OFF(firstbuf)); - remote_flushall(); + network_redirector(REM_FLUSHALL); return (ok); } diff --git a/kernel/dosfns.c b/kernel/dosfns.c index bbbc6dc..c3bbe11 100644 --- a/kernel/dosfns.c +++ b/kernel/dosfns.c @@ -997,7 +997,8 @@ COUNT DosChangeDir(BYTE FAR * s) #endif /* now get fs to change to new */ /* directory */ - result = (result & IS_NETWORK ? remote_chdir() : dos_cd(PriPathName)); + result = (result & IS_NETWORK ? network_redirector(REM_CHDIR) : + dos_cd(PriPathName)); #if defined(CHDIR_DEBUG) printf("status = %04x, new_path='%Fs'\n", result, cdsd->cdsCurrentPath); #endif @@ -1195,7 +1196,7 @@ COUNT DosGetFattr(BYTE FAR * name) return 0x10; if (result & IS_NETWORK) - return remote_getfattr(); + return network_redirector(REM_GETATTRZ); if (result & IS_DEVICE) return DE_FILENOTFND; @@ -1281,7 +1282,7 @@ COUNT DosDelete(BYTE FAR * path, int attrib) return result; if (result & IS_NETWORK) - return remote_delete(); + return network_redirector(REM_DELETE); if (result & IS_DEVICE) return DE_FILENOTFND; @@ -1296,7 +1297,7 @@ COUNT DosRenameTrue(BYTE * path1, BYTE * path2, int attrib) return DE_DEVICE; /* not same device */ } if (FP_OFF(current_ldt) == 0xFFFF || (current_ldt->cdsFlags & CDSNETWDRV)) - return remote_rename(); + return network_redirector(REM_RENAME); return dos_rename(path1, path2, attrib); } @@ -1331,7 +1332,7 @@ COUNT DosMkdir(const char FAR * dir) return result; if (result & IS_NETWORK) - return remote_mkdir(); + return network_redirector(REM_MKDIR); if (result & IS_DEVICE) return DE_ACCESS; @@ -1352,7 +1353,7 @@ COUNT DosRmdir(const char FAR * dir) return result; if (result & IS_NETWORK) - return remote_rmdir(); + return network_redirector(REM_RMDIR); if (result & IS_DEVICE) return DE_ACCESS; diff --git a/kernel/int2f.asm b/kernel/int2f.asm index ee12fd1..adfb141 100644 --- a/kernel/int2f.asm +++ b/kernel/int2f.asm @@ -273,20 +273,14 @@ SHARE_LOCK_UNLOCK: ; sumtimes return data *ptr is the push stack word ; - global _remote_rmdir -_remote_rmdir: - mov al, 01h - jmp short call_int2f - - global _remote_mkdir -_remote_mkdir: - mov al, 03h - jmp short call_int2f - - global _remote_chdir -_remote_chdir: - mov al, 05h - jmp short call_int2f + global NETWORK_REDIRECTOR +NETWORK_REDIRECTOR: + push bp + mov bp, sp + mov al, [bp+4] + pop bp + call call_int2f + ret 2 global _remote_close _remote_close: @@ -316,21 +310,6 @@ _remote_setfattr: mov al, 0eh jmp short call_int2f - global _remote_getfattr -_remote_getfattr: - mov al, 0fh - jmp short call_int2f - - global _remote_rename -_remote_rename: - mov al, 11h - jmp short call_int2f - - global _remote_delete -_remote_delete: - mov al, 13h - jmp short call_int2f - global _remote_open _remote_open: mov al, 16h @@ -351,11 +330,6 @@ _remote_findnext: mov al, 1ch jmp short call_int2f - global _remote_close_all -_remote_close_all: - mov al, 1dh - jmp short call_int2f - global _remote_doredirect _remote_doredirect: mov al, 1eh @@ -366,11 +340,6 @@ _remote_printset: mov al, 1fh jmp short call_int2f - global _remote_flushall -_remote_flushall: - mov al, 20h - jmp short call_int2f - global _remote_lseek _remote_lseek: mov al, 21h diff --git a/kernel/proto.h b/kernel/proto.h index 1541a21..ba18754 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -379,21 +379,14 @@ int DosMkTmp(BYTE FAR * pathname, UWORD attr); COUNT truename(const char FAR * src, char * dest, COUNT t); /* network.c */ +COUNT ASMPASCAL network_redirector(unsigned cmd); COUNT ASMCFUNC remote_doredirect(UWORD b, UCOUNT n, UWORD d, VOID FAR * s, UWORD i, VOID FAR * data); COUNT ASMCFUNC remote_printset(UWORD b, UCOUNT n, UWORD d, VOID FAR * s, UWORD i, VOID FAR * data); -COUNT ASMCFUNC remote_rename(VOID); -COUNT ASMCFUNC remote_delete(VOID); -COUNT ASMCFUNC remote_chdir(VOID); -COUNT ASMCFUNC remote_mkdir(VOID); -COUNT ASMCFUNC remote_rmdir(VOID); -COUNT ASMCFUNC remote_close_all(VOID); COUNT ASMCFUNC remote_process_end(VOID); -COUNT ASMCFUNC remote_flushall(VOID); COUNT ASMCFUNC remote_findfirst(VOID FAR * s); COUNT ASMCFUNC remote_findnext(VOID FAR * s); -COUNT ASMCFUNC remote_getfattr(VOID); COUNT ASMCFUNC remote_getfree(VOID FAR * s, VOID * d); COUNT ASMCFUNC remote_open(sft FAR * s, COUNT mode); int ASMCFUNC remote_extopen(sft FAR * s, unsigned attr); @@ -412,16 +405,8 @@ COUNT ASMCFUNC QRemote_Fn(char FAR * d, const char FAR * s); #pragma aux cdecl_axdx "_*" parm caller [] modify exact [ax dx] #pragma aux (cdecl_axdx) remote_doredirect #pragma aux (cdecl_axdx) remote_printset -#pragma aux (cdecl_axdx) remote_rename -#pragma aux (cdecl_axdx) remote_delete -#pragma aux (cdecl_axdx) remote_chdir -#pragma aux (cdecl_axdx) remote_mkdir -#pragma aux (cdecl_axdx) remote_rmdir -#pragma aux (cdecl_axdx) remote_close_all -#pragma aux (cdecl_axdx) remote_flushall #pragma aux (cdecl_axdx) remote_findfirst #pragma aux (cdecl_axdx) remote_findnext -#pragma aux (cdecl_axdx) remote_getfattr #pragma aux (cdecl_axdx) remote_getfree #pragma aux (cdecl_axdx) remote_open #pragma aux (cdecl_axdx) remote_extopen @@ -434,6 +419,7 @@ COUNT ASMCFUNC QRemote_Fn(char FAR * d, const char FAR * s); #pragma aux (cdecl_axdx) remote_commit #pragma aux (cdecl_axdx) remote_close #pragma aux (cdecl_axdx) QRemote_Fn +#pragma aux (pascal) network_redirector modify exact [ax dx] #endif UWORD get_machine_name(BYTE FAR * netname); diff --git a/kernel/task.c b/kernel/task.c index c4653bf..236b4cc 100644 --- a/kernel/task.c +++ b/kernel/task.c @@ -522,11 +522,13 @@ VOID return_user(void) setvec(0x24, p->ps_isv24); /* And free all process memory if not a TSR return */ - remote_process_end(); /* might be a good idea to do that after closing - but doesn't help NET either TE */ + network_redirector(REM_PROCESS_END); + /* might be a good idea to do that after closing + but doesn't help NET either TE */ + if (!tsr) { - remote_close_all(); + network_redirector(REM_CLOSEALL); for (i = 0; i < p->ps_maxfiles; i++) { DosClose(i);