Commit Graph

775 Commits

Author SHA1 Message Date
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
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
24b9d0e61e Change Linux makefiles to only update what is necessary for subsequent makes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1388 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-20 00:32:21 +00:00
Bart Oldeman
d6ad12a3dc Add Linux cross-compile capability, using Open Watcom:
* Flip \ to / where possible.
* Introduce $(DIRSEP) (/ or \) for use inside commands in makefiles
  where / won't work in DOS.
* Override various settings for Linux in owlinux.mak.
* Add quotes in exeflat.c to avoid shell expansion of $$$$$.
* Let "make all", "make clean", and "make clobber" do the job.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1387 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-19 21:39:29 +00:00
Bart Oldeman
dbd57dce42 OW 1.8 MS2WLINK is too picky about leading and trailing whitespace so
echoto is changed to not generate any.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1386 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-19 20:31:22 +00:00
Kenneth J Davis
a238ea500f update version # in preparation for next release and to avoid confusion between svn and release kernels
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1385 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-18 09:38:16 +00:00
Kenneth J Davis
32c2f5b1ec update LSM for release
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1383 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-17 01:20:07 +00:00
Kenneth J Davis
73d4d5e0f9 update to refer to SourceForge tracker
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1382 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-17 01:16:58 +00:00
Kenneth J Davis
9c9cb22b2f update version in preparation for 2038 tag and release
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1381 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-17 01:15:46 +00:00
Kenneth J Davis
9e2421746b correct FCB fix from Bart, during open only certain fields of FCB should be initialized, programs may expect others to remain as set prior to open/create call
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1380 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-17 01:06:07 +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
d41599e2cc from Lucho, there is no any key, don't ask the user to press it
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1378 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-11 21:45:12 +00:00
Kenneth J Davis
da25cd58b4 use total cylinders (+1 for count, not maximum value)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1377 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-11 17:11:30 +00:00
Kenneth J Davis
c6b55c1119 From Tom, return 0xFF on invalid drives for int 21h/1c get drive allocation information (sectors/clusters)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1376 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-10 12:36:57 +00:00
Kenneth J Davis
d9e2861a44 improve comments regarding call PSP:5 patch
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1375 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-08 00:00:17 +00:00
Kenneth J Davis
0d16215fef adjust so FCB reads return data (fix loading of config file [assign.sys] by GEM versions that use FCBs)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1374 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-07 01:42:16 +00:00
Kenneth J Davis
65f8276a45 fix nasm warning - add missing colon to label
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1373 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-04 03:12:53 +00:00
Kenneth J Davis
240bcc30e2 commit Bart's patch to fix CP/M call psp:05h compatibility call along with some comments to explain the call trampoline
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1372 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-01 04:25:27 +00:00
Kenneth J Davis
497a2337ef ensure when compiling sys on windows a DOS binary is the target
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1371 6ac86273-5f31-0410-b378-82cca8765d1b
2009-04-30 07:06:12 +00:00
Kenneth J Davis
14116c8fbc fix compile without UPX, XUPX is passed to exeflat so should be unset when not using UPX
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1370 6ac86273-5f31-0410-b378-82cca8765d1b
2009-04-30 07:04:53 +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
Kenneth J Davis
58de498fca Bart's patch to fix compile with OW1.8
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1367 6ac86273-5f31-0410-b378-82cca8765d1b
2009-04-25 16:26:57 +00:00
Eric Auer
31bc1f6149 Added support for BUFFERSHIGH as alias to BUFFERS: No new code
but useful for people who are used to writing HIGH everywhere.
Thanks to Christian Wallbaum the hint that config.txt had both.
Removed code which called int 16.1 in a loop before 16.0 - this
would only be useful if you invoke HLT before each int 16.1 ...


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1366 6ac86273-5f31-0410-b378-82cca8765d1b
2008-06-01 22:44:19 +00:00
Eric Auer
74167734ff Compatibility: Allow fat/data/dir type hints even for disk read
in int 21.7305 to fix compat issue found by Christian Wallbaum.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1365 6ac86273-5f31-0410-b378-82cca8765d1b
2008-04-12 15:54:29 +00:00
Eric Auer
bec1b777f4 New version: fdkernel.lsm, version.h to 2038 / Mar 9 2008
(newest source file is 2008-03-09, initclk.c revision 1359)
Changelog file history.txt: added 2038pre and 2038 sections,       
with a lot of "SVN log summarizing" help from Geraldo :-)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1364 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-31 23:04:27 +00:00
Eric Auer
b74026cfb1 Added Geraldo (changelog) and Fritz (config.txt) to contrib.txt
Updated config.txt: verbose, readable, up to date, plain ASCII.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1363 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-31 22:44:55 +00:00
Eric Auer
a1a79dddea Added information about SVN (subversion), we no longer use CVS.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1362 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-31 00:20:40 +00:00
Eric Auer
7ee38c21dd Updated URL for bugzilla, added note and URL about SourceForge
feature request tracker for the FreeDOS project.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1361 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-31 00:19:37 +00:00
Eric Auer
72cb810ead New FSF postal mail address, see www.fsf.org/about/contact.html
51 Franklin Street, Fifth Floor Boston, MA 02110-1301 USA


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1360 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-31 00:06:18 +00:00
Eric Auer
bfb40c4b1c Workaround for y2k BIOS bugs at the only location where FreeDOS
reads the BIOS (CMOS RTC) date (at boot). Note that according to
RBIL, DRDOS would even hook int 1a ah=4 to force a correct year.

