Skip to content

Commit

Permalink
[debug] report open, close, write, seek and others
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Feb 19, 2024
1 parent 6ee7721 commit ea865df
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/filer.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,7 @@ int genFixPath(const char *inp_path, char *gen_path)
//--------------------------------------------------------------
int genRmdir(char *path)
{
DPRINTF("RMDIR: '%s'\n", path);
int ret;

genLimObjName(path, 0);
Expand All @@ -963,7 +964,7 @@ int genRmdir(char *path)
//--------------------------------------------------------------
int genRemove(char *path)
{
DPRINTF("%s: '%s'\n", __FUNCTION__, path);
DPRINTF("REMOVE: '%s'\n", path);
int ret;

genLimObjName(path, 0);
Expand All @@ -977,7 +978,7 @@ int genRemove(char *path)
//--------------------------------------------------------------
int genOpen(char *path, int mode)
{
DPRINTF("%s: '%s' @ %d\n", __FUNCTION__, path, mode);
DPRINTF("OPEN: '%s' mode:%d\n", path, mode);
genLimObjName(path, 0);
return fileXioOpen(path, mode, fileMode);
}
Expand All @@ -986,7 +987,7 @@ int genOpen(char *path, int mode)
//--------------------------------------------------------------
int genDopen(char *path)
{
DPRINTF("%s: '%s'\n", __FUNCTION__, path);
DPRINTF("DOPEN: '%s'\n", path);
int fd;

if (!strncmp(path, "pfs", 3) || !strncmp(path, "vmc", 3)) {
Expand All @@ -1007,34 +1008,39 @@ int genDopen(char *path)
//--------------------------------------------------------------
int genLseek(int fd, int where, int how)
{
DPRINTF("SEEK: fd:%d, where:%d, how:%d\n", fd, where, how);
return fileXioLseek(fd, where, how);
}
//------------------------------
//endfunc genLseek
//--------------------------------------------------------------
int genRead(int fd, void *buf, int size)
{
DPRINTF("READ: fd:%d, buf_ptr:0x%p, size:%d\n", fd, buf, size);
return fileXioRead(fd, buf, size);
}
//------------------------------
//endfunc genRead
//--------------------------------------------------------------
int genWrite(int fd, void *buf, int size)
{
DPRINTF("WRITE: fd:%d, buf_ptr:0x%p, size:%d\n", fd, buf, size);
return fileXioWrite(fd, buf, size);
}
//------------------------------
//endfunc genWrite
//--------------------------------------------------------------
int genClose(int fd)
{
DPRINTF("CLOSE: fd:%d\n", fd);
return fileXioClose(fd);
}
//------------------------------
//endfunc genClose
//--------------------------------------------------------------
int genDclose(int fd)
{
DPRINTF("DCLOSE: fd:%d\n", fd);
return fileXioDclose(fd);
}
//------------------------------
Expand Down

0 comments on commit ea865df

Please sign in to comment.