Skip to content

Commit c2617a9

Browse files
committed
common: abort load on ENOSPEC and output clear error
Signed-off-by: Mark Zvenigorodsky <[email protected]>
1 parent cacf855 commit c2617a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common/libimage/load.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"errors"
88
"fmt"
99
"time"
10+
"syscall"
1011

1112
"github.com/sirupsen/logrus"
1213
dirTransport "go.podman.io/image/v5/directory"
@@ -110,6 +111,11 @@ func (r *Runtime) Load(ctx context.Context, path string, options *LoadOptions) (
110111
return loadedImages, err
111112
}
112113
logrus.Debugf("Error loading %s (%s): %v", path, transportName, err)
114+
115+
if errors.Is(err, syscall.ENOSPC){
116+
return nil, fmt.Errorf("no space left on device")
117+
}
118+
113119
loadErrors = append(loadErrors, fmt.Errorf("%s: %v", transportName, err))
114120
}
115121

0 commit comments

Comments
 (0)