dosemu2 / comcom64

64bit command.com
https://github.com/dosemu2/comcom32/
GNU General Public License v3.0
32 stars 5 forks source link

DIR (using int21/7303) non longer reports correct space #69

Closed andrewbird closed 1 year ago

andrewbird commented 1 year ago

Since 2a0ee04967b79157aede01459ea9d7d667c2f8dc DIR either always falls back to int21/36 or returns gibberish values from int21/7303

andrewbird commented 1 year ago

It seems the segments aren't set.

fdpp: System call (21h): 7303                                                   
fdpp: in 7303 DS = 0                                                            
fdpp: in 7303 ES = 0                                                            
fdpp: in 7303 CX = 44                                                           
fdpp: in 7303 after                                                             
fdpp: in DosGetExtFree 0 'þ'                                                    

I have to leave this to you @stsp as I don't understand all this DPMI stuff.

stsp commented 1 year ago

Thanks, could you please check the fix?

andrewbird commented 1 year ago

Thanks, it's working now.

stsp commented 1 year ago

That's a stupid fix actually. Could you please change that code to statfs()?

andrewbird commented 1 year ago

Which is good that it supports int21/7303 internally, but crap that it wants to do a DOS version check first. https://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/compat/sys/vfs/statfs.c?rev=1.10

stsp commented 1 year ago

If it checks some _osmajor then you can save its value and temporary rewrite.