diff options
Diffstat (limited to 'lib/sqfs/read_super.c')
-rw-r--r-- | lib/sqfs/read_super.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/sqfs/read_super.c b/lib/sqfs/read_super.c index 1a84ff9..fff3d50 100644 --- a/lib/sqfs/read_super.c +++ b/lib/sqfs/read_super.c @@ -15,10 +15,7 @@ int sqfs_super_read(sqfs_super_t *super, int fd) sqfs_super_t temp; int i; - if (lseek(fd, 0, SEEK_SET) == (off_t)-1) - goto fail_seek; - - if (read_data("reading super block", fd, &temp, sizeof(temp))) + if (read_data_at("reading super block", 0, fd, &temp, sizeof(temp))) return -1; temp.magic = le32toh(temp.magic); @@ -87,7 +84,4 @@ int sqfs_super_read(sqfs_super_t *super, int fd) memcpy(super, &temp, sizeof(temp)); return 0; -fail_seek: - perror("squashfs writing super block: seek on output file"); - return -1; } |