|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH 4/5] lib/vfscore: mark stdio as a character device
Newlib implements printf via writing to stdout. I does a couple of
checks before writing into the file. Make sure these checks are
passed.
Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
lib/vfscore/stdio.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/vfscore/stdio.c b/lib/vfscore/stdio.c
index ee8a5b1d..b73b132c 100644
--- a/lib/vfscore/stdio.c
+++ b/lib/vfscore/stdio.c
@@ -85,10 +85,16 @@ static ssize_t stdio_read(struct vnode *vp __unused,
return bytes_total;
}
+static int
+stdio_getattr(struct vnode *vnode __unused, struct vattr *attr __unused)
+{
+ return 0;
+}
static struct vnops stdio_vnops = {
.vop_write = stdio_write,
.vop_read = stdio_read,
+ .vop_getattr = stdio_getattr,
};
static struct vnode stdio_vnode = {
@@ -96,6 +102,7 @@ static struct vnode stdio_vnode = {
.v_op = &stdio_vnops,
.v_lock = UK_MUTEX_INITIALIZER(stdio_vnode.v_lock),
.v_refcnt = 1,
+ .v_type = VCHR,
};
static struct dentry stdio_dentry = {
--
2.19.2
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |