mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
events: use os.SEEK_END instead of its value
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -1,6 +1,8 @@
|
|||||||
package libpod
|
package libpod
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/containers/libpod/libpod/events"
|
"github.com/containers/libpod/libpod/events"
|
||||||
"github.com/hpcloud/tail"
|
"github.com/hpcloud/tail"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -85,7 +87,7 @@ func (r *Runtime) Events(fromStart, stream bool, options []events.EventFilter, e
|
|||||||
|
|
||||||
func (r *Runtime) getTail(fromStart, stream bool) (*tail.Tail, error) {
|
func (r *Runtime) getTail(fromStart, stream bool) (*tail.Tail, error) {
|
||||||
reopen := true
|
reopen := true
|
||||||
seek := tail.SeekInfo{Offset: 0, Whence: 2}
|
seek := tail.SeekInfo{Offset: 0, Whence: os.SEEK_END}
|
||||||
if fromStart || !stream {
|
if fromStart || !stream {
|
||||||
seek.Whence = 0
|
seek.Whence = 0
|
||||||
reopen = false
|
reopen = false
|
||||||
|
Reference in New Issue
Block a user