Clean NewVM func
This commit is contained in:
parent
122d5b1089
commit
cd5b6dc48d
6 changed files with 360 additions and 184 deletions
|
|
@ -29,6 +29,8 @@ func TerminateProcess(pid int) error {
|
|||
// that there are no double-mounts.
|
||||
func CheckDeviceSeemsMounted(devPathPrefix string) (bool, error) {
|
||||
// Quite a bit hacky implementation, but it's to be used as a failsafe band-aid anyway.
|
||||
devPathPrefix = filepath.Clean(devPathPrefix)
|
||||
|
||||
absDevPathPrefix, err := filepath.Abs(devPathPrefix)
|
||||
if err != nil {
|
||||
return false, errors.Wrap(err, "get abs path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue