summaryrefslogtreecommitdiff
path: root/libpod/logs/reversereader/reversereader.go
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2020-08-05 14:12:55 +0200
committerPaul Holzinger <paul.holzinger@web.de>2020-08-06 20:56:30 +0200
commit2c79f9929d2434c34205efc1603d51670ed0f763 (patch)
tree83f73167d94b36532519580cda7da6e4572f5489 /libpod/logs/reversereader/reversereader.go
parent47971909ae7a54c3a0b0fe4ebe33197c9e291657 (diff)
downloadpodman-2c79f9929d2434c34205efc1603d51670ed0f763.tar.gz
podman-2c79f9929d2434c34205efc1603d51670ed0f763.tar.bz2
podman-2c79f9929d2434c34205efc1603d51670ed0f763.zip
fix podman logs --tail when log is bigger than pagesize
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'libpod/logs/reversereader/reversereader.go')
-rw-r--r--libpod/logs/reversereader/reversereader.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/logs/reversereader/reversereader.go b/libpod/logs/reversereader/reversereader.go
index 72d9ad975..4fa1a3f88 100644
--- a/libpod/logs/reversereader/reversereader.go
+++ b/libpod/logs/reversereader/reversereader.go
@@ -60,7 +60,7 @@ func (r *ReverseReader) Read() (string, error) {
if int64(n) < r.readSize {
b = b[0:n]
}
- // Set to the next page boundary
- r.offset = -r.readSize
+ // Move the offset one pagesize up
+ r.offset -= r.readSize
return string(b), nil
}