Add cimfs differ and snapshotter
Details about CimFs project are discussed in #8346 Signed-off-by: Amit Barve <ambarve@microsoft.com>
This commit is contained in:
6
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_create.go
generated
vendored
6
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_create.go
generated
vendored
@@ -64,7 +64,7 @@ func (opt *CreateOpts) args() ([]string, error) {
|
||||
|
||||
// Create creates a new container and returns its pid if it was created
|
||||
// successfully.
|
||||
func (r *Runhcs) Create(context context.Context, id, bundle string, opts *CreateOpts) error {
|
||||
func (r *Runhcs) Create(ctx context.Context, id, bundle string, opts *CreateOpts) error {
|
||||
args := []string{"create", "--bundle", bundle}
|
||||
if opts != nil {
|
||||
oargs, err := opts.args()
|
||||
@@ -73,14 +73,14 @@ func (r *Runhcs) Create(context context.Context, id, bundle string, opts *Create
|
||||
}
|
||||
args = append(args, oargs...)
|
||||
}
|
||||
cmd := r.command(context, append(args, id)...)
|
||||
cmd := r.command(ctx, append(args, id)...)
|
||||
if opts != nil && opts.IO != nil {
|
||||
opts.Set(cmd)
|
||||
}
|
||||
if cmd.Stdout == nil && cmd.Stderr == nil {
|
||||
data, err := cmdOutput(cmd, true)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: %s", err, data)
|
||||
return fmt.Errorf("%s: %s", err, data) //nolint:errorlint // legacy code
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user