documented raw memory access structure
This commit is contained in:
parent
9b11542f1a
commit
84257e8276
|
|
@ -30,11 +30,11 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
"operation" : 1,
|
"opertype" : 1, [1-READ, 2-DELETE, 3-WRITE]
|
||||||
"mem_object": "testfile.txt",
|
"operphase" : 1, [0- DO NOTHING, 1-OPEN, 2-CLOSE, 3-OPEN and CLOSE]
|
||||||
"offset" : 2000,
|
"mem_object": "testfile.txt", [Resource name string]
|
||||||
"size : 4096,
|
"size : 4096, [Data block size in bytes]
|
||||||
"data" : "" ,
|
"dat" : "" , [Data block BASE64 encoded]
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -49,7 +49,6 @@ typedef struct
|
||||||
{
|
{
|
||||||
int opertype;
|
int opertype;
|
||||||
int operphase;
|
int operphase;
|
||||||
//int offset;
|
|
||||||
int size;
|
int size;
|
||||||
char mem_object[MEM_OBLECT_MAX_LENGTH];
|
char mem_object[MEM_OBLECT_MAX_LENGTH];
|
||||||
char filepath[FILE_PATH_MAX];
|
char filepath[FILE_PATH_MAX];
|
||||||
|
|
@ -141,6 +140,7 @@ void RawDataHandler(char *argres, int rw)
|
||||||
|
|
||||||
if (FileTransaction.operphase == 1 || FileTransaction.operphase == 3)
|
if (FileTransaction.operphase == 1 || FileTransaction.operphase == 3)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (FileTransaction.opertype == READ_ORERATION || FileTransaction.opertype == DELETE_ORERATION)
|
if (FileTransaction.opertype == READ_ORERATION || FileTransaction.opertype == DELETE_ORERATION)
|
||||||
{
|
{
|
||||||
if (stat(FileTransaction.filepath, &FileTransaction.file_stat) == -1)
|
if (stat(FileTransaction.filepath, &FileTransaction.file_stat) == -1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user