Hi!

I wrote:

>> +++ mk_rddir.c        10 Dec 2005 10:09:43 -0000      1.3
>> +int lfn_mrc_dir(const char *path, int mode)
>> +{
>> +     struct REGPACK r;
>> +     int mrc_f[6] = { 0x713A, 0x7139, 0x713B, 0x3A, 0x39, 0x3B };
--------------------------------------------------^^^^--^^^^--^^^^

     BTW, bug! Function number should come in AH, not AL! So:

>> +     r.r_ax = mrc_f[mode + (checkDriveSupportsLFN(getdisk() + 'A') ? 0 : 
>> 3)];
>     if (checkDriveSupportsLFN(getdisk() + 'A'))
>       mode += 0x7100;
>     r.r_ax = mode;

     Possible solution with my edition:

if (...)
  mode += 0x7100;
else
  mode <<= 8; /* shift low byte to high byte */
r.r_ax = mode;

     Or:

if (...)
  mode = (mode >> 8) + 0x7100;
r.r_ax = mode;
[...]
#define chdir(x) lfn_mrc_dir(x,0x3B00)
>----------------------------------^^





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to