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 | 57 |
1 files changed, 57 insertions, 0 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 new file mode 100644 index 0000000000..68ab715f32 --- /dev/null +++ b/meta/recipes-extended/parted/files/fix-compile-failure-while-dis.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 060e74354774d36d2c11ef08e3e7ea9b9b6e23fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Thu, 13 Nov 2014 11:29:33 +0800 | ||
4 | Subject: [PATCH] libparted/arch/linux.c: fix compile failure while | ||
5 | --disable-device-mapper | ||
6 | |||
7 | While --disable-device-mapper, the MACRO ENABLE_DEVICE_MAPPER is | ||
8 | undef, but it missed to scope some device mapper functions. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
13 | --- | ||
14 | libparted/arch/linux.c | 8 ++++++-- | ||
15 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c | ||
18 | index 6fd73c5..2afa479 100644 | ||
19 | --- a/libparted/arch/linux.c | ||
20 | +++ b/libparted/arch/linux.c | ||
21 | @@ -2320,6 +2320,7 @@ zasprintf (const char *format, ...) | ||
22 | static char * | ||
23 | dm_canonical_path (PedDevice const *dev) | ||
24 | { | ||
25 | +#ifdef ENABLE_DEVICE_MAPPER | ||
26 | LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev); | ||
27 | |||
28 | /* Get map name from devicemapper */ | ||
29 | @@ -2337,6 +2338,7 @@ dm_canonical_path (PedDevice const *dev) | ||
30 | dm_task_destroy (task); | ||
31 | return dev_name; | ||
32 | err: | ||
33 | +#endif | ||
34 | return NULL; | ||
35 | } | ||
36 | |||
37 | @@ -2957,13 +2959,15 @@ _disk_sync_part_table (PedDisk* disk) | ||
38 | unsigned long long *start, | ||
39 | unsigned long long *length); | ||
40 | |||
41 | - | ||
42 | +#ifdef ENABLE_DEVICE_MAPPER | ||
43 | if (disk->dev->type == PED_DEVICE_DM) { | ||
44 | add_partition = _dm_add_partition; | ||
45 | remove_partition = _dm_remove_partition; | ||
46 | resize_partition = _dm_resize_partition; | ||
47 | get_partition_start_and_length = _dm_get_partition_start_and_length; | ||
48 | - } else { | ||
49 | + } else | ||
50 | +#endif | ||
51 | + { | ||
52 | add_partition = _blkpg_add_partition; | ||
53 | remove_partition = _blkpg_remove_partition; | ||
54 | #ifdef BLKPG_RESIZE_PARTITION | ||
55 | -- | ||
56 | 1.9.1 | ||
57 | |||