/* A BIOS with y2k (year 2000) bug will always report year 19nn */
if ((dosregs.c.x >= 1900) && (dosregs.c.x < 1980)) dosregs.c.x += 100;


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1359 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-09 16:11:10 +00:00
Eric Auer
26f116a217 More secure FAT handling: Avoids risk of cross links for example if
you reboot while files are open... Reported by Hardi Stengelin :-).

Always test *link_fat* result. New function is_free_cluster.  Extra
checks in *link_fat* (bad r/w offset, i/o, write) and *next_cluster*
(dangling chain: bad value in chain) with short messages (no msg for
bad chain start). Shorter "Bad DPB" (FAT size) msg.  More comments!

Update FS INFO on disk only when needed.  Check if chain EOF was at
expected place when extending.  Call *link_fat* before! *setdstart*
when a FAT chain grows.   [Q: Does 0 byte write always trunc? Why?]


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1358 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-08 20:31:37 +00:00
Eric Auer
0cc297cf2d The truename function must use the current working directory of
the virtual / created-by-subst drive when it resolves relative
paths, even though truename returns the "real" drive and dir
of where your files actually are in the end. Using the current
directory of the "real" drive made truename give wrong results.

PS: If "subst e: d:\" says "physical path x:\ cannot be made",
then it refers to "making" a root dir. "subst e: d:\foo" works.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1357 6ac86273-5f31-0410-b378-82cca8765d1b
2007-09-15 22:01:03 +00:00
Eric Auer
0b8ae53670 If FAT32 and a "backup boot sector" exists, also update the
backup boot sector to the contents of the main boot sector.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1356 6ac86273-5f31-0410-b378-82cca8765d1b
2007-09-07 12:46:54 +00:00
Eric Auer
b08c612f36 New bugzilla URL, mention that only writing needs a login.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1355 6ac86273-5f31-0410-b378-82cca8765d1b
2007-09-07 12:45:22 +00:00
Bart Oldeman
953e7b2007 Use _dos_allocmem for OW, similar to the Turbo C technique.
Split copy function into readfile and writefile functions.
Preserve time and date of kernel.sys and command.com.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1354 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-29 14:17:21 +00:00
Bart Oldeman
69d767be50 Let exeflat call UPX itself like in the unstable branch. Simplifies makefile.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1353 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-29 08:49:02 +00:00
Bart Oldeman
194aa09e69 exeflat.c reorganization part 2, still no functional changes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1352 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-29 07:51:13 +00:00
Bart Oldeman
d6232e9cd5 Reorganize exeflat.c, part 1, no functional changes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1351 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-29 06:34:54 +00:00
Bart Oldeman
266398c247 Add ASM to HaltCpuWhileIdle declarations for compatibility with Turbo C.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1350 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-27 11:41:13 +00:00
Eric Auer
94085ce923 Changed copy() to use a two pass algorithm: Now SYS first calls
copy to read kernel and command.com into RAM, then updates the
boot sector, then calls copy again to write kernel and command
from RAM to disk. This reduces disk changes a lot when you do
SYS A: B: on a PC which only has 1 diskette drive ("DJ style").


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1349 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-27 00:23:38 +00:00
Eric Auer
94d0560e7b Do not ABORT if image size is above 1 MB - Instead, handle size
MODULO 1 MB (paras = low_16_bits(pages<<5) ...) because for e.g.
Turbo C++ 3.0 needs this: Their IDE is 1.3 MB BOSS NE style EXE,
the first < 0.3 MB load a DOS ext which loads and runs the rest.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1348 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-25 02:37:59 +00:00
Eric Auer
f7320f6452 Init HaltCpuWhileIdle to 0 before installing int handlers.
Removed HaltCpuWhileIdle handling from GetBiosKey because it is
only used *before* IDLEHALT is processed anyway - in the config
sys menu *and* in CheckContinueBootFromHarddisk. Adding s.th.
like "switches /i" would be a way to enable it a bit earlier.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1346 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-17 19:33:24 +00:00
Eric Auer
ab53a50c49 Mktemp (21.5a) only inserts leading backslash in temp file name
if no directory given in template if DOS version is 5.
Older and newer DOS versions just use no dirspec in that case.
This helps ftp.sac.sk/pub/sac/pack/iup067.zip exepacker which
tries to rename the temp file to a file in current directory.

Prepared Truename (21.60) to return 0 if okay, 3a00 if char dev
(and not JOIN / network?). May need further coding to actually
have the intended effect...? Note: The shell TRUENAME command
may change names for display!

Changed the "true DOS version" for FAT16 kernels from 5.0 to
6.22 to reflect the updates in 21.5a and 21.60, other 5 / 6
differences are not simply in the kernel but more in COUNTRY,
KEYB, HIMEM, SMARTDRV, DBLSPACE, EMM386, COMMAND and so on.
In addition, 6.22 is a popular version number to report :-).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1345 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-28 19:03:40 +00:00
Eric Auer
65798a9203 Clarified description of 21.63 (country / nlsfunc), 21.71
(long file names) and 21.5d0x (share). The share extensions
need both SHARE and kernel extensions, neither are done yet.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1344 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-28 18:29:50 +00:00
Bart Oldeman
c3bd779112 Reinstated _IRQTEXT, now with corrected segment loads in irqstack.asm.
It is better to use groups than segments here.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1343 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-23 11:23:11 +00:00
Bart Oldeman
43399a4335 Correct fat32readwrite prototype and register use in detect LBA pragma.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1342 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-23 09:53:49 +00:00
Eric Auer
c2fababb01 Reverted the "add new IRQTEXT" segment patch from 1324->1325
again, as this made the kernel crash in Bochs in PostConfig
(or short before or after it). FASTBOOT should still be okay.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1341 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-21 21:46:17 +00:00