Bart Oldeman
e0ca8d76e2
Seek changes:
...
* merge unstable kernel optimizations
* enable seek for int2f/AX=1228
* -1 is a valid offset, so we need to process the return code seperately
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1429 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-09 18:50:03 +00:00
Bart Oldeman
288a2f396b
Merge pop_dmp optimization from the unstable kernel.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1428 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-09 18:09:05 +00:00
Bart Oldeman
b10d86bcaa
Introduce get_cds1 to merge common code that checks for 0=default_drive,1=A,etc.
...
Make load_transfer() static.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1414 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-01 14:55:11 +00:00
Bart Oldeman
1cc33a1a5e
Move the open/creat access checks to more efficient places.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1409 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-29 00:03:27 +00:00
Bart Oldeman
896908d6f7
Eliminate DosGetFile -- it is no longer necessary because the filename
...
is already copied from the fnode.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1407 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 21:09:56 +00:00
Bart Oldeman
9a415b14b2
Fix a regression with sft_flags overwriting what dos_open wrote so file
...
dates/times would always be updated, even for reads!
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1406 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 20:57:55 +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
4a81e6e9a2
Let merge_file_changes operate directly on the other SFTs.
...
dos_setfattr with SHARE now closes open SFTs referring to that file
in compat mode.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1403 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 18:23:35 +00:00
Bart Oldeman
a69b4ba011
Eliminate the sft_status field as it is now equal to the SFT index.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1400 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 14:11:50 +00:00
Bart Oldeman
f9f2fe447d
Eliminate dos_getftime, dos_getfsize, and dos_getfattr_fd, because we can
...
now get these properties directly from the SFT.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1399 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 13:59:44 +00:00
Bart Oldeman
d7d201a53b
This is the main change to eliminate far fnodes.
...
SFT info is copied from and to the two near fnodes.
Some cleanups still follow.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1397 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 13:24:14 +00:00
Bart Oldeman
0ad01cd768
Handle sft_count before calling dos_open and after calling dos_close so
...
the SFT is open for longer, during fatfs.c operations.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1395 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-25 22:55:06 +00:00
Bart Oldeman
affddaaf64
Handle dos_getfattr and dos_setfattr directly at the directory level, instead
...
of opening the file, to avoid needing to claim SFTs in later changes.
Clarify and implement parts of the correct SHARE behaviour.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1393 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-23 02:04:03 +00:00
Kenneth J Davis
01cc83bc82
From Eric, reduce unnecessary calls to share hook, only re-check (int 2f/1000) on open/close, not on each access
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1379 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-11 22:04:43 +00:00
Kenneth J Davis
ae3d48ab33
Change how DosGetExtFree checks for drive so int 21h/7303h more lax about path given, support driver specifier with or without slash (C: or C:\) and just slash (\) for current drive (does allow some additional bogus paths to return success)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1369 6ac86273-5f31-0410-b378-82cca8765d1b
2009-04-30 05:16:31 +00:00
Eric Auer
cf05259924
Removed "Dutch plurals" ("Dutch plural's" ;-)) from the source code:
...
kernel/fatfs.c kernel/config.c kernel/kernel.asm kernel/initdisk.c
kernel/fattab.c kernel/dyninit.c kernel/int2f.asm kernel/memmgr.c
kernel/task.c kernel/dsk.c kernel/printer.asm kernel/globals.h
kernel/dosfns.c docs/config.txt hdr/device.h drivers/rdpcclk.asm
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1338 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-20 20:52:33 +00:00
Bart Oldeman
acbc504765
Fix Bugzilla Bug 1956: all file opens fail under specific conditions.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1323 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 02:29:01 +00:00
Bart Oldeman
46d959f0cb
Fix the NUL device so it returns 0 bytes for reads, independent of whether
...
cooked or raw mode is used. It was broken for raw mode. Fixes problem
with DJGPP sed (see
http://sourceforge.net/tracker/index.php?func=detail&aid=1429741&group_id=49784&atid=457447 )
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1306 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-14 23:52:39 +00:00
Kenneth J Davis
696614a6c1
do not compares filenames to name field in block devices
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1127 6ac86273-5f31-0410-b378-82cca8765d1b
2005-07-10 01:19:29 +00:00
Bart Oldeman
7cd4f6c14b
int21/ah=0x1b,0x1c should only change AL
...
Change prototype of DosGetFree so it returns AX (Arkady)
Checking the return value for FFFF is enough to check for failure.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1008 6ac86273-5f31-0410-b378-82cca8765d1b
2004-07-25 08:04:54 +00:00
Bart Oldeman
cd85d78739
Need to check for navc!=NULL, not *nc!=0xffff in DosGetFree.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1006 6ac86273-5f31-0410-b378-82cca8765d1b
2004-07-25 00:08:34 +00:00
Bart Oldeman
f8be820925
Clear up confusing (void *)n using a macro.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@952 6ac86273-5f31-0410-b378-82cca8765d1b
2004-05-23 21:18:37 +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
b5e2616877
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
2004-05-23 14:10:39 +00:00
Bart Oldeman
ea23d33c2c
Reduced number of global int2f/11 entries into int2f.asm to one.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@895 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 17:40:12 +00:00
Bart Oldeman
8d1eda45f9
Further int2f.asm reduction... now using generic void *arg argument to pass
...
the third parameter which can be various things.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@894 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 11:04:08 +00:00
Bart Oldeman
01e5973aa0
Re-merge parts of network_redirector_rw with network_redirector_open,
...
and let it return a long instead of using a *err pointer.
Call the resulting function NETWORK_REDIRECTOR_MX (multiplex)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@893 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 02:01:56 +00:00
Bart Oldeman
4dc4ae8be8
Third stage for int2f callers: split int2f.asm functions, don't let them
...
preserve as many registers, use pascal calling convention for the
"open" (but really: multiplex) function.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@892 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 00:53:45 +00:00
Bart Oldeman
ebbd6b8336
Convert next batch of remote_ functions (with one far pointer argument) --
...
network_redirector() can be a wrapper in C.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@891 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-20 20:25:26 +00:00
Bart Oldeman
c4e65eb689
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
2004-04-20 18:43:03 +00:00
Bart Oldeman
9aa77bef50
Get rid of SFT_M* mode values. O_* values are sufficient.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@830 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 00:23:06 +00:00
Bart Oldeman
28be8284a8
Eliminate intr() from resident code. Saves ~200 bytes of HMA resident code.
...
Also made the nls.c functions SS!=DS safe.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@802 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-19 22:33:48 +00:00
Bart Oldeman
77331799bd
Commit each close, even if the ref count is > 0.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@798 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 20:32:55 +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
d4f6a7104b
Clean up scr_pos updating routines: combine into update_scr_pos() function
...
instead of 2 copies of the same thing.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@760 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 20:07:28 +00:00
Bart Oldeman
a9c00dcf86
Adapted from Chris Rodie's patch (bugzilla #1729 ):
...
"open" and "close" should call the open/close functions for devices using
a device request when appropriate.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@755 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 13:18:13 +00:00
Bart Oldeman
76cb6edf6e
Do not clobber the DTA if findfirst or findnext fails. Fixes bug #1712
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@733 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-01 00:45:38 +00:00
Bart Oldeman
3fa044c149
Implement support for int2f/ax=1220.
...
Fix int2f/ax=1216 (needs sft handles, not psp handles, and to return
the relative handle in BX, and to deal with carry)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@712 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-05 13:30:47 +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
b0e54ff704
(with a little help from Arkady)
...
inthndler.c, chario.c, break.c simplifications and cleanups.
Pass a near pointer to the far pointer that points to the device instead
of an SFT index (in general).
Make cooked_write much faster by only testing for input every 32
characters.
No longer test for ctl_s on syscon if writing to the printer: just
read from the printer which will return zero characters.
Fix reading/writing zero characters by returning "256" (special code).
Adjust interfaces in other files.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@683 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-09 17:43:43 +00:00
Bart Oldeman
1266a13f7f
Add necessary casts to ? : constructions; cleanup read_line_handle a little.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@673 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-04 19:05:27 +00:00
Bart Oldeman
9f15e02db9
Correct get_root, make kbdType public, sys config patches from Tom.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@614 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 11:55:44 +00:00
Bart Oldeman
4c88863f24
Add support for UNC style paths (David Bolen)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@604 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 22:06:03 +00:00
Bart Oldeman
5210965831
* minor size optimizations in chario.c, dosfns.c;
...
asmsupt.asm: correct fmemchr (all n's) and *memset/*memcpy (n==0)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@590 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 14:21:49 +00:00
Bart Oldeman
484f700bba
DE_INVLDDRV should be DE_DEVICE for rename and DE_PATHNOTFND for truename
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@563 6ac86273-5f31-0410-b378-82cca8765d1b
2003-03-23 18:41:36 +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
9bcd6b125a
Don't allow wildcards for internal truename processing, except for
...
DosFindfirst and DosTruename.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@536 6ac86273-5f31-0410-b378-82cca8765d1b
2003-03-12 06:50:33 +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
dce580f3bc
Properly propagate sharing bits.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@459 6ac86273-5f31-0410-b378-82cca8765d1b
2002-11-09 19:11:26 +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