[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Fri May 15 14:30:07 UTC 2009


 configure.ac           |   18 +++++++++++++-----
 libparted/arch/linux.c |    2 +-
 2 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit f9f5f471c11a95395f3c4be8b604470b6a5befe6
Author: Joel Granados Moreno <jgranado at redhat.com>
Date:   Thu May 14 19:06:53 2009 +0200

    build: enable device mapper support by default
    
    * configure.ac: Device mapper is ubiquitous enough: enable by default.
    Adjust --help and diagnostics to reflect the new default.

diff --git a/configure.ac b/configure.ac
index 5616be8..d87dbdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,10 +79,10 @@ if test "$enable_mtrace" = yes; then
 fi
 
 AC_SUBST([ENABLE_DEVICE_MAPPER])
-ENABLE_DEVICE_MAPPER=no
+ENABLE_DEVICE_MAPPER=yes
 AC_ARG_ENABLE([device-mapper],
-	[  --enable-device-mapper  enable device mapper support [default=no]],
-	[ENABLE_DEVICE_MAPPER=yes])
+	[  --enable-device-mapper  enable device mapper support [default=yes]],
+	[ENABLE_DEVICE_MAPPER=$enable_device_mapper])
 if test $ENABLE_DEVICE_MAPPER = yes; then
 	AC_DEFINE([ENABLE_DEVICE_MAPPER],
                   1, [device mapper (libdevmapper) support])
@@ -258,8 +258,16 @@ DM_LIBS=
 if test $ENABLE_DEVICE_MAPPER = yes; then
   AC_CHECK_LIB([devmapper], [dm_task_create],
     [DM_LIBS=-ldevmapper],
-    [AC_MSG_ERROR([libdevmapper not found!  Try using --disable-device-mapper])
-      ])
+    [AC_MSG_ERROR(
+libdevmapper could not be found, but is required for the
+--enable-device-mapper option, which is enabled by default.  Either disable
+device-mapper support with --disable-device-mapper or download and install
+device-mapper from:
+	http://sources.redhat.com/dm/
+Note: if you are using precompiled packages you will need the development
+package as well (it may be called device-mapper-devel or something similar).
+    )]
+  )
 fi
 AC_SUBST([DM_LIBS])
 

commit fff0c7fb8c85fd76c08d9a8e1997fecf8144d7c0
Author: Jim Meyering <meyering at redhat.com>
Date:   Fri May 15 16:29:37 2009 +0200

    portability: don't perform pointer arithmetic on a "void *" pointer
    
    * libparted/arch/linux.c (_dm_remove_parts) [ENABLE_DEVICE_MAPPER]:
    Don't perform pointer arithmetic on a "void *" pointer.
    Interpose a (char *) cast.

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 6e47107..b113c37 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2457,7 +2457,7 @@ _dm_remove_parts (PedDevice* dev)
 
         rc = 0;
         do {
-                names = (void *)names + next;
+                names = (void *) ((char *) names + next);
 
                 if (_dm_is_part(info, names->name))
                         rc += _dm_remove_map_name(names->name);



More information about the Parted-commits mailing list