X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Frtapelib.c;h=0afdec9716f05c4ff2cc6e8064a8430174407075;hb=6f1783ad432c0d2625d1232463987594414089fe;hp=c9cd90e6010471966ad2e139478e5a703ff18383;hpb=1521a94b11b0b7a2fe2a8318207d7d6b4bdbf76b;p=chaz%2Ftar diff --git a/src/rtapelib.c b/src/rtapelib.c index c9cd90e..0afdec9 100644 --- a/src/rtapelib.c +++ b/src/rtapelib.c @@ -586,6 +586,14 @@ rmt_lseek__ (int handle, off_t offset, int whence) if (offset < 0) *--p = '-'; + switch (whence) + { + case SEEK_SET: whence = 0; break; + case SEEK_CUR: whence = 1; break; + case SEEK_END: whence = 2; break; + default: abort (); + } + sprintf (command_buffer, "L%s\n%d\n", p, whence); if (do_command (handle, command_buffer) == -1)