mirror of https://github.com/FDOS/kernel.git
Merge dosmkdir and dosrmdir (mostly from Lucho)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@937 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
8b66884304
commit
b5e2616877
|
@ -1327,7 +1327,7 @@ COUNT DosRename(BYTE FAR * path1, BYTE FAR * path2)
|
|||
return DosRenameTrue(PriPathName, SecPathName, D_ALL);
|
||||
}
|
||||
|
||||
COUNT DosMkdir(const char FAR * dir)
|
||||
COUNT DosMkRmdir(const char FAR * dir, int action)
|
||||
{
|
||||
COUNT result;
|
||||
|
||||
|
@ -1336,33 +1336,12 @@ COUNT DosMkdir(const char FAR * dir)
|
|||
return result;
|
||||
|
||||
if (result & IS_NETWORK)
|
||||
return network_redirector(REM_MKDIR);
|
||||
return network_redirector(action == 0x39 ? REM_MKDIR : REM_RMDIR);
|
||||
|
||||
if (result & IS_DEVICE)
|
||||
return DE_ACCESS;
|
||||
|
||||
return dos_mkdir(PriPathName);
|
||||
}
|
||||
|
||||
/* This function is almost identical to DosMkdir().
|
||||
Maybe it would be nice to merge both functions.
|
||||
-- 2001/09/03 ska*/
|
||||
COUNT DosRmdir(const char FAR * dir)
|
||||
{
|
||||
COUNT result;
|
||||
|
||||
result = truename(dir, PriPathName, CDS_MODE_CHECK_DEV_PATH);
|
||||
|
||||
if (result < SUCCESS)
|
||||
return result;
|
||||
|
||||
if (result & IS_NETWORK)
|
||||
return network_redirector(REM_RMDIR);
|
||||
|
||||
if (result & IS_DEVICE)
|
||||
return DE_ACCESS;
|
||||
|
||||
return dos_rmdir(PriPathName);
|
||||
return (action == 0x39 ? dos_mkdir : dos_rmdir)(PriPathName);
|
||||
}
|
||||
|
||||
/* /// Added for SHARE. - Ron Cemer */
|
||||
|
|
|
@ -860,12 +860,9 @@ dispatch:
|
|||
|
||||
/* Dos Create Directory */
|
||||
case 0x39:
|
||||
rc = DosMkdir(FP_DS_DX);
|
||||
goto short_check;
|
||||
|
||||
/* Dos Remove Directory */
|
||||
case 0x3a:
|
||||
rc = DosRmdir(FP_DS_DX);
|
||||
rc = DosMkRmdir(FP_DS_DX, lr.AL);
|
||||
goto short_check;
|
||||
|
||||
/* Dos Change Directory */
|
||||
|
|
|
@ -112,8 +112,7 @@ UBYTE DosSelectDrv(UBYTE drv);
|
|||
COUNT DosDelete(BYTE FAR * path, int attrib);
|
||||
COUNT DosRename(BYTE FAR * path1, BYTE FAR * path2);
|
||||
COUNT DosRenameTrue(BYTE * path1, BYTE * path2, int attrib);
|
||||
COUNT DosMkdir(const char FAR * dir);
|
||||
COUNT DosRmdir(const char FAR * dir);
|
||||
COUNT DosMkRmdir(const char FAR * dir, int action);
|
||||
struct dhdr FAR *IsDevice(const char FAR * FileName);
|
||||
BOOL IsShareInstalled(void);
|
||||
COUNT DosLockUnlock(COUNT hndl, LONG pos, LONG len, COUNT unlock);
|
||||
|
|
Loading…
Reference in New Issue