git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a661f6c
)
Fixed bug in VFS_ReadDir and added full debug
author
John Hodge
<
[email protected]
>
Fri, 25 Sep 2009 06:45:18 +0000
(14:45 +0800)
committer
John Hodge
<
[email protected]
>
Fri, 25 Sep 2009 06:45:18 +0000
(14:45 +0800)
Kernel/vfs/dir.c
patch
|
blob
|
history
diff --git
a/Kernel/vfs/dir.c
b/Kernel/vfs/dir.c
index
cb2bd8d
..
043d49c
100644
(file)
--- a/
Kernel/vfs/dir.c
+++ b/
Kernel/vfs/dir.c
@@
-143,14
+143,18
@@
int VFS_ReadDir(int FD, char *Dest)
ENTER("ph pDest", h, Dest);
- if(h) return -1;
-
- if(h->Node->ReadDir == NULL) return 0;
+ if(!h || h->Node->ReadDir == NULL) {
+ LEAVE('i', 0);
+ return 0;
+ }
tmp = h->Node->ReadDir(h->Node, h->Position);
LOG("tmp = '%s'", tmp);
- if(!tmp) return 0;
+ if(!tmp) {
+ LEAVE('i', 0);
+ return 0;
+ }
h->Position ++;
@@
-158,5
+162,6
@@
int VFS_ReadDir(int FD, char *Dest)
if(IsHeap(tmp)) free(tmp);
+ LEAVE('i', 1);
return 1;
}
UCC
git Repository :: git.ucc.asn.au