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

[Minios-devel] [UNIKRAFT PATCH] lib/vfscore: Make library un-selectable



This patch adds the option to unselect the vfscore library from builds.
In order to be inline with the Unikraft principle that "everything that
is not needed should be off", vfscore is unselected as default.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 lib/Config.uk               | 1 +
 lib/nolibc/include/unistd.h | 4 ++++
 lib/vfscore/Config.uk       | 5 +++++
 lib/vfscore/Makefile.uk     | 2 +-
 4 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 lib/vfscore/Config.uk

diff --git a/lib/Config.uk b/lib/Config.uk
index e438603..d0e614a 100644
--- a/lib/Config.uk
+++ b/lib/Config.uk
@@ -33,6 +33,7 @@ source "lib/ukallocbbuddy/Config.uk"
 source "lib/uksched/Config.uk"
 source "lib/ukschedcoop/Config.uk"
 source "lib/fdt/Config.uk"
+source "lib/vfscore/Config.uk"
 source "lib/uklock/Config.uk"
 source "lib/ukmpi/Config.uk"
 source "lib/ukswrand/Config.uk"
diff --git a/lib/nolibc/include/unistd.h b/lib/nolibc/include/unistd.h
index fde0327..09e7d7a 100644
--- a/lib/nolibc/include/unistd.h
+++ b/lib/nolibc/include/unistd.h
@@ -36,6 +36,8 @@
 #ifndef __UNISTD_H__
 #define __UNISTD_H__
 
+#include <uk/config.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -45,9 +47,11 @@ extern "C" {
 #define __NEED_ssize_t
 #include <nolibc-internal/shareddefs.h>
 
+#if CONFIG_LIBVFSCORE
 int close(int fd);
 ssize_t write(int fd, const void *buf, size_t count);
 ssize_t read(int fd, void *buf, size_t count);
+#endif
 
 #ifdef __cplusplus
 }
diff --git a/lib/vfscore/Config.uk b/lib/vfscore/Config.uk
new file mode 100644
index 0000000..49d6daa
--- /dev/null
+++ b/lib/vfscore/Config.uk
@@ -0,0 +1,5 @@
+config LIBVFSCORE
+       bool "vfscore: VFS Core Interface"
+       default n
+       select LIBNOLIBC if !HAVE_LIBC
+       select LIBUKDEBUG
diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk
index 9ed6b6f..1246ae5 100644
--- a/lib/vfscore/Makefile.uk
+++ b/lib/vfscore/Makefile.uk
@@ -1,4 +1,4 @@
-$(eval $(call addlib,libvfscore))
+$(eval $(call addlib_s,libvfscore,$(CONFIG_LIBVFSCORE)))
 
 CINCLUDES-y += -I$(LIBVFSCORE_BASE)/include
 
-- 
2.7.4


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