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/vterm - Implimented 90-97/100-107 font modes for nyan cat :)
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
vfs
/
handle.c
diff --git
a/KernelLand/Kernel/vfs/handle.c
b/KernelLand/Kernel/vfs/handle.c
index
88877ab
..
cb4fae1
100644
(file)
--- a/
KernelLand/Kernel/vfs/handle.c
+++ b/
KernelLand/Kernel/vfs/handle.c
@@
-19,6
+19,7
@@
#if 0
tVFS_Handle *VFS_GetHandle(int FD);
#endif
#if 0
tVFS_Handle *VFS_GetHandle(int FD);
#endif
+inline void _ReferenceNode(tVFS_Node *Node);
int VFS_AllocHandle(int FD, tVFS_Node *Node, int Mode);
// === GLOBALS ===
int VFS_AllocHandle(int FD, tVFS_Node *Node, int Mode);
// === GLOBALS ===
@@
-195,7
+196,14
@@
void *VFS_SaveHandles(int NumFDs, int *FDs)
tVFS_Handle *h;
if( FDs == NULL )
h = &gaUserHandles[i];
tVFS_Handle *h;
if( FDs == NULL )
h = &gaUserHandles[i];
- else {
+ else if( FDs[i] == -1 )
+ {
+ Log_Warning("VFS", "VFS_SaveHandles - Slot %i error FD (-1), ignorning", i);
+ memset(&ret[i], 0, sizeof(tVFS_Handle));
+ continue ;
+ }
+ else
+ {
h = VFS_GetHandle(FDs[i] & (VFS_KERNEL_FLAG - 1));
if(!h) {
Log_Warning("VFS", "VFS_SaveHandles - Invalid FD %i",
h = VFS_GetHandle(FDs[i] & (VFS_KERNEL_FLAG - 1));
if(!h) {
Log_Warning("VFS", "VFS_SaveHandles - Invalid FD %i",
UCC
git Repository :: git.ucc.asn.au