mirror of https://github.com/FDOS/kernel.git
Start reducing the number of network redirector functions in int2f.asm.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@890 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
545b571c3e
commit
c4e65eb689
|
@ -342,7 +342,7 @@ BOOL flush(void)
|
||||||
}
|
}
|
||||||
while (FP_OFF(bp) != FP_OFF(firstbuf));
|
while (FP_OFF(bp) != FP_OFF(firstbuf));
|
||||||
|
|
||||||
remote_flushall();
|
network_redirector(REM_FLUSHALL);
|
||||||
|
|
||||||
return (ok);
|
return (ok);
|
||||||
}
|
}
|
||||||
|
|
|
@ -997,7 +997,8 @@ COUNT DosChangeDir(BYTE FAR * s)
|
||||||
#endif
|
#endif
|
||||||
/* now get fs to change to new */
|
/* now get fs to change to new */
|
||||||
/* directory */
|
/* 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)
|
#if defined(CHDIR_DEBUG)
|
||||||
printf("status = %04x, new_path='%Fs'\n", result, cdsd->cdsCurrentPath);
|
printf("status = %04x, new_path='%Fs'\n", result, cdsd->cdsCurrentPath);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1195,7 +1196,7 @@ COUNT DosGetFattr(BYTE FAR * name)
|
||||||
return 0x10;
|
return 0x10;
|
||||||
|
|
||||||
if (result & IS_NETWORK)
|
if (result & IS_NETWORK)
|
||||||
return remote_getfattr();
|
return network_redirector(REM_GETATTRZ);
|
||||||
|
|
||||||
if (result & IS_DEVICE)
|
if (result & IS_DEVICE)
|
||||||
return DE_FILENOTFND;
|
return DE_FILENOTFND;
|
||||||
|
@ -1281,7 +1282,7 @@ COUNT DosDelete(BYTE FAR * path, int attrib)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (result & IS_NETWORK)
|
if (result & IS_NETWORK)
|
||||||
return remote_delete();
|
return network_redirector(REM_DELETE);
|
||||||
|
|
||||||
if (result & IS_DEVICE)
|
if (result & IS_DEVICE)
|
||||||
return DE_FILENOTFND;
|
return DE_FILENOTFND;
|
||||||
|
@ -1296,7 +1297,7 @@ COUNT DosRenameTrue(BYTE * path1, BYTE * path2, int attrib)
|
||||||
return DE_DEVICE; /* not same device */
|
return DE_DEVICE; /* not same device */
|
||||||
}
|
}
|
||||||
if (FP_OFF(current_ldt) == 0xFFFF || (current_ldt->cdsFlags & CDSNETWDRV))
|
if (FP_OFF(current_ldt) == 0xFFFF || (current_ldt->cdsFlags & CDSNETWDRV))
|
||||||
return remote_rename();
|
return network_redirector(REM_RENAME);
|
||||||
|
|
||||||
return dos_rename(path1, path2, attrib);
|
return dos_rename(path1, path2, attrib);
|
||||||
}
|
}
|
||||||
|
@ -1331,7 +1332,7 @@ COUNT DosMkdir(const char FAR * dir)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (result & IS_NETWORK)
|
if (result & IS_NETWORK)
|
||||||
return remote_mkdir();
|
return network_redirector(REM_MKDIR);
|
||||||
|
|
||||||
if (result & IS_DEVICE)
|
if (result & IS_DEVICE)
|
||||||
return DE_ACCESS;
|
return DE_ACCESS;
|
||||||
|
@ -1352,7 +1353,7 @@ COUNT DosRmdir(const char FAR * dir)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (result & IS_NETWORK)
|
if (result & IS_NETWORK)
|
||||||
return remote_rmdir();
|
return network_redirector(REM_RMDIR);
|
||||||
|
|
||||||
if (result & IS_DEVICE)
|
if (result & IS_DEVICE)
|
||||||
return DE_ACCESS;
|
return DE_ACCESS;
|
||||||
|
|
|
@ -273,20 +273,14 @@ SHARE_LOCK_UNLOCK:
|
||||||
; sumtimes return data *ptr is the push stack word
|
; sumtimes return data *ptr is the push stack word
|
||||||
;
|
;
|
||||||
|
|
||||||
global _remote_rmdir
|
global NETWORK_REDIRECTOR
|
||||||
_remote_rmdir:
|
NETWORK_REDIRECTOR:
|
||||||
mov al, 01h
|
push bp
|
||||||
jmp short call_int2f
|
mov bp, sp
|
||||||
|
mov al, [bp+4]
|
||||||
global _remote_mkdir
|
pop bp
|
||||||
_remote_mkdir:
|
call call_int2f
|
||||||
mov al, 03h
|
ret 2
|
||||||
jmp short call_int2f
|
|
||||||
|
|
||||||
global _remote_chdir
|
|
||||||
_remote_chdir:
|
|
||||||
mov al, 05h
|
|
||||||
jmp short call_int2f
|
|
||||||
|
|
||||||
global _remote_close
|
global _remote_close
|
||||||
_remote_close:
|
_remote_close:
|
||||||
|
@ -316,21 +310,6 @@ _remote_setfattr:
|
||||||
mov al, 0eh
|
mov al, 0eh
|
||||||
jmp short call_int2f
|
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
|
global _remote_open
|
||||||
_remote_open:
|
_remote_open:
|
||||||
mov al, 16h
|
mov al, 16h
|
||||||
|
@ -351,11 +330,6 @@ _remote_findnext:
|
||||||
mov al, 1ch
|
mov al, 1ch
|
||||||
jmp short call_int2f
|
jmp short call_int2f
|
||||||
|
|
||||||
global _remote_close_all
|
|
||||||
_remote_close_all:
|
|
||||||
mov al, 1dh
|
|
||||||
jmp short call_int2f
|
|
||||||
|
|
||||||
global _remote_doredirect
|
global _remote_doredirect
|
||||||
_remote_doredirect:
|
_remote_doredirect:
|
||||||
mov al, 1eh
|
mov al, 1eh
|
||||||
|
@ -366,11 +340,6 @@ _remote_printset:
|
||||||
mov al, 1fh
|
mov al, 1fh
|
||||||
jmp short call_int2f
|
jmp short call_int2f
|
||||||
|
|
||||||
global _remote_flushall
|
|
||||||
_remote_flushall:
|
|
||||||
mov al, 20h
|
|
||||||
jmp short call_int2f
|
|
||||||
|
|
||||||
global _remote_lseek
|
global _remote_lseek
|
||||||
_remote_lseek:
|
_remote_lseek:
|
||||||
mov al, 21h
|
mov al, 21h
|
||||||
|
|
|
@ -379,21 +379,14 @@ int DosMkTmp(BYTE FAR * pathname, UWORD attr);
|
||||||
COUNT truename(const char FAR * src, char * dest, COUNT t);
|
COUNT truename(const char FAR * src, char * dest, COUNT t);
|
||||||
|
|
||||||
/* network.c */
|
/* network.c */
|
||||||
|
COUNT ASMPASCAL network_redirector(unsigned cmd);
|
||||||
COUNT ASMCFUNC remote_doredirect(UWORD b, UCOUNT n, UWORD d, VOID FAR * s,
|
COUNT ASMCFUNC remote_doredirect(UWORD b, UCOUNT n, UWORD d, VOID FAR * s,
|
||||||
UWORD i, VOID FAR * data);
|
UWORD i, VOID FAR * data);
|
||||||
COUNT ASMCFUNC remote_printset(UWORD b, UCOUNT n, UWORD d, VOID FAR * s,
|
COUNT ASMCFUNC remote_printset(UWORD b, UCOUNT n, UWORD d, VOID FAR * s,
|
||||||
UWORD i, VOID FAR * data);
|
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_process_end(VOID);
|
||||||
COUNT ASMCFUNC remote_flushall(VOID);
|
|
||||||
COUNT ASMCFUNC remote_findfirst(VOID FAR * s);
|
COUNT ASMCFUNC remote_findfirst(VOID FAR * s);
|
||||||
COUNT ASMCFUNC remote_findnext(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_getfree(VOID FAR * s, VOID * d);
|
||||||
COUNT ASMCFUNC remote_open(sft FAR * s, COUNT mode);
|
COUNT ASMCFUNC remote_open(sft FAR * s, COUNT mode);
|
||||||
int ASMCFUNC remote_extopen(sft FAR * s, unsigned attr);
|
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 "_*" parm caller [] modify exact [ax dx]
|
||||||
#pragma aux (cdecl_axdx) remote_doredirect
|
#pragma aux (cdecl_axdx) remote_doredirect
|
||||||
#pragma aux (cdecl_axdx) remote_printset
|
#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_findfirst
|
||||||
#pragma aux (cdecl_axdx) remote_findnext
|
#pragma aux (cdecl_axdx) remote_findnext
|
||||||
#pragma aux (cdecl_axdx) remote_getfattr
|
|
||||||
#pragma aux (cdecl_axdx) remote_getfree
|
#pragma aux (cdecl_axdx) remote_getfree
|
||||||
#pragma aux (cdecl_axdx) remote_open
|
#pragma aux (cdecl_axdx) remote_open
|
||||||
#pragma aux (cdecl_axdx) remote_extopen
|
#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_commit
|
||||||
#pragma aux (cdecl_axdx) remote_close
|
#pragma aux (cdecl_axdx) remote_close
|
||||||
#pragma aux (cdecl_axdx) QRemote_Fn
|
#pragma aux (cdecl_axdx) QRemote_Fn
|
||||||
|
#pragma aux (pascal) network_redirector modify exact [ax dx]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UWORD get_machine_name(BYTE FAR * netname);
|
UWORD get_machine_name(BYTE FAR * netname);
|
||||||
|
|
|
@ -522,11 +522,13 @@ VOID return_user(void)
|
||||||
setvec(0x24, p->ps_isv24);
|
setvec(0x24, p->ps_isv24);
|
||||||
|
|
||||||
/* And free all process memory if not a TSR return */
|
/* And free all process memory if not a TSR return */
|
||||||
remote_process_end(); /* might be a good idea to do that after closing
|
network_redirector(REM_PROCESS_END);
|
||||||
but doesn't help NET either TE */
|
/* might be a good idea to do that after closing
|
||||||
|
but doesn't help NET either TE */
|
||||||
|
|
||||||
if (!tsr)
|
if (!tsr)
|
||||||
{
|
{
|
||||||
remote_close_all();
|
network_redirector(REM_CLOSEALL);
|
||||||
for (i = 0; i < p->ps_maxfiles; i++)
|
for (i = 0; i < p->ps_maxfiles; i++)
|
||||||
{
|
{
|
||||||
DosClose(i);
|
DosClose(i);
|
||||||
|
|
Loading…
Reference in New Issue