From fe8180d88540bfa96595dcc58290de5425e534e3 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 5 Oct 2018 23:41:51 +0200 Subject: drunken proggin --- fs/fd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/fd.c') diff --git a/fs/fd.c b/fs/fd.c index 1215679..2964883 100644 --- a/fs/fd.c +++ b/fs/fd.c @@ -10,31 +10,37 @@ bool fd_write(fd* f,uint8_t c) { + if(!f->write)kpanic("no write func") return f->write(f->data,c); } uint8_t fd_read(fd* f) { + if(!f->read)kpanic("no read func") return f->read(f->data); } bool fd_has(fd* f) { + if(!f->has)kpanic("no has func") return f->has(f->data); } bool fd_eof(fd* f) { + if(!f->eof)kpanic("no eof func") return f->eof(f->data); } bool fd_close(fd* f) { + if(!f->close)kpanic("no close func") return f->close(f->data); } fd fd_dupl(fd* f) { + if(!f->dupl)kpanic("no dupl func") return f->dupl(f); } -- cgit v1.2.3