here ...
* grub-core/kern/emu/hostdisk.c (grub_device_mapper_supported): ... to
here.
+2013-08-14 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/kern/emu/misc.c (grub_device_mapper_supported): Move from
+ here ...
+ * grub-core/kern/emu/hostdisk.c (grub_device_mapper_supported): ... to
+ here.
+
2013-08-14 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/i386/pc/biosdisk.h (grub_biosdisk_drp): Fix device_path
#endif
}
+#ifdef HAVE_DEVICE_MAPPER
+static void device_mapper_null_log (int level __attribute__ ((unused)),
+ const char *file __attribute__ ((unused)),
+ int line __attribute__ ((unused)),
+ int dm_errno __attribute__ ((unused)),
+ const char *f __attribute__ ((unused)),
+ ...)
+{
+}
+
+int
+grub_device_mapper_supported (void)
+{
+ static int supported = -1;
+
+ if (supported == -1)
+ {
+ struct dm_task *dmt;
+
+ /* Suppress annoying log messages. */
+ dm_log_with_errno_init (&device_mapper_null_log);
+
+ dmt = dm_task_create (DM_DEVICE_VERSION);
+ supported = (dmt != NULL);
+ if (dmt)
+ dm_task_destroy (dmt);
+
+ /* Restore the original logger. */
+ dm_log_with_errno_init (NULL);
+ }
+
+ return supported;
+}
+#endif /* HAVE_DEVICE_MAPPER */
+
int
grub_util_device_is_mapped (const char *dev)
{
return ret;
}
-#ifdef HAVE_DEVICE_MAPPER
-static void device_mapper_null_log (int level __attribute__ ((unused)),
- const char *file __attribute__ ((unused)),
- int line __attribute__ ((unused)),
- int dm_errno __attribute__ ((unused)),
- const char *f __attribute__ ((unused)),
- ...)
-{
-}
-
-int
-grub_device_mapper_supported (void)
-{
- static int supported = -1;
-
- if (supported == -1)
- {
- struct dm_task *dmt;
-
- /* Suppress annoying log messages. */
- dm_log_with_errno_init (&device_mapper_null_log);
-
- dmt = dm_task_create (DM_DEVICE_VERSION);
- supported = (dmt != NULL);
- if (dmt)
- dm_task_destroy (dmt);
-
- /* Restore the original logger. */
- dm_log_with_errno_init (NULL);
- }
-
- return supported;
-}
-#endif /* HAVE_DEVICE_MAPPER */