X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfcrypt.c;h=363e3c4825c8735dcae93c7e10cf338fbcb49056;hb=630fb7d8dc740715cdc52114d736d64bf14f0798;hp=df62420769d0b07b0db2a72a424cb72f6885d081;hpb=a7a8ae5408eed270854e69adf40ccaf3a401f830;p=tfcrypt.git diff --git a/tfcrypt.c b/tfcrypt.c index df62420..363e3c4 100644 --- a/tfcrypt.c +++ b/tfcrypt.c @@ -171,6 +171,10 @@ int main(int argc, char **argv) catch_all_errors = YES; break; } + if (!strcmp(optarg, "xseek")) { + ignore_seek_errors = YES; + break; + } if (!strcmp(optarg, "exit")) error_action = TFC_ERRACT_EXIT; else if (!strncmp(optarg, "cont", 4)) @@ -695,7 +699,7 @@ _ctrskip1: if (counter_opt == TFC_CTR_HEAD && ctr_mode != TFC_MODE_ECB) iseek += ctrsz; if (lseek(sfd, iseek, SEEK_SET) == -1) - xerror(YES, NO, NO, "%s: seek failed", srcfname); + xerror(ignore_seek_errors, NO, NO, "%s: seek failed", srcfname); } if (ctr_mode == TFC_MODE_PLAIN) goto _plain; @@ -938,7 +942,7 @@ _plain: if (oseek) { if (lseek(dfd, oseek, SEEK_SET) == -1) - xerror(YES, NO, NO, "%s: seek failed", dstfname); + xerror(ignore_seek_errors, NO, NO, "%s: seek failed", dstfname); } for (x = 1; x < NSIG; x++) signal(x, SIG_IGN);