* grub-core/osdep/aros/hostdisk.c (grub_util_is_directory):
New function. (grub_util_is_special_file): Likewise.
This commit is contained in:
parent
40346de6d3
commit
31de274d29
2 changed files with 27 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2013-10-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/osdep/aros/hostdisk.c (grub_util_is_directory):
|
||||||
|
New function.
|
||||||
|
(grub_util_is_special_file): Likewise.
|
||||||
|
|
||||||
2013-10-19 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-10-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/osdep/unix/getroot.c: Move exec functions to ...
|
* grub-core/osdep/unix/getroot.c: Move exec functions to ...
|
||||||
|
|
|
@ -504,3 +504,24 @@ grub_util_fopen (const char *path, const char *mode)
|
||||||
{
|
{
|
||||||
return fopen (path, 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));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue