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
|
@ -65,6 +65,13 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
|
|||
int *is_part)
|
||||
{
|
||||
int rawpart = -1;
|
||||
|
||||
if (! S_ISCHR (st->st_mode))
|
||||
{
|
||||
*is_part = 0;
|
||||
return xstrdup (os_dev);
|
||||
}
|
||||
|
||||
# ifdef HAVE_GETRAWPARTITION
|
||||
rawpart = getrawpartition();
|
||||
# endif /* HAVE_GETRAWPARTITION */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue