On Fri, 2009-07-24 at 23:02 +0200, Christian Franke wrote: > A correct performance-aware solution would look like: > > #ifdef DT_DIR > if (de->d_type == DT_DIR) > info.dir = 1; > else if (de->type == DT_FILE)
There in no DT_FILE in glibc, but there is DT_REG. DT_UNKNOWN is present. Perhaps the above line should be else if (de->type != DT_UNKNOWN) We only care if it's a directory or not. All other objects can be treated like files. I'm fine either way, whether we fix the "high-performance" code or remove it, as long as we don't have to add more checks. -- Regards, Pavel Roskin _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel