[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fsys_fat.c : disk_read_hook logging accesses to FAT area
From: |
lode leroy |
Subject: |
fsys_fat.c : disk_read_hook logging accesses to FAT area |
Date: |
Fri, 08 Aug 2003 11:30:42 +0200 |
I'll answer my own question...
no, not to be added, since I was not following the correct semantics:
instead of
disk_read_func = NULL;
disk_read_hook = blocklist_func;
fat_read(buffer, sizeof(buffer));
...
int devread(int sector, int byte_offset, int byte_len, char* buf) {
...
if (disk_read_hook) {
(*disk_read_hook) (sector_num, byte_offset, length);
}
...
}
one should use
disk_read_func = disk_read_hook = blocklist_func;
fat_read(buffer, sizeof(buffer));
...
int devread(int sector, int byte_offset, int byte_len, char* buf) {
...
if (disk_read_hook && disk_read_func) {
(*disk_read_hook) (sector_num, byte_offset, length);
}
...
}
_________________________________________________________________