Do some range checks on FSINFO values to make sure they are valid. Fixes
issue reported by dos386 on the mailing list.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1631 6ac86273-5f31-0410-b378-82cca8765d1b
Involves:
* before calling INT24 restore 386 registers. Protect again when
re-entering DOS for "(A)bort"
* INT21/AH=4C and variations restore 386 registers from the user stack
* INT23 (ctrl-break) restores 386 registers
* INT2F/AH=14 protects 386 registers.
* EXECRH is marked to potentially modify FS/GS for OW.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1591 6ac86273-5f31-0410-b378-82cca8765d1b
memory layout is different from other compilers.
Fixes issues mentioned by Bret Johnson and Christian Masloch
in freedos-user/freedos-kernel.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1569 6ac86273-5f31-0410-b378-82cca8765d1b
(perhaps) critical error.
Avoids closing the file twice (and hitting the critical error twice) on
abort/program termination.
Also, close can only return error 6 (DE_INVLDHNDL), not 5 (DE_ACCESS), see RBIL.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1564 6ac86273-5f31-0410-b378-82cca8765d1b
This lead to a drive to not be considered as FAT32 despite it is
(or vice-versa).
Thanks to Damien Guibouret <damien.guibouret@partition-saving.com>.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1559 6ac86273-5f31-0410-b378-82cca8765d1b
case where SS!=DS (which happens sometimes in resident code), in which
case va_list/va_arg need to use FAR pointers.
DS!=DGROUP never works, so I corrected that for NLS_DEBUG, by setting DS
in int2f.asm.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1491 6ac86273-5f31-0410-b378-82cca8765d1b
every new segment, including a trailing backslash. Simplified . and .. logic.
Converted switch to if because there were few cases left.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1478 6ac86273-5f31-0410-b378-82cca8765d1b
update the CDS cluster. Call media_check explicitly in truename() as a central
first and only place in directory-using DOS calls (except DosFindNext)
to call it.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1473 6ac86273-5f31-0410-b378-82cca8765d1b
does truename("D:", CDS_MODE_SKIP_PHYSICAL), and this mode was changed
to no longer call QRemote_Fn (int2f/ax=1123).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1472 6ac86273-5f31-0410-b378-82cca8765d1b
IBM PCDOS technical reference says to call BLDBPB if there are no used
buffers, so we only do it then, instead of flushing the buffers.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1458 6ac86273-5f31-0410-b378-82cca8765d1b
was always preceeded by split_path(). The return code is now an error code,
DE_FILENOTFND, DE_PATHNOTFND, or SUCCESS, depending on the failure.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1445 6ac86273-5f31-0410-b378-82cca8765d1b
dir/filename separator to 0 can be avoided, and we don't need to calculate
its location in split_path(). Without the trick many more char * path
arguments in the kernel can become "const char *".
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1444 6ac86273-5f31-0410-b378-82cca8765d1b
(split_path()) which only uses it to find out if the path ends in a backslash
and the length of the directory part.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1442 6ac86273-5f31-0410-b378-82cca8765d1b
added was the need to check for "d:\" paths which return DE_NFILES.
Also, findfirst("d:\nonexist\*.*",D_VOLID) should fail even if it actually
searches in d:\.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1441 6ac86273-5f31-0410-b378-82cca8765d1b