-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Existence in question #61
Comments
Interesting, looks like some issues with redirected drives. I will have to do some testing and comparisons. What software did you use to map the network drive N: ? |
Just reread, etherdfs. |
It also does the same thing when booting the installed RC5. Which does not have EtherDFS. Only Kernel, FreeCOM, CD Driver Stuff, and Packet Driver (Since installed on VirtualBox), Jemm and some other common stuff. What I should do is boot the installed RC in emergency mode without any drivers and retry. That won't take long. I'll do it right now.... Hmmm, It seems even worse. VirtualBox, Only Kernel and FreeCOM, no other drivers, no CD or Floppy attached. Only Drive A&C exist and no disk in drive A. From the command line (not in a batch file) typing the following sequence yields some strange results. I don't recall of leaving out the "what to do" portion may or may not be a syntax error. Other than this test, I've never tried it. It would never do something useful. It "could" set an errorlevel, but that's pointless. Just use the rest of the statement to do something at that point.
When doing repeated "if exist x:\nul" statements (just using history) that produce the "Bad Command" error over and over again consecutively, the quoted command is always a single character and changes each time. So, for the exist bug, I think it most likely is several different bugs showing up in the same general area.
|
I just tried this in FreeDOS 1.2 (under dosemu2) and the problem seems to be there too, at least in the simple case of
I also tried the same thing under MSDOS 6.22 which gives the expected result
|
Good to know it's not something new that happened as a result of the compiler related changes. :-) |
I've just written a little test for the dosemu2 test suite based on some of your examples. It does some tests on a non existent, a local FAT, and a network redirected drive. I've tried it out on DR-DOS 7.01, MS-DOS 6.22, and FDPP current git HEAD to establish that the semantics are correct. Each subtest should print 'xx_True' On FreeDOS 1.2 I get only one failure, the one I mentioned earlier
On current FreeDOS GIT HEAD kernel and GIT HEAD freecom, both compiled here with GCC and I see no failures.
There was some kernel work done in this area see FDOS/kernel@6ada304 and FDOS/kernel@c69638de, and includes tests, The current kernel/freecom behaves identically in my tests to both MS-DOS 6.22 and DR-DOS 7.01.
So in summary, I do see a problem with Freedos 1.2, but not in current git. |
Hi @andrewbird, You left a type of EXIST failure. The invalid syntax and failure test. When you do these consecutively, the first should say yes. But, the second should do NOTHING. Or, at least to be consistent with MS-DOS provide an error. This seems to happen with just IF EXIST and not with if A == B.
Both report YES. Which is very wrong. The second has not command. I seems to be left over from before. If the "COMMAND" portion is left off on a non-existing drive, it gives a bad command error referencing a random character. |
Agreed, and seems to be a regression as FD 1.2 seems to handle this better. Current git
FD 1.2
|
Hi, working on RC5 I noticed an interesting bug. The bug may or may not be in FreeCOM. I don't have the time to try and run it down right now. But so I don't forget about it, i'll file a bug report. If I recall, maybe I circle back to it later.
VirtualBOX, Latest Kernel, Latest FreeCOM (WATCOM/XSWAP/EN), Networking. For this example also with EtherDFS running.
A: Floppy Image, C: Hard Disk, D: CDROM, N: Mountd Network Share. No other Drives.
When booting the latest kernel and FreeCOM (Watcom) I get the following inconsistencies with EXIST...
(Repeat for each A,C,D,E,N,X. Drives E and X do not exist)
if exist a:\command.com echo yes
COMMAND.COM on all drives but N:. All report as they should. A, C, D = yes. E,N,X show nothing.
if exist a:\freedos\bin\command.com echo yes
True for only A & D; All report as they should.
if exist a:\freedos\nul echo yes
True for only A&D; All report as they should
Now this is where we get weird.
if exist a:\nul echo yes
All return yes. Ummm. ?
Here is a fun one...
if exist c:\command.com echo yes
( prints yes )
if exist c:\command.com
( prints yes, again )
if exist c:\nul
( prints Bad command or filename - "-". )
Now, when I boot the RC5, LiveCD. An image is mapped to drive A:. And a RamDrive is mapped to R:
Exhibits same behavior as mentioned earlier. Plus some new stuff.
if exist A:\nul echo yes
( prints yes, as it should )
if exist B:\nul echo yes
( returns nothing, as it should )
I think there were some other strange results, but I forget what they were and can't seem to replicate them at present.
On a side note...
The text was updated successfully, but these errors were encountered: