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

[Minios-devel] [UNIKRAFT/CLICK PATCH 05/11] Initial public release: stubs.cc for unfinished glue implementations



Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
---
 Makefile.uk |  1 +
 stubs.cc    | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 stubs.cc

diff --git a/Makefile.uk b/Makefile.uk
index b27bb10..5030ffd 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -90,6 +90,7 @@ LIBCLICK_CXXFLAGS-y += $(LIBCLICK_SUPPRESS_FLAGS)
 # Unikraft <-> Click glue code
 
################################################################################
 LIBCLICK_SRCS-y += $(LIBCLICK_BASE)/click.cc
+LIBCLICK_SRCS-y += $(LIBCLICK_BASE)/stubs.cc
 
 
################################################################################
 # Click sources
diff --git a/stubs.cc b/stubs.cc
new file mode 100644
index 0000000..fcc72d8
--- /dev/null
+++ b/stubs.cc
@@ -0,0 +1,36 @@
+#include <errno.h>
+#include <click/config.h>
+#include <click/error.hh>
+#include <click/string.hh>
+
+/* Unikraft does not support files yet, this function is to
+   be able to read Click configs from files. */
+String file_string(String s __unused, ErrorHandler *errh)
+{
+       errh->error("no support for files yet!");
+       return String();
+}
+
+String clickpath_find_file(const String &filename __unused,
+               const char *subdir __unused, String default_path __unused,
+               ErrorHandler *errh)
+{
+       errh->error("no support for finding files!");
+       return String();
+}
+
+void click_signal(int signum __unused, void (*handler)(int) __unused,
+               bool resethand __unused)
+{
+}
+
+extern "C" {
+int dup(int oldfd); /* we don't have a header file, but the symbol is there */
+
+int pipe(int pipefd[2])
+{
+       pipefd[0] = dup(0);
+       pipefd[1] = dup(1);
+       return 0;
+}
+} /* extern "C" */
-- 
2.21.0


_______________________________________________
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®.