From b471a8488504fe5b383c47f06fecb0d2b3326419 Mon Sep 17 00:00:00 2001 From: Samuel Karp Date: Sun, 26 Feb 2017 23:53:29 -0800 Subject: [PATCH] rootfs: Add context to Prepare Signed-off-by: Samuel Karp --- rootfs/apply.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rootfs/apply.go b/rootfs/apply.go index d64ee94..e713a2c 100644 --- a/rootfs/apply.go +++ b/rootfs/apply.go @@ -84,7 +84,7 @@ func ApplyLayer(snapshots snapshot.Snapshotter, mounter Mounter, rd io.Reader, p // // If successful, the chainID for the top-level layer is returned. That // identifier can be used to check out a snapshot. -func Prepare(snapshots snapshot.Snapshotter, mounter Mounter, layers []ocispec.Descriptor, +func Prepare(ctx context.Context, snapshots snapshot.Snapshotter, mounter Mounter, layers []ocispec.Descriptor, // TODO(stevvooe): The following functions are candidate for internal // object functions. We can use these to formulate the beginnings of a // rootfs Controller. @@ -97,7 +97,6 @@ func Prepare(snapshots snapshot.Snapshotter, mounter Mounter, layers []ocispec.D parent digest.Digest chain []digest.Digest ) - ctx := context.TODO() for _, layer := range layers { // TODO: layer.Digest should not be string