wok view parted/stuff/device_mapper.u @ rev 24170
updated otf-gfs
author | Hans-G?nter Theisgen |
---|---|
date | Wed Dec 29 07:55:54 2021 +0100 (2021-12-29) |
parents | |
children |
line source
1 --- parted-3.2/libparted/arch/linux.c.device-mapper 2014-06-15 20:15:54.000000000 +0100
2 +++ parted-3.2/libparted/arch/linux.c 2014-07-29 22:27:54.487430030 +0100
3 @@ -2307,6 +2307,7 @@ zasprintf (const char *format, ...)
4 static char *
5 dm_canonical_path (PedDevice const *dev)
6 {
7 +#ifdef ENABLE_DEVICE_MAPPER
8 LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev);
10 /* Get map name from devicemapper */
11 @@ -2324,6 +2325,7 @@ dm_canonical_path (PedDevice const *dev)
12 dm_task_destroy (task);
13 return dev_name;
14 err:
15 +#endif
16 return NULL;
17 }
19 @@ -2944,13 +2946,14 @@ _disk_sync_part_table (PedDisk* disk)
20 unsigned long long *start,
21 unsigned long long *length);
23 -
24 +#ifdef ENABLE_DEVICE_MAPPER
25 if (disk->dev->type == PED_DEVICE_DM) {
26 add_partition = _dm_add_partition;
27 remove_partition = _dm_remove_partition;
28 resize_partition = _dm_resize_partition;
29 get_partition_start_and_length = _dm_get_partition_start_and_length;
30 } else {
31 +#endif
32 add_partition = _blkpg_add_partition;
33 remove_partition = _blkpg_remove_partition;
34 #ifdef BLKPG_RESIZE_PARTITION
35 @@ -2959,7 +2962,9 @@ _disk_sync_part_table (PedDisk* disk)
36 resize_partition = NULL;
37 #endif
38 get_partition_start_and_length = _kernel_get_partition_start_and_length;
39 +#ifdef ENABLE_DEVICE_MAPPER
40 }
41 +#endif
43 /* lpn = largest partition number.
44 * for remove pass, use greater of device or label limit */