-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26bda34
commit 93890ce
Showing
4 changed files
with
56 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package vgmanager | ||
|
||
import ( | ||
"path/filepath" | ||
"runtime" | ||
) | ||
|
||
func getKNameFromDevice(device string) string { | ||
// HACK: if we are on unix, we can simply use the "/tmp" path. | ||
// if we are on darwin, then the symlink of the temp file | ||
// will resolve to /private/var from /var, so we have to adjust | ||
// the block device name | ||
if runtime.GOOS == "darwin" { | ||
return filepath.Join("/", "private", device) | ||
} | ||
return device | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters