mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
Define grub_util_is_directory/regular/special_file and
use OS-dependent versions rather than to rely on stat().
This commit is contained in:
1 parent
ec16e02639
commit
df1e64c98e
6 files changed
+113
-31
No files matched your search
@@ -30,11 +30,8 @@
|
||||
#include <grub/emu/hostdisk.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
#include <dirent.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
||||
static int
|
||||
@@ -52,10 +49,7 @@ is_dir (const char *path, const char *name)
|
||||
|
||||
strcat (pathname, name);
|
||||
|
||||
struct stat st;
|
||||
if (stat (pathname, &st))
|
||||
return 0;
|
||||
return S_ISDIR (st.st_mode);
|
||||
return grub_util_is_directory (pathname);
|
||||
}
|
||||
|
||||
struct grub_hostfs_data
|
||||
|
||||
Reference in new issue
Block a user