summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/crc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/commands/crc.c b/commands/crc.c
index 6983c9d090..b2dbfc78cc 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -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);