Bart Oldeman
c812a96e85
Corrected the if-statement && logic for attributes in the findnext loop.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1439 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-12 20:57:39 +00:00
Bart Oldeman
07d2b24149
Make findfirst/findnext more MSDOS compatible:
...
* ignore 0x40 (D_DEVICE) in search attribute.
* if you specify D_VOLID + one or more of D_HIDDEN, D_SYSTEM, and D_DIR you
will get files *and* volume labels in the specified directory, not forced
to the root directory.
* VOLID searches must look at the search pattern name too, or do not match.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1438 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-12 20:38:40 +00:00
Bart Oldeman
76c967d581
Remove usage of the fnode f_flags field where it is not relevant anymore.
...
Because of the explicit dir_write() calls we only need them in situations
where SFTs where used, that is for open files but not for directories.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1436 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-11 12:33:30 +00:00
Bart Oldeman
3a16a4c755
Eliminate fcbname[] on the stack: we can use dm_name_pat in the dirmatch
...
structures instead.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1435 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-10 21:08:16 +00:00
Bart Oldeman
a21bcd8a85
Split 8.3 FCB-style filename extraction from ParseDosName into a new
...
ConvertNameSZToName83 function, also used by dir_open().
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1433 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-10 19:02:24 +00:00
Bart Oldeman
8e2b96a70b
Move the fnode fields f_diroff and f_dirstart into a referenced directory
...
match structure with fields dm_entry and dm_dircluster.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1432 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-10 16:10:54 +00:00
Bart Oldeman
ec30074f48
Make the fnode f_flags completely equal to the SFT sft_flags.
...
Rename SFT_FDIRTY to SFT_FCLEAN to avoid confusion.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1420 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-05 00:06:05 +00:00
Bart Oldeman
fedf951beb
Eliminate the fnode F_DDIR flag which has no SFT equivalent:
...
f_sft_idx==0xff can do the same. rwblock() is never called for directories
so the checks could be removed.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1419 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-04 23:40:17 +00:00
Bart Oldeman
5b46738372
Eliminate dir_close().
...
Its only purpose left was to flush buffers, which isn't necessary after
just open/read, so we can move that to dir_write().
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1410 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-29 00:25:38 +00:00
Bart Oldeman
a0382d32e4
Eliminate dos_setfsize, dos_setftime, and dos_lseek, by just using the SFT.
...
dos_setfsize still needed to merge changes for SHARE so the call was replaced
by a new dos_merge_file_changes() call.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1405 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 20:44:44 +00:00
Bart Oldeman
76f1c10a4e
Eliminate xlt_fd(), save_far_f_node(), and the redundant fnode f_mode field.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1404 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 18:34:05 +00:00
Bart Oldeman
e63e5dd125
Eliminate f_count field in fnodes and some no-op functions.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1398 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 13:47:52 +00:00
Bart Oldeman
7083b0a4fa
On close or commit, only update those directory entry fields that have an
...
SFT equivalent. The rest stays unmodified on disk.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1392 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-22 00:25:11 +00:00
Bart Oldeman
ba75006b67
Use explicit dir_write() instead of letting dir_close() do the writing.
...
This is to prepare for an updating version to deal with SFTs.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1391 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-22 00:01:27 +00:00
Bart Oldeman
d39420dc11
Add f_dirsector (sector containing dentry) and f_diridx (index within
...
sector) fields to the fnode, to make fnodes more compatible with SFTs.
Use them to simplify dir_read() and dir_write().
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1390 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-21 12:57:37 +00:00
Bart Oldeman
2092745236
Force near fnode use to use either fnode[0] or fnode[1] instead of the
...
allocation scheme. This eliminates the checks done in inthndlr.c because
the f_count field is no longer checked.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1389 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-20 18:13:37 +00:00
Bart Oldeman
4a8c30c6e2
Fix problem with an old game that calls findfirst with attribute 77a8:
...
the kernel should not return a volume label in that case.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1322 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 02:17:44 +00:00
Bart Oldeman
fe3a2a1dd5
Some small cleanups from Lucho.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@946 6ac86273-5f31-0410-b378-82cca8765d1b
2004-05-23 18:28:18 +00:00
Bart Oldeman
ecfcb9be29
dir_read() no longer updates the diroff counter. This eliminates the NEW
...
field, simplifies remove_lfn_entries(), and avoids a bug if you delete
the first entry in the root directory on FAT32.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@911 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-30 17:14:33 +00:00
Bart Oldeman
5d712fc2a6
Avoid bitfields for fnodes, using flags instead.
...
Replaced droot field by checks for f_dirstart == 0.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@867 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 10:46:37 +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
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
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
f83c09df15
Fix problem with volume label findnexts.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@597 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 18:47:25 +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
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
4c2538b79e
Return DE_NFILES instead of DE_FILE_NOT_FOUND for missing volume labels;
...
search for volume labels too if the attribute just ands with 8.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@460 6ac86273-5f31-0410-b378-82cca8765d1b
2002-11-09 19:13:56 +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
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
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
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
77e49f87c7
FCB fixes and clean-ups, exec int21/ax=4b01, initdisk.c printf
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@267 6ac86273-5f31-0410-b378-82cca8765d1b
2001-07-23 12:47:42 +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