[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 2/8] lib/uklibparam: Add support for string datatype



This seems straightforward enough.

Reviewed-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>

On 3/15/19 6:06 PM, Sharan Santhanam wrote:
This patch implements a way to forward strings parameters to the
library

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
  lib/uklibparam/include/uk/libparam.h | 10 ++++++++++
  1 file changed, 10 insertions(+)

diff --git a/lib/uklibparam/include/uk/libparam.h 
b/lib/uklibparam/include/uk/libparam.h
index 0855d2d..6c3d78a 100644
--- a/lib/uklibparam/include/uk/libparam.h
+++ b/lib/uklibparam/include/uk/libparam.h
@@ -153,6 +153,8 @@ extern C {
  #define _LIB_PARAM___u32      PARAM_TYPE(sizeof(__u32), 0, 0)
  #define _LIB_PARAM___s64      PARAM_TYPE(sizeof(__s64), 1, 0)
  #define _LIB_PARAM___u64      PARAM_TYPE(sizeof(__u64), 0, 0)
+#define _LIB_PARAM___uptr      PARAM_TYPE(sizeof(__uptr), 0, 1)
+#define _LIB_PARAM_charp       _LIB_PARAM___uptr
struct uk_param {
        /* The name of the param */
@@ -393,6 +395,14 @@ void _uk_libparam_lib_add(struct uk_lib_section *lib_sec);
                                                    name));             \
        _LIB_UK_PARAM_SET(name, type, 1)                                \
+/**
+ * Declare a string library param.
+ * @param name
+ *     The name of the parameter.
+ */
+#define UK_LIB_PARAM_STR(name)                                         \
+       UK_LIB_PARAM(name, __uptr)
+
#ifdef __cplusplus
  }


--
Dr. Florian Schmidt
フローリアン・シュミット
Research Scientist,
Systems and Machine Learning Group
NEC Laboratories Europe
Kurfürsten-Anlage 36, D-69115 Heidelberg
Tel.     +49 (0)6221 4342-265
Fax:     +49 (0)6221 4342-155
e-mail:  florian.schmidt@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.