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
AcessNative - Fixing Fixing Fixing
[tpg/acess2.git]
/
Kernel
/
vfs
/
io.c
diff --git
a/Kernel/vfs/io.c
b/Kernel/vfs/io.c
index
67d384c
..
7260df7
100644
(file)
--- a/
Kernel/vfs/io.c
+++ b/
Kernel/vfs/io.c
@@
-2,22
+2,11
@@
* AcessMicro VFS
* - File IO Passthru's
*/
* AcessMicro VFS
* - File IO Passthru's
*/
+#define DEBUG 0
#include <acess.h>
#include "vfs.h"
#include "vfs_int.h"
#include <acess.h>
#include "vfs.h"
#include "vfs_int.h"
-#define DEBUG 0
-
-#if DEBUG
-#else
-# undef ENTER
-# undef LOG
-# undef LEAVE
-# define ENTER(...)
-# define LOG(...)
-# define LEAVE(...)
-#endif
-
// === CODE ===
/**
* \fn Uint64 VFS_Read(int FD, Uint64 Length, void *Buffer)
// === CODE ===
/**
* \fn Uint64 VFS_Read(int FD, Uint64 Length, void *Buffer)
@@
-31,23
+20,15
@@
Uint64 VFS_Read(int FD, Uint64 Length, void *Buffer)
ENTER("iFD XLength pBuffer", FD, Length, Buffer);
h = VFS_GetHandle(FD);
ENTER("iFD XLength pBuffer", FD, Length, Buffer);
h = VFS_GetHandle(FD);
- if(!h)
return -1
;
+ if(!h)
LEAVE_RET('i', -1)
;
- if( !(h->Mode & VFS_OPENFLAG_READ) || h->Node->Flags & VFS_FFLAG_DIRECTORY ) {
- LEAVE('i', -1);
- return -1;
- }
+ if( !(h->Mode & VFS_OPENFLAG_READ) || h->Node->Flags & VFS_FFLAG_DIRECTORY )
+ LEAVE_RET('i', -1);
- if(!h->Node->Read) {
- LEAVE('i', 0);
- return 0;
- }
+ if(!h->Node->Read) LEAVE_RET('i', 0);
ret = h->Node->Read(h->Node, h->Position, Length, Buffer);
ret = h->Node->Read(h->Node, h->Position, Length, Buffer);
- if(ret == -1) {
- LEAVE('i', -1);
- return -1;
- }
+ if(ret == -1) LEAVE_RET('i', -1);
h->Position += ret;
LEAVE('X', ret);
h->Position += ret;
LEAVE('X', ret);
UCC
git Repository :: git.ucc.asn.au