mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-31 10:22:37 +00:00
* r_io
- Fix lseek * r_hash - Remove debug printf from t/hello.c
This commit is contained in:
parent
7abcfe6852
commit
1eec9fcc2c
@ -25,7 +25,6 @@ int main(int argc, char **argv)
|
||||
|
||||
/* get file size */
|
||||
size = r_io_size(io, fd);
|
||||
eprintf ("AAA: %lli\n", size);
|
||||
|
||||
/* read bytes */
|
||||
buf = (ut8*) malloc(size);
|
||||
|
@ -265,7 +265,7 @@ R_API ut64 r_io_seek(struct r_io_t *io, ut64 offset, int whence) {
|
||||
posix_whence = SEEK_CUR;
|
||||
break;
|
||||
case R_IO_SEEK_END:
|
||||
offset = UT64_MAX; // XXX: depending on io bits?
|
||||
//offset = UT64_MAX; // XXX: depending on io bits?
|
||||
posix_whence = SEEK_END;
|
||||
break;
|
||||
}
|
||||
@ -276,7 +276,7 @@ R_API ut64 r_io_seek(struct r_io_t *io, ut64 offset, int whence) {
|
||||
// XXX can be problematic on w32..so no 64 bit offset?
|
||||
else len = lseek (io->fd, offset, posix_whence);
|
||||
if (len != -1) {
|
||||
io->off = offset;
|
||||
io->off = len;
|
||||
// XXX this can be tricky.. better not to use this .. must be deprecated
|
||||
// r_io_sundo_push (io);
|
||||
ret = io->va ? r_io_section_offset_to_vaddr (io, io->off) : io->off;
|
||||
|
Loading…
x
Reference in New Issue
Block a user