Skip to content

Commit

Permalink
Fix exec.Command arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tbird committed Nov 24, 2015
1 parent 25b2f57 commit 48abbce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ func (d *rbdDriver) lockImage(pool, name, lockID string) (string, error) {

// Lock the image
err := exec.Command(
d.cmd["rbd"], "lock add",
"--pool", pool,
d.cmd["rbd"], "lock",
"add", "--pool", pool,
name, lockID,
).Run()

Expand All @@ -442,7 +442,7 @@ func (d *rbdDriver) lockImage(pool, name, lockID string) (string, error) {

// List the locks
out, err := exec.Command(
d.cmd["rbd"], "lock list",
d.cmd["rbd"], "lock", "list",
"--pool", pool, name,
).Output()

Expand Down Expand Up @@ -472,7 +472,7 @@ func (d *rbdDriver) unlockImage(pool, name, lockID, locker string) error {

// Unlock the image
err := exec.Command(
d.cmd["rbd"], "lock remove",
d.cmd["rbd"], "lock", "remove",
name, lockID, locker,
).Run()

Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ func init() {
usage()
}

// Change the flags on the default logger:
log.SetFlags(log.LstdFlags | log.Lshortfile)

// Parse commandline flags:
flag.Usage = usage
flag.Parse()
Expand Down

0 comments on commit 48abbce

Please sign in to comment.