core: Convert all cmdline users to veyron2.Init.
This is part of the runtimeX migration.
This CL, depends on vcl/1921, vcl/1922, and vcl/1923.
Change-Id: I72f3adbdea048b2e1599262472e67aa94b86f748
diff --git a/tools/mounttable/impl.go b/tools/mounttable/impl.go
index d949dab..5046a09 100644
--- a/tools/mounttable/impl.go
+++ b/tools/mounttable/impl.go
@@ -27,7 +27,7 @@
}
func runGlob(cmd *cmdline.Command, args []string) error {
- ctx, cancel := context.WithTimeout(runtime.NewContext(), time.Minute)
+ ctx, cancel := context.WithTimeout(gctx, time.Minute)
defer cancel()
if len(args) == 1 {
@@ -102,7 +102,7 @@
}
}
}
- ctx, cancel := context.WithTimeout(runtime.NewContext(), time.Minute)
+ ctx, cancel := context.WithTimeout(gctx, time.Minute)
defer cancel()
client := veyron2.GetClient(ctx)
call, err := client.StartCall(ctx, args[0], "Mount", []interface{}{args[1], seconds, 0}, options.NoResolve{})
@@ -136,7 +136,7 @@
if expected, got := 2, len(args); expected != got {
return cmd.UsageErrorf("unmount: incorrect number of arguments, expected %d, got %d", expected, got)
}
- ctx, cancel := context.WithTimeout(runtime.NewContext(), time.Minute)
+ ctx, cancel := context.WithTimeout(gctx, time.Minute)
defer cancel()
client := veyron2.GetClient(ctx)
call, err := client.StartCall(ctx, args[0], "Unmount", []interface{}{args[1]}, options.NoResolve{})
@@ -169,7 +169,7 @@
if expected, got := 1, len(args); expected != got {
return cmd.UsageErrorf("mount: incorrect number of arguments, expected %d, got %d", expected, got)
}
- ctx, cancel := context.WithTimeout(runtime.NewContext(), time.Minute)
+ ctx, cancel := context.WithTimeout(gctx, time.Minute)
defer cancel()
client := veyron2.GetClient(ctx)
call, err := client.StartCall(ctx, args[0], "ResolveStep", []interface{}{}, options.NoResolve{})