Re: [Freedos-kernel] SYS issues
Hi! 12-Мар-2004 14:34 [EMAIL PROTECTED] (Kenneth J. Davis) wrote to [EMAIL PROTECTED]: - /Odrive - use fixed drive number (in hex) in boot sector. >>MHT> If this switch is intended for compatibility with DR-DOS, drive number This is rather functional compatablity, not syntaxtical. >> Inconsistent: address in /L option is hex-value. And I think, _here_ KJD> If the option is mimicking an existing option (in this case Not so. /O, as described by Matthias, only gives me idea how, but I don't think that full mimick of DR-DOS SYS is important for us. KJD> from DR-DOS sys), we should at least try to be compatible. KJD> So wouldn't the better change to require/support the KJD> 0x or $ or h notations for the /L option as well, and Matthias doesn't says that DR-DOS supports radix, other than 10. :) KJD> use base 10, at least for the /O option, if not used KJD> or complain/warn if a hex prefix/suffix is not used. Which reason to use decimal numbers for disk numbers? I don't think that 128 is somewhat more readable than 80. I think, radix 10 for /L and even for /O is useless. KJD> Has your work been committed to cvs or is there a patch/ KJD> source archive around that one can look at? No, all work is currently on my disk. Also, call to put_boot() is currently commented (because there are yet some unsolved issues - for example, locking behavior), only interface (options parsing) and copy() is working. --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] SYS issues
>>> - /Odrive - use fixed drive number (in hex) in boot sector. >MHT> If this switch is intended for compatibility with DR-DOS, drive number >MHT> should be given in decimal. Support for hex with '0x' and/or '$' prefix >MHT> can be a nice extension, though :-) > > Inconsistent: address in /L option is hex-value. And I think, _here_ >consistency inside one program interface is more important, than full >compatability with (very rarely used/known) option of DR-DOS SYS. > If the option is mimicking an existing option (in this case from DR-DOS sys), we should at least try to be compatible. So wouldn't the better change to require/support the 0x or $ or h notations for the /L option as well, and use base 10, at least for the /O option, if not used or complain/warn if a hex prefix/suffix is not used. So if in all the examples, options are used as /L 0xABCD and /O 0x123 we will be consistant within this one program and at the same time constistant for those familiar with the DR DOS sys /O option. Just my opinion, do as you feel best for our sys though. Has your work been committed to cvs or is there a patch/ source archive around that one can look at? Thanks, Jeremy --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] SYS issues
Hi! 12-Мар-2004 19:34 [EMAIL PROTECTED] (Michal H. Tyc) wrote to [EMAIL PROTECTED]: >> - /Odrive - use fixed drive number (in hex) in boot sector. MHT> If this switch is intended for compatibility with DR-DOS, drive number MHT> should be given in decimal. Support for hex with '0x' and/or '$' prefix MHT> can be a nice extension, though :-) Inconsistent: address in /L option is hex-value. And I think, _here_ consistency inside one program interface is more important, than full compatability with (very rarely used/known) option of DR-DOS SYS. --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
Re: [Freedos-kernel] SYS issues
Hi, On Fri, 12 Mar 2004 14:03:44 +0300 (MSK), Arkady V.Belousov wrote: > - /Odrive - use fixed drive number (in hex) in boot sector. If this switch is intended for compatibility with DR-DOS, drive number should be given in decimal. Support for hex with '0x' and/or '$' prefix can be a nice extension, though :-) Michal --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] SYS issues
Hi! Let me remind some SYS issues (and my progress): __O\_/_\_/O__ - BOTH and BOOTONLY are now options (should be prefixed by slash). - duplicates for options /BOTH and /BOOTONLY now are allowed. - options (except /CONFIG) may now used in any position. - spaces between options (/K, /L) and argument now not required. - argument of /L option is now diagnosed for validness. - file with boot sector is now argument of /B option. - target drive is now diagnosed if it exists and not SUBSTed/networked. - fix: check_space() is removed; this was buggy, because there was not counted space, used by already existed kernel.sys and command.com. - fix: instead "<= FAT_MAGIC" was used "< FAT_MAGIC". [FAT_MAGIC and FAT_MAGIC16 should be named FAT12_LAST and FAT16_LAST.] - fix: except Watcom: generic_block_ioctl() gets drive# incremented by extra 1 (+1 when calling this function, and +1 inside). - fix: Watcom: after INT 25/26 was not removed flags from stack. - fix: TC/BC: instead absread()/abswrite() now used own code. - fix: when calling drive locking, BH (level) was not initialized. TODO: - for uppercasing kernel_name should be used INT21/6504 service to correctly work with file names with NLS characters. - /Odrive - use fixed drive number (in hex) in boot sector. _ O/~\ /~\O Unfortunately, only Bernd answers me for my requests to test FAT32-related code, but I hope, with his help we solve some FAT32/Win issues. --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] SYS issues
Hi! After some discussion with Eric, we decise that fixing non-filled geometry should be in that way: __O\_/_\_/O__ /* Linux dosfstools 'mkdosfs' treats all filesystems like images, so it does not fill in the physical geometry. To make the disk bootable, we have to fill in trackSectors, heads and hiddenSectors ourselves. We take the values from the default BPB provided by the kernel. Eric Auer. */ void fix_bpb (UBYTE drive, UWORD code, BPB *pb) { static struct { UBYTE func; UBYTE reserved1 [6]; BPB bpb; UBYTE reserved2 [0x5C - sizeof (BPB) - 7]; } IOCTL_data; /* bit 0 set if function to use current BPB, clear if Device BIOS Parameter Block field contains new default BPB bit 1 set if function to use track layout fields only must be clear if CL=60h bit 2 set if all sectors in track same size (should be set) (RBIL) */ IOCTL_data.func = 4; if (generic_block_ioctl (drive, code, &IOCTL_data)) return; if (pb->hiddenSectors != IOCTL_data.bpb.hiddenSectors && pb->trackSectors != IOCTL_data.bpb.trackSectors && pb->heads != IOCTL_data.bpb.heads) { /* if geometry was filled, but different with default, then this may mean erroroneous data, which should be fixed */ if (pb->trackSectors && pb->heads) { printf (PGM ": error: geometry (hidden,sectors/track,heads) is different between\n" "boot sector (%lu,%u,%u) and OS (%lu,%u,%u)\n", pb->hiddenSectors, pb->trackSectors, pb->heads, IOCTL_data.bpb.hiddenSectors, IOCTL_data.bpb.trackSectors, IOCTL_data.bpb.heads); exit (1); return; /* remain fixing for CHKDSK */ } pb->hiddenSectors = IOCTL_data.bpb.hiddenSectors; pb->trackSectors = IOCTL_data.bpb.trackSectors; pb->heads = IOCTL_data.bpb.heads; } } void put_boot (UBYTE drive, int both) { bootsector_t curboot, *newboot; [...] if (fs == FAT32) { [...] } else { /* get the FAT12/16 CHS+LBA boot sector */ newboot = (bootsector_t*)(fs == FAT16 ? boot16 : boot12); code = 0x860; sz = BPBSIZE; } fix_bpb (drive, code, &curboot._.bs.bpb); /* Copy disk parameter from current sector to new sector */ memcpy (&newboot->_.bs.bpb, &curboot._.bs.bpb, sz); _ O/~\ /~\O Is there comments, additions? --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] SYS issues
Hi! While cleaning/tuning SYS, I found some bugs. - for uppercasing file name should be used INT21/6504 service to correctly work with file names with NLS characters. - instead "<= FAT_MAGIC*" used "< FAT_MAGIC*" comparision. [BTW, FAT_MAGIC and FAT_MAGIC16 should be FAT12_LAST and FAT16_LAST.] Currently I replace this code by more compact code (suggested by Eric :), which checks how much sectors in FAT. - for all compilers, except, Watcom, generic_block_ioctl() gets drive#, incremented by one extra 1 (+1 when calling this function, and +1 inside). PS: BTW, is FreeDOS already implements INT21/6504? --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel
[Freedos-kernel] sys issues
Hi! Please, explain me, what I should write in comments for correct_bpb()? --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click ___ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel