summaryrefslogtreecommitdiff
path: root/package/parted/patches/patch-libparted_arch_linux_c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-01-03 20:56:24 -0600
committerWaldemar Brodkorb <wbx@openadk.org>2015-01-03 20:56:32 -0600
commit0931ed596867e5646a3eb0dea4cf5005c2f5e2d6 (patch)
tree329a9bdf9a18ef66d3ce99abf7826fa9d83f590b /package/parted/patches/patch-libparted_arch_linux_c
parent0cb53d7aff9ee58ab02f202cbabb9b16e139aae7 (diff)
add patch to build parted without libdevmapper
Diffstat (limited to 'package/parted/patches/patch-libparted_arch_linux_c')
-rw-r--r--package/parted/patches/patch-libparted_arch_linux_c41
1 files changed, 41 insertions, 0 deletions
diff --git a/package/parted/patches/patch-libparted_arch_linux_c b/package/parted/patches/patch-libparted_arch_linux_c
new file mode 100644
index 000000000..7a8efcf04
--- /dev/null
+++ b/package/parted/patches/patch-libparted_arch_linux_c
@@ -0,0 +1,41 @@
+--- parted-3.2.orig/libparted/arch/linux.c 2014-06-15 14:15:54.000000000 -0500
++++ parted-3.2/libparted/arch/linux.c 2015-01-03 14:10:43.244848741 -0600
+@@ -2304,6 +2304,7 @@ zasprintf (const char *format, ...)
+ return r < 0 ? NULL : resultp;
+ }
+
++#ifdef ENABLE_DEVICE_MAPPER
+ static char *
+ dm_canonical_path (PedDevice const *dev)
+ {
+@@ -2326,12 +2327,17 @@ dm_canonical_path (PedDevice const *dev)
+ err:
+ return NULL;
+ }
++#endif
+
+ static char*
+ _device_get_part_path (PedDevice const *dev, int num)
+ {
++#ifdef ENABLE_DEVICE_MAPPER
+ char *devpath = (dev->type == PED_DEVICE_DM
+ ? dm_canonical_path (dev) : dev->path);
++#else
++ char *devpath = dev->path;
++#endif
+ size_t path_len = strlen (devpath);
+ char *result;
+ /* Check for devfs-style /disc => /partN transformation
+@@ -2946,10 +2952,12 @@ _disk_sync_part_table (PedDisk* disk)
+
+
+ if (disk->dev->type == PED_DEVICE_DM) {
++#ifdef ENABLE_DEVICE_MAPPER
+ add_partition = _dm_add_partition;
+ remove_partition = _dm_remove_partition;
+ resize_partition = _dm_resize_partition;
+ get_partition_start_and_length = _dm_get_partition_start_and_length;
++#endif
+ } else {
+ add_partition = _blkpg_add_partition;
+ remove_partition = _blkpg_remove_partition;