[parted-devel] [PATCH] Fix device-mapper partition path detection
Guido Günther
agx at sigxcpu.org
Thu Jun 5 07:00:37 UTC 2008
On Wed, Jun 04, 2008 at 02:21:54PM -0300, Otavio Salvador wrote:
> Guido Günther <agx at sigxcpu.org> writes:
>
> > On Tue, May 27, 2008 at 09:43:37PM -0300, Otavio Salvador wrote:
> >> We copy dev->path to result since it doesn't has a partition number.
> > In general device mapper devices can be partitioned, you'd have to
> > decide by map type what to do (which is basically what the patches I
> > sent do).
>
> Could you check this patch and look if it is still needed (or if it's
> wrong) in case using your patch?
Wellm in principle all device mapper devices can be partitioned but in
practice very few are. Can you wait until the map type detection code is
in, we can then decide by map type what to do and treat linear and crypt
devices as unpartitioned (which is what you probably wanted to achieve):
+#ifdef ENABLE_DEVICE_MAPPER
+ } else if (dev->type == PED_DEVICE_DM && dev->dmtype &&
+ (strcmp(dev->dmtype, "linear") == 0 ||
+ strcmp(dev->dmtype, "crypt") == 0) {
+ strcpy(result, dev->path);
+#endif
Cheers,
-- Guido
More information about the parted-devel
mailing list