Bart Oldeman
f63eea565a
Made the main fnodes far so they can be in UMBs.
...
Internally the kernel uses two near fnodes though, to save on codesize
and fmemcpy's if necessary. Having memory management on two fnodes is
a little silly but I just want to make sure with the panic message
that we never accidentally try to use three near fnodes at the same time.
(two are used at the same time by rename, commit, and merge_file_changes).
This can be cleaned up later.
Anyway. 644736 bytes free conv memory isn't bad.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@821 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-23 22:45:38 +00:00
Bart Oldeman
d39d3a84f4
Merge three almost identical pieces of code used to allocate a new
...
directory entry in creat, rename, and mkdir, into alloc_find_free.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@819 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-23 01:36:16 +00:00
Bart Oldeman
05cd65a193
Merge find_fat_free() and extend() -- they were almost identical.
...
Have a simplified clause for f_cluster == FREE.
Set f_cluster = FREE in shrink_file if the file is set to 0 bytes; in
that case we should set the current cluster to FREE even if it is
currently a LONG_LAST_CLUSTER.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@818 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-23 00:45:24 +00:00
Bart Oldeman
ce290a033f
Eliminate f_back field.
...
extend() now uses f_cluster instead of f_back, while map_cluster makes
sure it's not set to LONG_LAST_CLUSTER (but to the cluster before it)
when calling extend().
extend() and first_fat() now return the new cluster number or
LONG_LAST_CLUSTER, just like find_fat_free()
Hopefully I didn't break anything... Initial testing was successful.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@816 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 22:33:05 +00:00
Bart Oldeman
df538bb32a
Eliminated f_sector and f_boff fields from fnodes.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@814 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 16:56:34 +00:00
Bart Oldeman
b0009452ee
Remove add_far. adjust_far can do the job.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@813 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 16:38:46 +00:00
Bart Oldeman
c73ee8084a
Remove the 65535 check for root directories. It's checked against
...
a different limit later anyway later, and it breaks remove_lfn_entries...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@812 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 15:43:56 +00:00
Bart Oldeman
11a7b69e5c
Make f_diroff an entry offset so it can be 16bits. Enforce the 65536
...
entry limit in dir_read(). Saves 80 bytes or so + 2 bytes in every f_node.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@811 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 10:29:26 +00:00
Bart Oldeman
82261c0caf
add_far can get away with adding 16 bit offsets only. Saves ~200 bytes!
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@807 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 13:56:13 +00:00
Bart Oldeman
0d6d0b8523
(with Lucho) -- remove the dosnames path 67 length check. Review the places
...
where it really matters (chdir and mkdir).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@796 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 12:59:38 +00:00
Bart Oldeman
0e0abcd685
Added explicit (UWORD) type casts to avoid compiler warnings and sometimes
...
save a few bytes too. Also changed the FcbParseFname return value:
returns offset portion of pointer (SI) instead of the number of bytes to
be added to SI.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@775 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-07 18:04:50 +00:00
Bart Oldeman
5567aba08b
Fixed bug #1722 : dir_close() was called for normal files (via map_cluster
...
and find_fat_free). This completely messed up rwblock. Removed these calls
(for directories they are already covered at a higher level) and added
a few sanity checks to dir_close and dir_write.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@761 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 23:18:24 +00:00
Bart Oldeman
4f1a117069
* FAT32 kernels should ignore the upper word of the cluster number for
...
FAT16 partitions (just like FAT16 kernels do)
* added extra checks to make sure that invalid FAT entries are never
followed
* made put_console() public to be able to print a message in case of
FAT corruption
* some small optimizations and header cleanups (some suggested by Arkady)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@753 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 00:51:49 +00:00
Bart Oldeman
ef3e38de7b
Rename blockio by rqblockio (namespace conflict with dsk.c)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@734 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-02 23:34:43 +00:00
Bart Oldeman
a56e592871
Move permission check to better place (only for necessary for opening
...
existing files), not for creating them -- suggested by Steffen.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@727 6ac86273-5f31-0410-b378-82cca8765d1b
2003-11-23 18:03:35 +00:00
Bart Oldeman
3232712fae
force r/o open for FCB and legacy creat if the file is read-only
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@726 6ac86273-5f31-0410-b378-82cca8765d1b
2003-11-16 16:21:29 +00:00
Bart Oldeman
09dca9d224
Move common code in media_check() to a new blockio() function.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@724 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-30 14:34:39 +00:00
Bart Oldeman
bdc5569995
Set the Critical Error number immediately after calling a device driver.
...
This solves problems with int24 handlers that call int21/ah=59.
Let truename and blockrw return with an error if there is a critical error.
Don't overwrite the critical error # with the DOS error #.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@709 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-24 19:34:11 +00:00
Bart Oldeman
bef6672954
Use 0x10000UL (avoids Turbo C warning)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@667 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-31 10:22:32 +00:00
Bart Oldeman
c444161296
Use near bpb on the stack in bpb_to_dpb.
...
Make sure the number of FAT sectors is actually enough to hold that
many clusters. Otherwise back the number of clusters down (LG & AB)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@655 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 20:30:09 +00:00
Bart Oldeman
a4abd642bf
Fix buffer deletion problem with multi-sector writes.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@611 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 08:38:20 +00:00
Bart Oldeman
355580dded
Eliminate highwater fnode field.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@540 6ac86273-5f31-0410-b378-82cca8765d1b
2003-03-12 23:29:08 +00:00
Bart Oldeman
b43f271014
"rmdir" and FAT32 fixes from Tom.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@499 6ac86273-5f31-0410-b378-82cca8765d1b
2003-02-20 20:51:42 +00:00
Bart Oldeman
e67a8f5058
Changes for kernel 2028 (see history.txt)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@485 6ac86273-5f31-0410-b378-82cca8765d1b
2002-12-09 00:17:15 +00:00
Bart Oldeman
83b77cbb1b
Changes for kernel 2027rc.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@427 6ac86273-5f31-0410-b378-82cca8765d1b
2002-10-22 02:40:19 +00:00
Bart Oldeman
2c6dbdf194
Fix compilation using -p or -DDEBUG
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@415 6ac86273-5f31-0410-b378-82cca8765d1b
2002-08-04 10:26:31 +00:00
Bart Oldeman
dfeb595f8e
Last changes for kernel 2027 test.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@414 6ac86273-5f31-0410-b378-82cca8765d1b
2002-08-04 01:14:18 +00:00
Bart Oldeman
511bf63d16
Cleaned up task.c (merged much of DOSExe/ComLoader); transform the CDS into
...
a proper array.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@413 6ac86273-5f31-0410-b378-82cca8765d1b
2002-08-03 16:54:09 +00:00
Bart Oldeman
93bc26d0d5
Added more functions (memchr, memcmp, strcmp) to asmsupt.asm. Removed strncpy
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@398 6ac86273-5f31-0410-b378-82cca8765d1b
2002-08-03 01:48:49 +00:00
Bart Oldeman
2098578b1b
kernel 2026b changes
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@382 6ac86273-5f31-0410-b378-82cca8765d1b
2002-05-08 22:49:35 +00:00
Bart Oldeman
b2496a6fbd
kernel 2026a final changes (mainly FCB fixes)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@353 6ac86273-5f31-0410-b378-82cca8765d1b
2002-02-16 19:20:20 +00:00
Bart Oldeman
df1651b5a4
Small clean-ups for ke2026-test.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@344 6ac86273-5f31-0410-b378-82cca8765d1b
2002-01-27 01:13:07 +00:00
Bart Oldeman
0e8b739c4c
kernel 2026 test changes (see history.txt)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@343 6ac86273-5f31-0410-b378-82cca8765d1b
2002-01-23 22:29:41 +00:00
Bart Oldeman
b6d423a1b3
Ran all .c and .h files through "indent"
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@329 6ac86273-5f31-0410-b378-82cca8765d1b
2001-11-18 14:01:12 +00:00
Bart Oldeman
fe51b7a036
Truncated and disabled $Logs, fixed r/w bugs for kernel 2025b
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@326 6ac86273-5f31-0410-b378-82cca8765d1b
2001-11-17 23:26:45 +00:00
Bart Oldeman
5a18de7cbb
Kernel 2025a final changes.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@321 6ac86273-5f31-0410-b378-82cca8765d1b
2001-11-13 23:36:45 +00:00
Bart Oldeman
9e007d884e
kernel 2025a changes: see history.txt
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@314 6ac86273-5f31-0410-b378-82cca8765d1b
2001-11-04 19:47:39 +00:00
Bart Oldeman
048c87bbac
FAT32 support, misc fixes, INT2F/AH=12 support, drive B: handling
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@305 6ac86273-5f31-0410-b378-82cca8765d1b
2001-09-23 20:39:44 +00:00
Bart Oldeman
d9c11a4095
Time and date fixes, Ctrl-S/P, findfirst/next, FCBs, buffers, tsr unloading
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@278 6ac86273-5f31-0410-b378-82cca8765d1b
2001-08-19 12:58:36 +00:00
Bart Oldeman
c5cb6b1cac
Fixes for FORMAT+SYS, FATFS, get current dir, kernel init memory situation.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@274 6ac86273-5f31-0410-b378-82cca8765d1b
2001-07-28 18:13:06 +00:00
Bart Oldeman
d4a9888f7b
fixes for FCBs, DJGPP ls, DBLBYTE, dyninit allocation (2024e).
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@269 6ac86273-5f31-0410-b378-82cca8765d1b
2001-07-24 16:56:29 +00:00
Bart Oldeman
03865c6b69
Support for Brian's FORMAT, DJGPP libc compilation, cleanups, MSCDEX
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@265 6ac86273-5f31-0410-b378-82cca8765d1b
2001-07-22 01:58:58 +00:00
Bart Oldeman
c1b1896480
LBA/FCB/FAT/SYS/Ctrl-C/ioctl fixes + memory savings
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@260 6ac86273-5f31-0410-b378-82cca8765d1b
2001-07-09 22:19:33 +00:00
Bart Oldeman
68375764dd
BUFFERS tuning and misc bug fixes/cleanups (2024c).
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@232 6ac86273-5f31-0410-b378-82cca8765d1b
2001-06-03 14:16:18 +00:00
Bart Oldeman
64474e1dd4
A new SYS.COM/config.sys single stepping/console output/misc fixes.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@216 6ac86273-5f31-0410-b378-82cca8765d1b
2001-04-29 17:34:41 +00:00
Bart Oldeman
cb13571dab
Init DS=Init CS, fixed stack overflow problems and misc bugs.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@204 6ac86273-5f31-0410-b378-82cca8765d1b
2001-04-21 22:32:53 +00:00
Bart Oldeman
c07675522e
Fixed handles, config.sys drivers, warnings. Enabled INT21/AH=6C, printf %S/%Fs
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@197 6ac86273-5f31-0410-b378-82cca8765d1b
2001-04-16 01:45:26 +00:00
Bart Oldeman
be2ae12b54
See history.txt for the list of fixes.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@196 6ac86273-5f31-0410-b378-82cca8765d1b
2001-04-15 03:21:50 +00:00
Bart Oldeman
31b068e497
Misc fixes and implementation of SHELLHIGH. See history.txt for details.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@181 6ac86273-5f31-0410-b378-82cca8765d1b
2001-03-30 19:30:06 +00:00
Bart Oldeman
851eb99b63
See history.txt: dsk.c changes, warning removal and int21 entry handling.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@176 6ac86273-5f31-0410-b378-82cca8765d1b
2001-03-24 22:13:05 +00:00