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

[Minios-devel] [UNIKRAFT/LWIP PATCH 1/2] sockets.c: Set stub for .vop_getattr operation


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Thu, 12 Sep 2019 12:00:00 +0300
  • Cc: felipe.huici@xxxxxxxxx, vlad_andrei.badoiu@xxxxxxxxxxxxxxx
  • Delivery-date: Thu, 12 Sep 2019 09:00:24 +0000
  • Ironport-phdr: 9a23:AgH0YRJdZD55j3B1ztmcpTZWNBhigK39O0sv0rFitYgfKf/xwZ3uMQTl6Ol3ixeRBMOHsqkC07ed6/CoGTRZp8rY6jZaKN0EfiRGoP1epxYnDs+BBB+zB9/RRAt+Iv5/UkR49WqwK0lfFZW2TVTTpnqv8WxaQU2nZkJ6KevvB4Hdkdm82fys9J3PeQVIgye2ba9vIBmsogjdq8cbjZF+JqsxxRfFvnhFcPlSyW90OF6fhRnx6tqu8JJ57yhcp/ct/NNcXKvneKg1UaZWByk8PWAv483ruxjDTQ+R6XYZT24bjBlGDRXb4R/jRpv+vTf0ueR72CmBIM35Vqs0Vii476dqUxDnliEKPCMk/W7Ni8xwiKVboA+9pxF63oXZbp2ZOOZ4c6jAe94RWGhPUdtLVyFZAo2ycZYBAeQCM+hfrYb9qUADoQeiCQS2GO/i0CNEimPw0KYn0+ohCwbG3Ak4Et8Qt3TUt8n1NKYUUeuoyqfI0C3Db+5L0jr69IfIdQshoe2NXbJ2a8bRzVQvFxvYjliLtYPlJCmZ1vwQs2eA9eZgT+WvhnchpgpsoTav3t8hhpTGi44I0FzJ9iV0zJwrKdGmSkN3e9CpHINNuyyVKod6WMAvTmFytCokxLALt4S3cDUFxZg5wRPUduaJfJKS4h35UeacOTJ4hHV4d72hnxuy6k2gyvHkVsmzzVZKsjJJktnSuXAJ0Bze8taHSv5n8Ueg3TaDzRzc6vpeLUAsiKrUMIQtwqQ3lpYLsETDGDH5mFnugaOLeUgo5/Kk5ufnb7n8uJOQKY15hhvwP6g2n8ywG+U4MgwAX2iB/uS80aXu8lH+QLVRkv02k6/ZvIreJcQGvq65HhRY3Zo46xqlFzemzc8XkWMdLFJCYB6HlZTmO0nSIPDkCveym1GskDZtx/DHOb3hGYzBIWXdn7f/Y7l971VRyA4yzdBE+5JUEasNIf3tVU/3rtDYCQU5MwOsyeb9FNp9zp8eWX6IAqKBPqPdr1uI5uM3I+aSfoMVuCv9K/k56P7vlnI5n0EScrWt3ZQNc3+0BOppI1iBa3r2ntgBCXsKvhY5TOHyll2CVSRcaGuqUK0m4DE0FZimApnCRoy3m7OOxjq0HppXZmBbEV2MCmvod5iZVPsWci2dPtRhniYZVbi5UIAtzwuutAipg4Zge+/V/Cwfrtfv2cZ448XXlAou7npkAsLb1HuCHE9umWZdbDgtwKF56Whg0krLhaN/mOBZE5pX+utUegwhc4bBxapgDIahCUr6Yt6VRQP+EZ2dCjYrQ4dpzg==
  • Ironport-sdr: yHLG/cQBrDOmmXuBzqFUXeXmbtw62Rbo2/AgZ6lOmMZ3V4r5DvrtTo/jXL33SuOAjEbgj8L1Bj c+UxDoIz30Yw==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

We currently just set a stub for .vop_getattr operation in order to avoid
crashes. And since we are here, this patch also disables the cast-function-type
warnings which annoyingly apear for each source file that sets some filesystem
callbacks.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 Makefile.uk | 1 +
 sockets.c   | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/Makefile.uk b/Makefile.uk
index 2292cb4..0e72336 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -85,6 +85,7 @@ LIBLWIP_SRCS-$(CONFIG_LWIP_THREADS) += 
$(LIBLWIP_BASE)/threads.c|unikraft
 LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/init.c|unikraft
 LIBLWIP_SRCS-y += $(LIBLWIP_BASE)/time.c|unikraft
 LIBLWIP_SRCS-$(CONFIG_LWIP_SOCKET) += $(LIBLWIP_BASE)/sockets.c|unikraft
+LIBLWIP_SOCKETS_FLAGS-y += -Wno-cast-function-type
 LIBLWIP_SRCS-$(CONFIG_LWIP_SOCKET) += $(LIBLWIP_BASE)/getnameinfo.c|unikraft
 LIBLWIP_SRCS-y += $(LIBLWIP_EXTRACTED)/core/init.c
 LIBLWIP_SRCS-y += $(LIBLWIP_EXTRACTED)/core/def.c
diff --git a/sockets.c b/sockets.c
index f4f7d40..cd84b97 100644
--- a/sockets.c
+++ b/sockets.c
@@ -62,6 +62,7 @@ static int sock_net_ioctl(struct vnode *s_vnode,
                        unsigned long request,
                        void *buf);
 
+#define sock_net_getattr   ((vnop_getattr_t) vfscore_vop_einval)
 #define sock_net_inactive  ((vnop_inactive_t) vfscore_vop_nullop)
 
 static struct vnops sock_net_vnops = {
@@ -69,6 +70,7 @@ static struct vnops sock_net_vnops = {
        .vop_write = sock_net_write,
        .vop_read  = sock_net_read,
        .vop_ioctl = sock_net_ioctl,
+       .vop_getattr = sock_net_getattr,
        .vop_inactive = sock_net_inactive
 };
 
-- 
2.20.1


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