|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v3 2/2] lib/vfscore: implement fops for std(out|err)
Hey,I have some minor comments inline. It is more about preference about deduplication. But in general I am fine with this patch. Thanks, Simon On 14.06.2018 16:53, Yuri Volchkov wrote: Wow, this is confusing ;-) diff --git a/lib/vfscore/Makefile.uk b/lib/vfscore/Makefile.uk index fa56c8e..695b357 100644 --- a/lib/vfscore/Makefile.uk +++ b/lib/vfscore/Makefile.uk @@ -4,3 +4,4 @@ CINCLUDES-y += -I$(LIBVFSCORE_BASE)/includeLIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/fd.cLIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/file.c +LIBVFSCORE_SRCS-y += $(LIBVFSCORE_BASE)/stdio.c \ No newline at end of file diff --git a/lib/vfscore/fd.c b/lib/vfscore/fd.c index 85761ea..10e570c 100644 --- a/lib/vfscore/fd.c +++ b/lib/vfscore/fd.c @@ -41,6 +41,8 @@#define FDTABLE_MAX_FILES (sizeof(uint64_t) * 8) +void init_stdio(void); You could use the same function for stdout_write and stderr_write (e.g., static kern_write()). Then you could avoid this duplication.
-struct vfscore_file *vfscore_get_file(int fd)
static struct vfscore_fops kern_fops?
- if (!(fdtable.bitmap & ((uint64_t) 1 << fd)))
Of course, he you are going to need 2 (stdout & stderr). - return fdtable.files[fd];-}-__constructor static void fdtable_init(void) _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |