On Fri, May 09, 2008 at 01:51:04PM -0300, Otavio Salvador wrote:
> I've not tested the patch yet but for that be commited we'll need to
> do a paperwork to give the copyright to Free Software Fundation. Are
> you willing to sign it?
This last hunk is debatable. Debian want's it for sure but I'm not sure
other distros want it - it makes sure we return the correct partition
names for the linear mapping "partitions" on multipath devices. We can
keep this hunk Debian only though.
Cheers,
-- Guido
>From de73b00ae7752a761d68efc27b0159e2101c6841 Mon Sep 17 00:00:00 2001
From: Guido Guenther <[EMAIL PROTECTED]>
Date: Tue, 13 May 2008 18:21:06 +0200
Subject: [PATCH] Return the correct partition name's for mp devices
---
libparted/arch/linux.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index b8e11c5..c98ac77 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2016,6 +2016,13 @@ _device_get_part_path (PedDevice* dev, int num)
/* replace /disc with /path%d */
strcpy (result, dev->path);
snprintf (result + path_len - 5, 16, "/part%d", num);
+#ifdef ENABLE_DEVICE_MAPPER
+ } else if (dev->type == PED_DEVICE_DM && dev->dmtype &&
+ strcmp(dev->dmtype, "multipath") == 0) {
+ /* This is what multipath-tools upstream and Debian uses, it's
+ * a pure userpace (udev) decision! */
+ snprintf (result, result_len, "%s-part%d", dev->path, num);
+#endif
} else if (dev->type == PED_DEVICE_DAC960
|| dev->type == PED_DEVICE_CPQARRAY
|| dev->type == PED_DEVICE_ATARAID
--
1.5.5.1
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel