aboutsummaryrefslogtreecommitdiffstats
path: root/vm/odroid
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-06-17 12:23:52 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-06-17 12:23:52 +0200
commit4cc7e0862826e6703642cfbf6440e3ef8fd8da0e (patch)
treeb3e303671a69de4036f3e5516f87483b154adc53 /vm/odroid
parent13c5bfcc6ec165fe0cf988a3e92bbd8d8619411b (diff)
all: use osutil.IsExist instead of os.Stat
Diffstat (limited to 'vm/odroid')
-rw-r--r--vm/odroid/odroid.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vm/odroid/odroid.go b/vm/odroid/odroid.go
index dcc4135b6..69c77b9c6 100644
--- a/vm/odroid/odroid.go
+++ b/vm/odroid/odroid.go
@@ -76,11 +76,11 @@ func ctor(env *vmimpl.Env) (vmimpl.Pool, error) {
if cfg.Hub_Port == 0 {
return nil, fmt.Errorf("config param hub_port is empty")
}
- if _, err := os.Stat(cfg.Sshkey); err != nil {
- return nil, fmt.Errorf("ssh key '%v' does not exist: %v", cfg.Sshkey, err)
+ if !osutil.IsExist(cfg.Sshkey) {
+ return nil, fmt.Errorf("ssh key '%v' does not exist", cfg.Sshkey)
}
- if _, err := os.Stat(cfg.Console); err != nil {
- return nil, fmt.Errorf("console file '%v' does not exist: %v", cfg.Console, err)
+ if !osutil.IxExist(cfg.Console) {
+ return nil, fmt.Errorf("console file '%v' does not exist", cfg.Console)
}
pool := &Pool{
cfg: cfg,