Rollback to use the old io api.

This commit is contained in:
pancake 2014-05-31 12:14:49 +02:00
parent 1e6c0e74c4
commit ba57864617
2 changed files with 7 additions and 5 deletions

View File

@ -8,7 +8,7 @@ R_LIB_VERSION (r_io);
// XXX: this is buggy. must use seek+read
#define USE_CACHE 1
#define USE_P_API 1
#define USE_P_API 0
#define DO_THE_IO_DBG 0
#define IO_IFDBG if (DO_THE_IO_DBG == 1)

View File

@ -178,13 +178,15 @@ R_API RIOSection *r_io_section_mget(RIO *io, ut64 maddr) {
return NULL;
}
R_API ut64 r_io_section_get_offset(RIO *io, ut64 addr) {
RIOSection *s = r_io_section_mget(io, addr);
// XXX: rename this
R_API ut64 r_io_section_get_offset(RIO *io, ut64 maddr) {
RIOSection *s = r_io_section_mget(io, maddr);
return s? s->offset: -1;
}
R_API ut64 r_io_section_get_vaddr(RIO *io, ut64 offset) {
RIOSection *s = r_io_section_mget (io, offset);
// XXX: must be renamed, this is confusing
R_API ut64 r_io_section_get_vaddr(RIO *io, ut64 maddr) {
RIOSection *s = r_io_section_mget (io, maddr);
return s? s->vaddr: -1;
}