diff --git a/libcontainer/generic_error.go b/libcontainer/generic_error.go index 9c3d32492..de37715c9 100644 --- a/libcontainer/generic_error.go +++ b/libcontainer/generic_error.go @@ -67,9 +67,6 @@ func newSystemErrorWithCause(err error, cause string) Error { // stack frames skipped. This is only to be called by the other functions for // formatting the error. func createSystemError(err error, cause string) Error { - if le, ok := err.(Error); ok { - return le - } gerr := &genericError{ Timestamp: time.Now(), Err: err, diff --git a/libcontainer/process_linux.go b/libcontainer/process_linux.go index 33db39239..b43eaebbe 100644 --- a/libcontainer/process_linux.go +++ b/libcontainer/process_linux.go @@ -356,7 +356,7 @@ loop: } } if !sentRun { - return newSystemErrorWithCause(ierr, "container init failed") + return newSystemErrorWithCause(ierr, "container init") } if p.config.Config.Namespaces.Contains(configs.NEWNS) && !sentResume { return newSystemError(fmt.Errorf("could not synchronise after executing prestart hooks with container process"))