diff --git a/ChangeLog b/ChangeLog index a585a1310..80f9a8669 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-19 Vladimir Serbinenko + + * grub-core/osdep/aros/hostdisk.c (grub_util_is_directory): + New function. + (grub_util_is_special_file): Likewise. + 2013-10-19 Vladimir Serbinenko * grub-core/osdep/unix/getroot.c: Move exec functions to ... diff --git a/grub-core/osdep/aros/hostdisk.c b/grub-core/osdep/aros/hostdisk.c index c42264b9f..3fe442cf5 100644 --- a/grub-core/osdep/aros/hostdisk.c +++ b/grub-core/osdep/aros/hostdisk.c @@ -504,3 +504,24 @@ grub_util_fopen (const char *path, const char *mode) { return fopen (path, mode); } + +int +grub_util_is_directory (const char *path) +{ + struct stat st; + + if (stat (path, &st) == -1) + return 0; + + return S_ISDIR (st.st_mode); +} + +int +grub_util_is_special_file (const char *path) +{ + struct stat st; + + if (lstat (path, &st) == -1) + return 1; + return (!S_ISREG (st.st_mode) && !S_ISDIR (st.st_mode)); +}