This commit is contained in:
parent
8aab5e25a1
commit
e768b77068
2 changed files with 5 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-07-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* util/hostfs.c (grub_hostfs_dir): Don't use DT_DIR: It doesn't work
|
||||
on XFS or ReiserFS.
|
||||
|
||||
2009-08-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Support Apple partition map with sector size different from 512 bytes.
|
||||
|
|
|
@ -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…
Reference in a new issue