git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel/IOCache - Fixed IOCache eating all temp mappings
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
vfs
/
io.c
diff --git
a/KernelLand/Kernel/vfs/io.c
b/KernelLand/Kernel/vfs/io.c
index
4bd26fd
..
271e920
100644
(file)
--- a/
KernelLand/Kernel/vfs/io.c
+++ b/
KernelLand/Kernel/vfs/io.c
@@
-234,9
+234,17
@@
int VFS_IOCtl(int FD, int ID, void *Buffer)
tVFS_Handle *h;
h = VFS_GetHandle(FD);
tVFS_Handle *h;
h = VFS_GetHandle(FD);
- if(!h) return -1;
+ if(!h) {
+ LOG("FD%i is invalid", FD);
+ errno = EINVAL;
+ return -1;
+ }
- if(!h->Node->Type || !h->Node->Type->IOCtl) return -1;
+ if(!h->Node->Type || !h->Node->Type->IOCtl) {
+ LOG("FD%i does not have an IOCtl method");
+ errno = EINVAL;
+ return -1;
+ }
return h->Node->Type->IOCtl(h->Node, ID, Buffer);
}
return h->Node->Type->IOCtl(h->Node, ID, Buffer);
}
UCC
git Repository :: git.ucc.asn.au