1package wclayer
2
3import (
4	"fmt"
5
6	"github.com/Microsoft/hcsshim/internal/hcserror"
7	"github.com/sirupsen/logrus"
8)
9
10// GrantVmAccess adds access to a file for a given VM
11func GrantVmAccess(vmid string, filepath string) error {
12	title := fmt.Sprintf("hcsshim::GrantVmAccess id:%s path:%s ", vmid, filepath)
13	logrus.Debugf(title)
14
15	err := grantVmAccess(vmid, filepath)
16	if err != nil {
17		err = hcserror.Errorf(err, title, "path=%s", filepath)
18		logrus.Error(err)
19		return err
20	}
21
22	logrus.Debugf(title + " - succeeded")
23	return nil
24}
25