diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-21 18:34:23 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-21 18:50:53 +0300 |
commit | 969dab4c1af666d381124fd481821bc936fc94ed (patch) | |
tree | b7bc4b2e75b8cc3f64e240162f3bedff23e9c58b /tell.c | |
parent | 0c0ae29bc7a71fc2cb6d0acf403b1e72715fbe48 (diff) | |
download | runcap-969dab4c1af666d381124fd481821bc936fc94ed.tar.gz runcap-969dab4c1af666d381124fd481821bc936fc94ed.tar.bz2 |
Fix tell/seek operations
* Makefile (clean): descend into t as well.
* t/Makefile (clean): New goal.
* runcap.h (runcap_seek): Return off_t.
* seek.c (runcap_seek): Change return value. Fix operation.
* tell.c (runcap_tell): Bugfix.
* t/rt.c: New option -r for testing seek.
* t/08seek.t: New testcase.
* t/09seek.t: New testcase.
Diffstat (limited to 'tell.c')
-rw-r--r-- | tell.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -33,6 +33,7 @@ runcap_tell(struct runcap *rc, int sd) off = lseek(cap->sc_storfd, 0, SEEK_CUR); if (off == -1) return -1; + off -= cap->sc_level; } else off = 0; |