Mark Bailey wrote:
Good day, all:
If doing a "DIR A:" on a floppy disk with no visible files,
or a hard disk partition with no files, the DIR command does
not print the line showing the number of bytes free.
This appears to be intended in the routine dir_print_body
from the file dir.c.
Note that E_Other is defined as "2" in command.h and
print_total would typically return "0". So, if the
filecount is zero, rv is set to E_Other and
the summary line from dir_print_free is not output.
if(optS) {
if(filecount)
rv = print_total(filecount, bytecount);
else {
error_file_not_found();
rv = E_Other;
}
}
if(!rv)
rv = dir_print_free(*dircount);
Is this the intended behavior? I found it confusing and
MSDOS prints "File not found" and the number of bytes free.
Mark Bailey
I thought DOS (at least older versions) did not print free space unless
at least one file was displayed. This may have changed (or my memory is
wrong). Assuming my memory is not wrong (and based on the way it is
coded) this does appear to be intended behavior.
If there are no objections? Are there any?
I would be more than happy to apply a patch that displayed the free
space even if the directory is empty (it should take care to handle
errors gracefully still).
Jeremy
-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel