Commit Graph

781 Commits

Author SHA1 Message Date
Bart Oldeman
0760d51339 If handle valid, close file in PSP table before the low-level close +
(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
2011-04-08 18:27:48 +00:00
Bart Oldeman
225237e915 From Christian Masloch:
set flags to 0x200 (IF set) when transferring to int22 termination address.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1563 6ac86273-5f31-0410-b378-82cca8765d1b
2011-04-08 16:04:24 +00:00
Bart Oldeman
d7be66c5ed Check errors for callers of dir_write and shrink_file.
Fixes: Bug: File creation does not check whether buffers are written correctly
(http://www.bttr-software.de/forum/forum_entry.php?id=9783)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1562 6ac86273-5f31-0410-b378-82cca8765d1b
2011-04-08 15:54:03 +00:00
Bart Oldeman
77d0f502c0 No longer force flush1() and dir_write_update() to return TRUE if there
were disk write errors. Part 1 for fixing
http://www.bttr-software.de/forum/forum_entry.php?id=9783
Bug: File creation does not check whether buffers are written correctly


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1561 6ac86273-5f31-0410-b378-82cca8765d1b
2011-04-08 15:35:23 +00:00
Bart Oldeman
6bf9271256 Enlarge clock and block driver stacks. Thanks to Damien Guibouret
<damien.guibouret@partition-saving.com>.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1560 6ac86273-5f31-0410-b378-82cca8765d1b
2011-03-24 00:25:26 +00:00
Bart Oldeman
d9df755e78 Fix value that is used before being initialised.
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
2011-03-24 00:21:53 +00:00
Kenneth J Davis
581d52a2bc correct return value from NULL to FALSE - fix compile with OW1.9
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1501 6ac86273-5f31-0410-b378-82cca8765d1b
2010-08-18 03:04:40 +00:00
Kenneth J Davis
bf408d35f4 handle case when source not specified but filename for boot sector is given (sys X: bootfile.bin)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1500 6ac86273-5f31-0410-b378-82cca8765d1b
2009-11-13 22:47:02 +00:00
Bart Oldeman
0d4c23ffac With the stack changes the DOS segment has moved to 0x79.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1499 6ac86273-5f31-0410-b378-82cca8765d1b
2009-08-22 19:07:18 +00:00
Bart Oldeman
3ae2e90e08 New irqstack.asm: irq 2, 3, 4, 5, 6, 10, 11, 12, 14, 15 now use the IBM
interrupt sharing protocol for STACKS. Affect int 2 too, but not IRQ 7
(INT 0fh) and IRQ 9 (INT 71h)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1498 6ac86273-5f31-0410-b378-82cca8765d1b
2009-08-22 14:43:09 +00:00
Kenneth J Davis
0278349047 Add batch file used to generated release archives; update LSM to be version neutral when checked out of SVN trunk
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1497 6ac86273-5f31-0410-b378-82cca8765d1b
2009-08-01 21:14:46 +00:00
Bart Oldeman
e146fa112d Update history.txt from SVN log entries.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1495 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-31 23:28:30 +00:00
Kenneth J Davis
ddb2dffb9f update documentation to include new options; add option to sys to force LBA or CHS usage, allow using BIOS specified boot drive # on floppy, add verbose output (debug prints), and reorder some steps in copy() to avoid some unnecessary disk swaps on single drive systems
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1494 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-30 04:33:23 +00:00
Kenneth J Davis
66c9f421ac add comment about location that may be modified by sys (and some whitespace changes due to editor)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1493 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-30 03:26:13 +00:00
Kenneth J Davis
38abeed649 create list file when assembling boot sectors
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1492 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-30 03:23:05 +00:00
Bart Oldeman
a46d6637fa Use near pointers for printf()s where possible. Problematic is only the
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
2009-07-18 20:48:44 +00:00
Bart Oldeman
8b07bb8c23 Check the BPB instead of the DPB for FAT32 after a BUILDBPB device
call, as the DPB may still be uninitialized at this point.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1490 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-18 14:05:26 +00:00
Kenneth J Davis
2e9792fae5 update copyright year, add some comments
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1489 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 03:21:32 +00:00
Kenneth J Davis
82d77a19e1 mark unused space in kernel for unused win compatibility structs
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1488 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 03:19:32 +00:00
Kenneth J Davis
8f9448f313 comment/structure info update
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1487 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 03:13:43 +00:00
Kenneth J Davis
f82d41f169 comments added
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1486 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:58:57 +00:00
Kenneth J Davis
5c8fb2fbec comments added
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1485 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:35:05 +00:00
Kenneth J Davis
44e249282f update comments
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1484 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:26:23 +00:00
Kenneth J Davis
6762379cd6 update sys usage documentation
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1483 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-13 02:20:48 +00:00
Kenneth J Davis
dbf9e09dfc update sys to current version, adjust printf to support percent modifier, consistent prototype, and handle text not in current segment (FAR *) better, merge part of simplified debug (via prints) support
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1482 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-11 16:59:43 +00:00
Bart Oldeman
66f65090dd Corrected a bug in exeflat: it was writing 32 bytes too many from possibly
unexisting buffers after compressing exe files.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1480 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-07 13:51:54 +00:00
Bart Oldeman
d6b54e78d0 Corrected DEBUG #if to #ifdef for Turbo C and corrected debug printfs in
truename().


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1479 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-07 13:33:24 +00:00
Bart Oldeman
d8537c13ef Simplified truename(): eliminated the addSep state by adding a backslash in
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
2009-07-07 13:04:53 +00:00
Bart Oldeman
f26372a241 DosChangeDir can only return DE_PATHNOTFND in case of error, so force that
error code.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1477 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-07 13:00:09 +00:00
Bart Oldeman
1f17a5e5da Remove the wildcard check for DosChangeDir() because truename() already does
that.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1476 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-06 20:26:27 +00:00
Bart Oldeman
5ad1fd51e1 Use simpler code for copying the current directory constructing the "truename":
instead of fmemcpy followed by strcpy, just use strcpy. Also use the near
TempCDS more.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1475 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-06 02:22:06 +00:00
Bart Oldeman
de81ab4e46 Unify parse_name_ext for name and extension and inline this function into
truename(). This is an optimization (200 bytes).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1474 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-05 22:13:01 +00:00
Bart Oldeman
9e1e01e9e6 If the current directory is no longer valid, call dos_cd() for the root to
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
2009-07-05 21:21:14 +00:00
Bart Oldeman
95653072d3 The original DosGetCuDir is now inlined in truename(). DosGetCuDir now
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
2009-07-05 21:09:34 +00:00
Bart Oldeman
39a9574824 Fix truename("C:") where the current directory is different from the root:
then it should not append a backslash.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1471 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-05 19:46:12 +00:00
Bart Oldeman
8cce4e7d84 Turbo C 2.01 and Linux cross-compilation compatibility fixes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1470 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-02 02:39:17 +00:00
Bart Oldeman
fb847baa95 For self-owning PSPs do everything that a normal exit does except for closing
files and releasing memory (see RBIL).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1469 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-02 02:24:44 +00:00
Bart Oldeman
2017b41dbb Fix problem with cd\ reported by ibid_ag@lavabit.com on the mailing list.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1468 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 02:43:21 +00:00
Kenneth J Davis
70851fff0a update build process to include country.sys
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1467 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 02:26:07 +00:00
Kenneth J Davis
3482128410 sync country source with latest from eduardocasino.es site
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1466 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 01:50:15 +00:00
Kenneth J Davis
60886a8424 add source for country.sys from dev branch
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1465 6ac86273-5f31-0410-b378-82cca8765d1b
2009-07-01 00:47:29 +00:00
Bart Oldeman
924f6d1bfd In case of "not sure" if the removable media has changed, the
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
2009-06-26 20:12:33 +00:00
Bart Oldeman
e597bb20d4 Merged int21/ax=7304, subfunctions 3 and 4, which work very similarly.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1457 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-26 20:00:41 +00:00
Kenneth J Davis
84fcfc5f11 simplify how version specified, enable SVN builds with revision#
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1456 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-23 01:26:30 +00:00
Kenneth J Davis
d6552eab77 add convenience options to build.bat for setting various defines
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1455 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-22 20:39:34 +00:00
Kenneth J Davis
6ffc037046 clear some additional env variables
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1454 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-22 20:37:36 +00:00
Bart Oldeman
6aa1e45bd8 Set the clean bit also on created/replaced files, not just opened files, so
the directory entry is only updated after they are written too.
Fixes SF bug #2380531.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1453 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-18 16:42:03 +00:00
Bart Oldeman
4d3e2e2fad Use a better formula for calculating FAT12 clusters, by multiplying nominator
and denominator by 3.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1452 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-17 22:04:49 +00:00
Bart Oldeman
e3f90446b3 initdisk: further optimizations in CalculateFATData(): merging the FAT16 & FAT32
loops.
fatfs: #if DEBUG fix.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1451 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-17 20:37:26 +00:00
Bart Oldeman
9e0b5e5bf6 Optimized initdisk.c by using constants instead of variables where possible.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1450 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-17 17:57:36 +00:00