Move stat () and device mode checking into OS-dependent files as
long as performance doesn't suffer.
This commit is contained in:
parent
a4012f0764
commit
cd78a56fb2
10 changed files with 93 additions and 71 deletions
|
@ -321,6 +321,13 @@ grub_util_devmapper_part_to_disk (struct stat *st,
|
|||
int
|
||||
grub_util_device_is_mapped_stat (struct stat *st)
|
||||
{
|
||||
#if GRUB_DISK_DEVS_ARE_CHAR
|
||||
if (! S_ISCHR (st->st_mode))
|
||||
#else
|
||||
if (! S_ISBLK (st->st_mode))
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
if (!grub_device_mapper_supported ())
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue