Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-block/parted/files: parted-3.2-devmapper.patch
Date: Tue, 29 Jul 2014 17:14:20
Message-Id: 20140729171412.5489A20035@flycatcher.gentoo.org
1 jer 14/07/29 17:14:10
2
3 Added: parted-3.2-devmapper.patch
4 Log:
5 Version bump.
6
7 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A792A613)
8
9 Revision Changes Path
10 1.1 sys-block/parted/files/parted-3.2-devmapper.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-block/parted/files/parted-3.2-devmapper.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-block/parted/files/parted-3.2-devmapper.patch?rev=1.1&content-type=text/plain
14
15 Index: parted-3.2-devmapper.patch
16 ===================================================================
17 --- a/libparted/arch/linux.c
18 +++ b/libparted/arch/linux.c
19 @@ -2304,6 +2304,7 @@
20 return r < 0 ? NULL : resultp;
21 }
22
23 +#ifdef ENABLE_DEVICE_MAPPER
24 static char *
25 dm_canonical_path (PedDevice const *dev)
26 {
27 @@ -2326,12 +2327,22 @@
28 err:
29 return NULL;
30 }
31 +#endif /* ENABLE_DEVICE_MAPPER */
32
33 static char*
34 _device_get_part_path (PedDevice const *dev, int num)
35 {
36 - char *devpath = (dev->type == PED_DEVICE_DM
37 - ? dm_canonical_path (dev) : dev->path);
38 + char *devpath =
39 +#ifdef ENABLE_DEVICE_MAPPER
40 + (
41 + dev->type == PED_DEVICE_DM
42 + ? dm_canonical_path (dev) :
43 +#endif /* ENABLE_DEVICE_MAPPER */
44 + dev->path
45 +#ifdef ENABLE_DEVICE_MAPPER
46 + )
47 +#endif /* ENABLE_DEVICE_MAPPER */
48 + ;
49 size_t path_len = strlen (devpath);
50 char *result;
51 /* Check for devfs-style /disc => /partN transformation
52 @@ -2945,12 +2956,14 @@
53 unsigned long long *length);
54
55
56 +#ifdef ENABLE_DEVICE_MAPPER
57 if (disk->dev->type == PED_DEVICE_DM) {
58 add_partition = _dm_add_partition;
59 remove_partition = _dm_remove_partition;
60 resize_partition = _dm_resize_partition;
61 get_partition_start_and_length = _dm_get_partition_start_and_length;
62 } else {
63 +#endif /* ENABLE_DEVICE_MAPPER */
64 add_partition = _blkpg_add_partition;
65 remove_partition = _blkpg_remove_partition;
66 #ifdef BLKPG_RESIZE_PARTITION
67 @@ -2959,7 +2972,9 @@
68 resize_partition = NULL;
69 #endif
70 get_partition_start_and_length = _kernel_get_partition_start_and_length;
71 +#ifdef ENABLE_DEVICE_MAPPER
72 }
73 +#endif /* ENABLE_DEVICE_MAPPER */
74
75 /* lpn = largest partition number.
76 * for remove pass, use greater of device or label limit */