All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUGFIX] Don't use DT_DIR: It doesn't work on non-ext* filesystems
@ 2009-07-23  9:29 Vladimir 'phcoder' Serbinenko
  2009-07-23 21:57 ` Pavel Roskin
  0 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-07-23  9:29 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 106 bytes --]

-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git

[-- Attachment #2: dir.diff --]
[-- Type: text/plain, Size: 1082 bytes --]

diff --git a/ChangeLog b/ChangeLog
index a0780ab..16aab92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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-07-21  Vladimir Serbinenko  <phcoder@gmail.com>
 
 	UUID support for UFS
diff --git a/util/hostfs.c b/util/hostfs.c
index 1b963bb..83db2f1 100644
--- a/util/hostfs.c
+++ b/util/hostfs.c
@@ -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);
 
     }

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-25 16:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-23  9:29 [BUGFIX] Don't use DT_DIR: It doesn't work on non-ext* filesystems Vladimir 'phcoder' Serbinenko
2009-07-23 21:57 ` Pavel Roskin
2009-07-24 21:02   ` Christian Franke
2009-07-24 21:49     ` Pavel Roskin
2009-07-24 22:02       ` Christian Franke
2009-07-25 16:23       ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.