crc: Do not lseek if not necessary (bb devs do not allow lseek)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
1dc345ccf2
commit
21b96abb7c
|
@ -67,10 +67,12 @@ static int do_crc (cmd_tbl_t *cmdtp, int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (lseek(fd, start, SEEK_SET) == -1) {
|
||||
perror("lseek");
|
||||
err = 1;
|
||||
goto out;
|
||||
if (start > 0) {
|
||||
if (lseek(fd, start, SEEK_SET) == -1) {
|
||||
perror("lseek");
|
||||
err = 1;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
buf = xmalloc(4096);
|
||||
|
|
Loading…
Reference in New Issue