diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-06 20:19:31 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-06 20:19:31 +0200 |
commit | 745019d1ed6619f8123e1f11bf3761ff4fb93f4f (patch) | |
tree | cf95e3f0a13ae8c1f2f19cdf61e26601c77ae3f4 /lib | |
parent | c874751224237aaed7509960d14823d9c06e6eb5 (diff) |
fs: add stdio handles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fs.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -734,4 +734,8 @@ void ut_module_init(const struct ut_ops *ut, struct ut_state *s, struct json_obj ops->register_type("fs.proc", proc_proto, close_proc); ops->register_type("fs.file", file_proto, close_file); ops->register_type("fs.dir", dir_proto, close_dir); + + json_object_object_add(scope, "stdin", ops->set_type(xjs_new_object(), "fs.file", stdin)); + json_object_object_add(scope, "stdout", ops->set_type(xjs_new_object(), "fs.file", stdout)); + json_object_object_add(scope, "stderr", ops->set_type(xjs_new_object(), "fs.file", stderr)); } |