1package hcsshim
2
3import "github.com/sirupsen/logrus"
4
5// DeactivateLayer will dismount a layer that was mounted via ActivateLayer.
6func DeactivateLayer(info DriverInfo, id string) error {
7	title := "hcsshim::DeactivateLayer "
8	logrus.Debugf(title+"Flavour %d ID %s", info.Flavour, id)
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 = deactivateLayer(&infop, id)
18	if err != nil {
19		err = makeErrorf(err, title, "id=%s flavour=%d", id, info.Flavour)
20		logrus.Error(err)
21		return err
22	}
23
24	logrus.Debugf(title+"succeeded flavour=%d id=%s", info.Flavour, id)
25	return nil
26}
27