From b75ea56f6c31895e8e0ec8ecc4b4730e017a9b4a Mon Sep 17 00:00:00 2001 From: condret Date: Mon, 2 Jun 2014 11:23:06 +0200 Subject: [PATCH] make r_io_desc_seek more reasonable in usage --- libr/include/r_io.h | 4 ++-- libr/io/desc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libr/include/r_io.h b/libr/include/r_io.h index 47bce4419c..14b34e4be1 100644 --- a/libr/include/r_io.h +++ b/libr/include/r_io.h @@ -185,7 +185,7 @@ typedef RIODesc* (*RIODescGetFD)(RIO *io, int fd); typedef RIODesc* (*RIODescOpen)(RIO *io, const char *file, int flags, int mode); typedef int (*RIODescClose)(RIO *io, RIODesc *); typedef ut8 * (*RIODescRead)(RIO *io, RIODesc *desc, ut64 *sz); -typedef ut64 (*RIODescSeek)(RIO *io, RIODesc *desc, ut64 offset, int whence); +typedef ut64 (*RIODescSeek)(RIO *io, RIODesc *desc, ut64 offset); typedef ut64 (*RIODescSize)(RIO *io, RIODesc *desc); typedef void (*RIOSectionAdd)(RIO *io, ut64 offset, ut64 vaddr, ut64 size, ut64 vsize, int rwx, const char *name, ut32 bin_id, int fd); @@ -399,7 +399,7 @@ R_API int r_io_desc_del(RIO *io, int fd); R_API RIODesc *r_io_desc_get(RIO *io, int fd); R_API ut64 r_io_desc_size(RIO *io, RIODesc *desc); R_API ut64 r_io_fd_size(RIO *io, int fd); -R_API ut64 r_io_desc_seek (RIO *io, RIODesc *desc, ut64 offset, int whence); +R_API ut64 r_io_desc_seek (RIO *io, RIODesc *desc, ut64 offset); //R_API int r_io_desc_generate(RIO *io); /* buffer.c */ diff --git a/libr/io/desc.c b/libr/io/desc.c index 3fa27c36bc..10b34a08ef 100644 --- a/libr/io/desc.c +++ b/libr/io/desc.c @@ -106,7 +106,7 @@ R_API RIODesc *r_io_desc_get(RIO *io, int fd) { return NULL; } -R_API ut64 r_io_desc_seek (RIO *io, RIODesc *desc, ut64 offset, int whence) { +R_API ut64 r_io_desc_seek (RIO *io, RIODesc *desc, ut64 offset) { RIOPlugin *plugin = desc ? desc->plugin : NULL; if (!plugin) return (ut64)lseek (desc->fd, offset, SEEK_SET); return plugin->lseek (io, desc, offset, SEEK_SET);