Tizen_4.0 base
[platform/upstream/docker-engine.git] / vendor / github.com / Microsoft / hcsshim / expandsandboxsize.go
1 package hcsshim
2
3 import "github.com/Sirupsen/logrus"
4
5 // ExpandSandboxSize expands the size of a layer to at least size bytes.
6 func ExpandSandboxSize(info DriverInfo, layerId string, size uint64) error {
7         title := "hcsshim::ExpandSandboxSize "
8         logrus.Debugf(title+"layerId=%s size=%d", layerId, size)
9
10         // Convert info to API calling convention
11         infop, err := convertDriverInfo(info)
12         if err != nil {
13                 logrus.Error(err)
14                 return err
15         }
16
17         err = expandSandboxSize(&infop, layerId, size)
18         if err != nil {
19                 err = makeErrorf(err, title, "layerId=%s  size=%d", layerId, size)
20                 logrus.Error(err)
21                 return err
22         }
23
24         logrus.Debugf(title+"- succeeded layerId=%s size=%d", layerId, size)
25         return nil
26 }