diff options
Diffstat (limited to 'meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch')
-rw-r--r-- | meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch deleted file mode 100644 index 8c4d2ae66d..0000000000 --- a/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From da3f129710929abe9a403901fa7d168355b0e95a Mon Sep 17 00:00:00 2001 | ||
5 | From: Felix Janda <felix.janda@posteo.de> | ||
6 | Date: Sun, 3 May 2015 10:33:15 +0200 | ||
7 | Subject: [PATCH] libparted/arch/linux.c: Compile without ENABLE_DEVICE_MAPPER | ||
8 | |||
9 | Signed-off-by: Brian C. Lane <bcl@redhat.com> | ||
10 | --- | ||
11 | libparted/arch/linux.c | 21 +++++++++++++++++---- | ||
12 | 1 file changed, 17 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c | ||
15 | index a15854f..7f12f58 100644 | ||
16 | --- a/libparted/arch/linux.c | ||
17 | +++ b/libparted/arch/linux.c | ||
18 | @@ -2305,6 +2305,7 @@ zasprintf (const char *format, ...) | ||
19 | return r < 0 ? NULL : resultp; | ||
20 | } | ||
21 | |||
22 | +#ifdef ENABLE_DEVICE_MAPPER | ||
23 | static char * | ||
24 | dm_canonical_path (PedDevice const *dev) | ||
25 | { | ||
26 | @@ -2327,14 +2328,21 @@ dm_canonical_path (PedDevice const *dev) | ||
27 | err: | ||
28 | return NULL; | ||
29 | } | ||
30 | +#endif | ||
31 | |||
32 | static char* | ||
33 | _device_get_part_path (PedDevice const *dev, int num) | ||
34 | { | ||
35 | - char *devpath = (dev->type == PED_DEVICE_DM | ||
36 | - ? dm_canonical_path (dev) : dev->path); | ||
37 | - size_t path_len = strlen (devpath); | ||
38 | + char *devpath; | ||
39 | + size_t path_len; | ||
40 | char *result; | ||
41 | +#ifdef ENABLE_DEVICE_MAPPER | ||
42 | + devpath = (dev->type == PED_DEVICE_DM | ||
43 | + ? dm_canonical_path (dev) : dev->path); | ||
44 | +#else | ||
45 | + devpath = dev->path; | ||
46 | +#endif | ||
47 | + path_len = strlen (devpath); | ||
48 | /* Check for devfs-style /disc => /partN transformation | ||
49 | unconditionally; the system might be using udev with devfs rules, | ||
50 | and if not the test is harmless. */ | ||
51 | @@ -2350,8 +2358,10 @@ _device_get_part_path (PedDevice const *dev, int num) | ||
52 | ? "p" : ""); | ||
53 | result = zasprintf ("%s%s%d", devpath, p, num); | ||
54 | } | ||
55 | +#ifdef ENABLE_DEVICE_MAPPER | ||
56 | if (dev->type == PED_DEVICE_DM) | ||
57 | free (devpath); | ||
58 | +#endif | ||
59 | return result; | ||
60 | } | ||
61 | |||
62 | @@ -2946,12 +2956,15 @@ _disk_sync_part_table (PedDisk* disk) | ||
63 | unsigned long long *length); | ||
64 | |||
65 | |||
66 | +#ifdef ENABLE_DEVICE_MAPPER | ||
67 | if (disk->dev->type == PED_DEVICE_DM) { | ||
68 | add_partition = _dm_add_partition; | ||
69 | remove_partition = _dm_remove_partition; | ||
70 | resize_partition = _dm_resize_partition; | ||
71 | get_partition_start_and_length = _dm_get_partition_start_and_length; | ||
72 | - } else { | ||
73 | + } else | ||
74 | +#endif | ||
75 | + { | ||
76 | add_partition = _blkpg_add_partition; | ||
77 | remove_partition = _blkpg_remove_partition; | ||
78 | #ifdef BLKPG_RESIZE_PARTITION | ||
79 | -- | ||
80 | 2.11.0 | ||
81 | |||