diff options
Diffstat (limited to 'commands/mem.c')
-rw-r--r-- | commands/mem.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/commands/mem.c b/commands/mem.c index 23c703f0b5..907f1f76a8 100644 --- a/commands/mem.c +++ b/commands/mem.c @@ -41,29 +41,6 @@ char *mem_rw_buf; -int open_and_lseek(const char *filename, int mode, loff_t pos) -{ - int fd, ret; - - fd = open(filename, mode | O_RDONLY); - if (fd < 0) { - perror("open"); - return fd; - } - - if (!pos) - return fd; - - ret = lseek(fd, pos, SEEK_SET); - if (ret == -1) { - perror("lseek"); - close(fd); - return -errno; - } - - return fd; -} - /* * Common function for parsing options for the 'md', 'mw', 'memcpy', 'memcmp' * commands. |