aboutsummaryrefslogtreecommitdiff
path: root/tell.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-07-21 18:34:23 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2017-07-21 18:50:53 +0300
commit969dab4c1af666d381124fd481821bc936fc94ed (patch)
treeb7bc4b2e75b8cc3f64e240162f3bedff23e9c58b /tell.c
parent0c0ae29bc7a71fc2cb6d0acf403b1e72715fbe48 (diff)
downloadruncap-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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tell.c b/tell.c
index d16110c..337e990 100644
--- a/tell.c
+++ b/tell.c
@@ -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;

Return to:

Send suggestions and report system problems to the System administrator.