Make grub_util_device_is_mapped_stat available in grub-emu core.

This commit is contained in:
Vladimir Serbinenko 2013-12-24 16:56:14 +01:00
parent 57bc5d431b
commit f7c7c4d4ad
3 changed files with 27 additions and 22 deletions

View file

@ -1,3 +1,7 @@
2013-12-24 Vladimir Serbinenko <phcoder@gmail.com>
Make grub_util_device_is_mapped_stat available in grub-emu core.
2013-12-24 Vladimir Serbinenko <phcoder@gmail.com>
Add -Qn to TARGET_CFLAGS if it's supported.

View file

@ -211,22 +211,6 @@ grub_util_devmapper_part_to_disk (struct stat *st,
return xstrdup (path);
}
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;
return dm_is_dm_major (major (st->st_rdev));
}
char *
grub_util_get_devmapper_grub_dev (const char *os_dev)
{
@ -311,12 +295,6 @@ grub_util_pull_devmapper (const char *os_dev __attribute__ ((unused)))
return;
}
int
grub_util_device_is_mapped_stat (struct stat *st __attribute__ ((unused)))
{
return 0;
}
void
grub_util_devmapper_cleanup (void)
{

View file

@ -82,6 +82,23 @@ grub_util_device_is_mapped (const char *dev)
return dm_is_dm_major (major (st.st_rdev));
}
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;
return dm_is_dm_major (major (st->st_rdev));
}
int
grub_util_get_dm_node_linear_info (dev_t dev,
int *maj, int *min,
@ -199,4 +216,10 @@ grub_util_get_dm_node_linear_info (dev_t dev __attribute__ ((unused)),
return 0;
}
int
grub_util_device_is_mapped_stat (struct stat *st __attribute__ ((unused)))
{
return 0;
}
#endif