|
|
b2d430 |
From 5ce7c218a7bd34672bd19359dcbeed51cc237474 Mon Sep 17 00:00:00 2001
|
|
|
b2d430 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
b2d430 |
Date: Fri, 1 Jul 2016 17:57:31 +0200
|
|
|
b2d430 |
Subject: [PATCH 25/27] DP: add dp_get_module_data()
|
|
|
b2d430 |
|
|
|
b2d430 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
b2d430 |
(cherry picked from commit 35fa5a83ce8badf6bc868937047f44c3f32b7c28)
|
|
|
b2d430 |
---
|
|
|
b2d430 |
src/providers/data_provider/dp.h | 2 ++
|
|
|
b2d430 |
src/providers/data_provider/dp_targets.c | 5 +++++
|
|
|
b2d430 |
2 files changed, 7 insertions(+)
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/providers/data_provider/dp.h b/src/providers/data_provider/dp.h
|
|
|
b2d430 |
index 8cdbd7768a0b3f7f234b6bce6abab02419b3b9d1..5b36baf3489be4cce463dfb42c65a0b7f7ece9ef 100644
|
|
|
b2d430 |
--- a/src/providers/data_provider/dp.h
|
|
|
b2d430 |
+++ b/src/providers/data_provider/dp.h
|
|
|
b2d430 |
@@ -118,6 +118,8 @@ bool _dp_target_enabled(struct data_provider *provider,
|
|
|
b2d430 |
struct dp_module *dp_target_module(struct data_provider *provider,
|
|
|
b2d430 |
enum dp_targets target);
|
|
|
b2d430 |
|
|
|
b2d430 |
+void *dp_get_module_data(struct dp_module *dp_module);
|
|
|
b2d430 |
+
|
|
|
b2d430 |
void _dp_set_method(struct dp_method *methods,
|
|
|
b2d430 |
enum dp_methods method,
|
|
|
b2d430 |
dp_req_send_fn send_fn,
|
|
|
b2d430 |
diff --git a/src/providers/data_provider/dp_targets.c b/src/providers/data_provider/dp_targets.c
|
|
|
b2d430 |
index e19cf93a3693dede98567d2105021488380b5408..87ecfe55daa805eec0265795ef76751a1568c474 100644
|
|
|
b2d430 |
--- a/src/providers/data_provider/dp_targets.c
|
|
|
b2d430 |
+++ b/src/providers/data_provider/dp_targets.c
|
|
|
b2d430 |
@@ -88,6 +88,11 @@ struct dp_module *dp_target_module(struct data_provider *provider,
|
|
|
b2d430 |
return provider->targets[target]->module;
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
+void *dp_get_module_data(struct dp_module *dp_module)
|
|
|
b2d430 |
+{
|
|
|
b2d430 |
+ return dp_module == NULL ? NULL : dp_module->module_data;
|
|
|
b2d430 |
+}
|
|
|
b2d430 |
+
|
|
|
b2d430 |
const char *dp_target_to_string(enum dp_targets target)
|
|
|
b2d430 |
{
|
|
|
b2d430 |
switch (target) {
|
|
|
b2d430 |
--
|
|
|
b2d430 |
2.4.11
|
|
|
b2d430 |
|