summaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go')
-rw-r--r--vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go
new file mode 100644
index 000000000..7832bb452
--- /dev/null
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/expandscratchsize.go
@@ -0,0 +1,22 @@
+package wclayer
+
+import (
+ "github.com/Microsoft/hcsshim/internal/hcserror"
+ "github.com/sirupsen/logrus"
+)
+
+// ExpandScratchSize expands the size of a layer to at least size bytes.
+func ExpandScratchSize(path string, size uint64) error {
+ title := "hcsshim::ExpandScratchSize "
+ logrus.Debugf(title+"path=%s size=%d", path, size)
+
+ err := expandSandboxSize(&stdDriverInfo, path, size)
+ if err != nil {
+ err = hcserror.Errorf(err, title, "path=%s size=%d", path, size)
+ logrus.Error(err)
+ return err
+ }
+
+ logrus.Debugf(title+"- succeeded path=%s size=%d", path, size)
+ return nil
+}