Hi!

     Symptom:

>dir>test
Can not redirect output to file 'test'.

I debug this and found reason for bug. (Sure, this was hard job for debug,
because many re-definitions of standard names.) See patch in attachment.
diff -rup -x config.mak OLD/# NEW/#
--- OLD/#       2006-08-22 20:04:52.000000000 +0000
+++ NEW/#       2006-08-23 00:55:36.000000000 +0000
@@ -155,3 +155,6 @@ Error exec.c 72: Unknown preprocessor di
     - name with drive letter ("d:") or absolute path ("\cmd", "\dir\cmd")
       now NOT searched through path; name with relative path ("dir\cmd") DO
       searched through PATH.
+
+11. Fixed bug in LFNFUNCS.C library, which prevents redirection (because
+    this bug prevents to create non-existed files).
diff -rup -x config.mak OLD/lib/lfnfuncs.c NEW/lib/lfnfuncs.c
--- OLD/lib/lfnfuncs.c  2006-08-07 12:04:22.000000000 +0000
+++ NEW/lib/lfnfuncs.c  2006-08-23 00:49:28.000000000 +0000
@@ -6,6 +6,7 @@
 
 #include <dir.h>       /* findfirst, findnext */
 #include <fcntl.h>     /* O_WRONLY, O_CREAT */
+#include <sys/stat.h>  /* S_IWRITE */
 #include <errno.h>     /* errno */
 #include <string.h>    /* strchr, memcpy */
 #include <stdarg.h>
@@ -145,8 +146,9 @@ int lfnopen( const char *filename, int a
 
     if( access & O_CREAT ) {
         access &= ~O_CREAT; /* Remove the O_CREAT bit */
-
-        __creat_or_truncate( filename, va_arg( vargs, unsigned ) );
+        __creat_or_truncate (filename,
+                            (va_arg (vargs, unsigned) & S_IWRITE)
+                                       ? _A_NORMAL : _A_RDONLY);
     }
     va_end( vargs );
 
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to