Lines Matching refs:hdc
12 var hdc string
15 if hdc, _ = exec.LookPath("hdc"); hdc == "" {
16 hdc, _ = exec.LookPath("hdc_std")
18 if hdc == "" {
19 logrus.Panicf("can not find 'hdc', please install")
32 ExecContext(ctx, hdc, "kill")
34 ExecContext(ctx, hdc, "start")
36 out, err := ExecCombinedOutputContext(ctx, hdc, "list", "targets")
41 logrus.Errorf("failed to list hdc targets: %s, %s", string(out), err)
47 logrus.Warn("can not find any hdc targets")
63 return ExecContext(ctx, hdc, "shell", "reboot", "loader")
65 return ExecContext(ctx, hdc, "-t", device, "shell", "reboot", "loader")
71 logrus.Warn("can not find target hdc device, assume it has been in loader mode")
77 return ExecContext(ctx, hdc, "shell", cmd)
79 return ExecContext(ctx, hdc, "-t", device, "shell", cmd)