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
|
@ -143,13 +143,19 @@ is_fulldisk (const char *child, const char *parent)
|
|||
|
||||
char *
|
||||
grub_util_part_to_disk (const char *os_dev,
|
||||
struct stat *st __attribute__ ((unused)),
|
||||
struct stat *st,
|
||||
int *is_part)
|
||||
{
|
||||
char *path;
|
||||
grub_disk_addr_t offset;
|
||||
char *p;
|
||||
|
||||
if (! S_ISBLK (st->st_mode))
|
||||
{
|
||||
*is_part = 0;
|
||||
return xstrdup (os_dev);
|
||||
}
|
||||
|
||||
if (!grub_util_hurd_get_disk_info (os_dev, NULL, &offset, NULL, &path))
|
||||
return xstrdup (os_dev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue