summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch')
-rw-r--r--meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch66
1 files changed, 44 insertions, 22 deletions
diff --git a/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch b/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
index 3d9cb6d018..ac5b5e2beb 100644
--- a/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
+++ b/meta-oe/recipes-extended/libblockdev/files/0003-remove-dmraid-while-compiling-with-with-dm.patch
@@ -22,21 +22,22 @@ Upstream-Status: Inappropriate [oe specific]
22 22
23Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 23Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
24--- 24---
25 src/lib/plugin_apis/dm.api | 41 ----- 25 src/lib/plugin_apis/dm.api | 50 ------
26 src/plugins/Makefile.am | 2 +- 26 src/plugins/Makefile.am | 2 +-
27 src/plugins/dm.c | 318 ------------------------------------ 27 src/plugins/dm.c | 330 ------------------------------------
28 src/plugins/dm.h | 5 - 28 src/plugins/dm.h | 5 -
29 src/python/gi/overrides/BlockDev.py | 6 - 29 src/python/gi/overrides/BlockDev.py | 6 -
30 5 files changed, 1 insertion(+), 371 deletions(-) 30 5 files changed, 1 insertion(+), 392 deletions(-)
31 31
32diff --git a/src/lib/plugin_apis/dm.api b/src/lib/plugin_apis/dm.api 32diff --git a/src/lib/plugin_apis/dm.api b/src/lib/plugin_apis/dm.api
33index a885bba..ec86b80 100644 33index 04fd8d8..5d30b6a 100644
34--- a/src/lib/plugin_apis/dm.api 34--- a/src/lib/plugin_apis/dm.api
35+++ b/src/lib/plugin_apis/dm.api 35+++ b/src/lib/plugin_apis/dm.api
36@@ -68,44 +68,3 @@ gchar* bd_dm_node_from_name (const gchar *map_name, GError **error); 36@@ -111,53 +111,3 @@ gchar* bd_dm_get_subsystem_from_name (const gchar *device_name, GError **error);
37 * Tech category: %BD_DM_TECH_MAP-%BD_DM_TECH_MODE_QUERY
37 */ 38 */
38 gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error); 39 gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error);
39 40-
40-/** 41-/**
41- * bd_dm_get_member_raid_sets: 42- * bd_dm_get_member_raid_sets:
42- * @name: (allow-none): name of the member 43- * @name: (allow-none): name of the member
@@ -49,6 +50,8 @@ index a885bba..ec86b80 100644
49- * the member or %NULL in case of error 50- * the member or %NULL in case of error
50- * 51- *
51- * One of @name, @uuid or @major:@minor has to be given. 52- * One of @name, @uuid or @major:@minor has to be given.
53- *
54- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_MODE_QUERY
52- */ 55- */
53-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error); 56-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
54- 57-
@@ -58,6 +61,8 @@ index a885bba..ec86b80 100644
58- * @error: (out): variable to store error (if any) 61- * @error: (out): variable to store error (if any)
59- * 62- *
60- * Returns: whether the RAID set @name was successfully activate or not 63- * Returns: whether the RAID set @name was successfully activate or not
64- *
65- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_CREATE_ACTIVATE
61- */ 66- */
62-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error); 67-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
63- 68-
@@ -67,6 +72,8 @@ index a885bba..ec86b80 100644
67- * @error: (out): variable to store error (if any) 72- * @error: (out): variable to store error (if any)
68- * 73- *
69- * Returns: whether the RAID set @name was successfully deactivate or not 74- * Returns: whether the RAID set @name was successfully deactivate or not
75- *
76- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_REMOVE_DEACTIVATE
70- */ 77- */
71-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error); 78-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
72- 79-
@@ -76,13 +83,15 @@ index a885bba..ec86b80 100644
76- * @error: (out): variable to store error (if any) 83- * @error: (out): variable to store error (if any)
77- * 84- *
78- * Returns: string representation of the @name RAID set's type 85- * Returns: string representation of the @name RAID set's type
86- *
87- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_QUERY
79- */ 88- */
80-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error); 89-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error);
81diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am 90diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
82index 6c4038f..59dc5e3 100644 91index b69c8f7..7575f4a 100644
83--- a/src/plugins/Makefile.am 92--- a/src/plugins/Makefile.am
84+++ b/src/plugins/Makefile.am 93+++ b/src/plugins/Makefile.am
85@@ -76,7 +76,7 @@ endif 94@@ -75,7 +75,7 @@ endif
86 95
87 if WITH_DM 96 if WITH_DM
88 libbd_dm_la_CFLAGS = $(GLIB_CFLAGS) $(DEVMAPPER_CFLAGS) $(UDEV_CFLAGS) -Wall -Wextra -Werror 97 libbd_dm_la_CFLAGS = $(GLIB_CFLAGS) $(DEVMAPPER_CFLAGS) $(UDEV_CFLAGS) -Wall -Wextra -Werror
@@ -92,10 +101,10 @@ index 6c4038f..59dc5e3 100644
92 # Dear author of libdmdraid, VERSION really is not a good name for an enum member! 101 # Dear author of libdmdraid, VERSION really is not a good name for an enum member!
93 libbd_dm_la_CPPFLAGS = -I${builddir}/../../include/ -UVERSION 102 libbd_dm_la_CPPFLAGS = -I${builddir}/../../include/ -UVERSION
94diff --git a/src/plugins/dm.c b/src/plugins/dm.c 103diff --git a/src/plugins/dm.c b/src/plugins/dm.c
95index 9cee742..fd7c7ba 100644 104index 0e5466c..31ebe96 100644
96--- a/src/plugins/dm.c 105--- a/src/plugins/dm.c
97+++ b/src/plugins/dm.c 106+++ b/src/plugins/dm.c
98@@ -21,16 +21,10 @@ 107@@ -21,17 +21,11 @@
99 #include <unistd.h> 108 #include <unistd.h>
100 #include <blockdev/utils.h> 109 #include <blockdev/utils.h>
101 #include <libdevmapper.h> 110 #include <libdevmapper.h>
@@ -103,6 +112,7 @@ index 9cee742..fd7c7ba 100644
103 #include <libudev.h> 112 #include <libudev.h>
104 113
105 #include "dm.h" 114 #include "dm.h"
115 #include "check_deps.h"
106 116
107-/* macros taken from the pyblock/dmraid.h file plus one more*/ 117-/* macros taken from the pyblock/dmraid.h file plus one more*/
108-#define for_each_raidset(_c, _n) list_for_each_entry(_n, LC_RS(_c), list) 118-#define for_each_raidset(_c, _n) list_for_each_entry(_n, LC_RS(_c), list)
@@ -112,10 +122,11 @@ index 9cee742..fd7c7ba 100644
112 /** 122 /**
113 * SECTION: dm 123 * SECTION: dm
114 * @short_description: plugin for basic operations with device mapper 124 * @short_description: plugin for basic operations with device mapper
115@@ -286,315 +280,3 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a 125@@ -380,327 +374,3 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
126
116 return ret; 127 return ret;
117 } 128 }
118 129-
119-/** 130-/**
120- * init_dmraid_stack: (skip) 131- * init_dmraid_stack: (skip)
121- * 132- *
@@ -191,6 +202,9 @@ index 9cee742..fd7c7ba 100644
191- /* if we don't have the name, we cannot check any match */ 202- /* if we don't have the name, we cannot check any match */
192- g_return_val_if_fail (dev_name, FALSE); 203- g_return_val_if_fail (dev_name, FALSE);
193- 204-
205- /* g_return_val_if_fail above checks value of dev_name and returns FALSE if
206- * it is NULL so we don't need to check it here */
207- /* coverity[var_deref_model] */
194- if (name && strcmp (dev_name, name) != 0) { 208- if (name && strcmp (dev_name, name) != 0) {
195- return FALSE; 209- return FALSE;
196- } 210- }
@@ -220,8 +234,8 @@ index 9cee742..fd7c7ba 100644
220- * find_raid_sets_for_dev: (skip) 234- * find_raid_sets_for_dev: (skip)
221- */ 235- */
222-static void find_raid_sets_for_dev (const gchar *name, const gchar *uuid, gint major, gint minor, struct lib_context *lc, struct raid_set *rs, GPtrArray *ret_sets) { 236-static void find_raid_sets_for_dev (const gchar *name, const gchar *uuid, gint major, gint minor, struct lib_context *lc, struct raid_set *rs, GPtrArray *ret_sets) {
223- struct raid_set *subset; 237- struct raid_set *subset = NULL;
224- struct raid_dev *dev; 238- struct raid_dev *dev = NULL;
225- 239-
226- if (T_GROUP(rs) || !list_empty(&(rs->sets))) { 240- if (T_GROUP(rs) || !list_empty(&(rs->sets))) {
227- for_each_subset (rs, subset) 241- for_each_subset (rs, subset)
@@ -246,6 +260,8 @@ index 9cee742..fd7c7ba 100644
246- * the member or %NULL in case of error 260- * the member or %NULL in case of error
247- * 261- *
248- * One of @name, @uuid or @major:@minor has to be given. 262- * One of @name, @uuid or @major:@minor has to be given.
263- *
264- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_MODE_QUERY
249- */ 265- */
250-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error) { 266-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error) {
251- guint64 i = 0; 267- guint64 i = 0;
@@ -312,8 +328,8 @@ index 9cee742..fd7c7ba 100644
312- 328-
313-static gboolean change_set_by_name (const gchar *name, enum activate_type action, GError **error) { 329-static gboolean change_set_by_name (const gchar *name, enum activate_type action, GError **error) {
314- gint rc = 0; 330- gint rc = 0;
315- struct lib_context *lc; 331- struct lib_context *lc = NULL;
316- struct raid_set *iter_rs; 332- struct raid_set *iter_rs = NULL;
317- struct raid_set *match_rs = NULL; 333- struct raid_set *match_rs = NULL;
318- 334-
319- lc = init_dmraid_stack (error); 335- lc = init_dmraid_stack (error);
@@ -352,6 +368,8 @@ index 9cee742..fd7c7ba 100644
352- * @error: (out): variable to store error (if any) 368- * @error: (out): variable to store error (if any)
353- * 369- *
354- * Returns: whether the RAID set @name was successfully activate or not 370- * Returns: whether the RAID set @name was successfully activate or not
371- *
372- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_CREATE_ACTIVATE
355- */ 373- */
356-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error) { 374-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error) {
357- guint64 progress_id = 0; 375- guint64 progress_id = 0;
@@ -372,6 +390,8 @@ index 9cee742..fd7c7ba 100644
372- * @error: (out): variable to store error (if any) 390- * @error: (out): variable to store error (if any)
373- * 391- *
374- * Returns: whether the RAID set @name was successfully deactivate or not 392- * Returns: whether the RAID set @name was successfully deactivate or not
393- *
394- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_REMOVE_DEACTIVATE
375- */ 395- */
376-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error) { 396-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error) {
377- guint64 progress_id = 0; 397- guint64 progress_id = 0;
@@ -392,10 +412,12 @@ index 9cee742..fd7c7ba 100644
392- * @error: (out): variable to store error (if any) 412- * @error: (out): variable to store error (if any)
393- * 413- *
394- * Returns: string representation of the @name RAID set's type 414- * Returns: string representation of the @name RAID set's type
415- *
416- * Tech category: %BD_DM_TECH_RAID-%BD_DM_TECH_QUERY
395- */ 417- */
396-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error) { 418-gchar* bd_dm_get_raid_set_type (const gchar *name, GError **error) {
397- struct lib_context *lc; 419- struct lib_context *lc = NULL;
398- struct raid_set *iter_rs; 420- struct raid_set *iter_rs = NULL;
399- struct raid_set *match_rs = NULL; 421- struct raid_set *match_rs = NULL;
400- const gchar *type = NULL; 422- const gchar *type = NULL;
401- 423-
@@ -429,7 +451,7 @@ index 9cee742..fd7c7ba 100644
429- return g_strdup (type); 451- return g_strdup (type);
430-} 452-}
431diff --git a/src/plugins/dm.h b/src/plugins/dm.h 453diff --git a/src/plugins/dm.h b/src/plugins/dm.h
432index 859fb80..80acd49 100644 454index 0dce6ac..1ee3788 100644
433--- a/src/plugins/dm.h 455--- a/src/plugins/dm.h
434+++ b/src/plugins/dm.h 456+++ b/src/plugins/dm.h
435@@ -1,5 +1,4 @@ 457@@ -1,5 +1,4 @@
@@ -438,10 +460,10 @@ index 859fb80..80acd49 100644
438 460
439 #ifndef BD_DM 461 #ifndef BD_DM
440 #define BD_DM 462 #define BD_DM
441@@ -35,9 +34,5 @@ gboolean bd_dm_remove (const gchar *map_name, GError **error); 463@@ -48,9 +47,5 @@ gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean a
442 gchar* bd_dm_name_from_node (const gchar *dm_node, GError **error); 464 gchar* bd_dm_name_from_node (const gchar *dm_node, GError **error);
443 gchar* bd_dm_node_from_name (const gchar *map_name, GError **error); 465 gchar* bd_dm_node_from_name (const gchar *map_name, GError **error);
444 gboolean bd_dm_map_exists (const gchar *map_name, gboolean live_only, gboolean active_only, GError **error); 466 gchar* bd_dm_get_subsystem_from_name (const gchar *device_name, GError **error);
445-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error); 467-gchar** bd_dm_get_member_raid_sets (const gchar *name, const gchar *uuid, gint major, gint minor, GError **error);
446-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error); 468-gboolean bd_dm_activate_raid_set (const gchar *name, GError **error);
447-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error); 469-gboolean bd_dm_deactivate_raid_set (const gchar *name, GError **error);
@@ -466,5 +488,5 @@ index fb3ffb4..eed0a38 100644
466 _loop_setup = BlockDev.loop_setup 488 _loop_setup = BlockDev.loop_setup
467 @override(BlockDev.loop_setup) 489 @override(BlockDev.loop_setup)
468-- 490--
4691.8.3.1 4912.14.3
470 492