This commit is contained in:
parent
8aab5e25a1
commit
e768b77068
2 changed files with 5 additions and 6 deletions
|
@ -28,7 +28,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
|
||||
#ifndef DT_DIR
|
||||
/* dirent.d_type is a BSD extension, not part of POSIX */
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
@ -53,7 +52,6 @@ is_dir (const char *path, const char *name)
|
|||
return 0;
|
||||
return S_ISDIR (st.st_mode);
|
||||
}
|
||||
#endif
|
||||
|
||||
static grub_err_t
|
||||
grub_hostfs_dir (grub_device_t device, const char *path,
|
||||
|
@ -81,11 +79,7 @@ grub_hostfs_dir (grub_device_t device, const char *path,
|
|||
if (! de)
|
||||
break;
|
||||
|
||||
#ifdef DT_DIR
|
||||
info.dir = (de->d_type == DT_DIR);
|
||||
#else
|
||||
info.dir = !! is_dir (path, de->d_name);
|
||||
#endif
|
||||
hook (de->d_name, &info);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue