Correct a problem that was causing an apparent directory to be reported as a...
Correct a problem that was causing an apparent directory to be reported as a file instead of a directory by opendir. This happened after adding these three new procfs entries: fs/block fs/mount fs/usage Of course, there is no directory fs in this case, only three files that have fs/ in their relative pathnames. The logic was detecting that fs was the name of the enty to report, but it was then declaring that fs was a file (because fs/block is of type file). This was fixed by adding a check for matching lenghts. i.e., if strlen(fs) != strlen(fs/block), then report fs as a directory instead of a file.
parent
1ed816de
Please register or sign in to comment