+
+/* Test if a device is a logical volume (RHBZ#619793). */
+int
+do_is_lv (const char *device)
+{
+ return lv_canonical (device, NULL);
+}
+
+/* Return canonical name of LV to caller (RHBZ#638899). */
+char *
+do_lvm_canonical_lv_name (const char *device)
+{
+ char *canonical;
+ int r = lv_canonical (device, &canonical);
+ if (r == -1)
+ return NULL;
+
+ if (r == 0) {
+ reply_with_error ("%s: not a logical volume", device);
+ return NULL;
+ }
+
+ return canonical; /* caller frees */
+}