mirror of
https://github.com/containers/podman.git
synced 2025-05-17 06:59:07 +08:00

This fixes a bunch of "unused" linter warnings on freebsd. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
27 lines
505 B
Go
27 lines
505 B
Go
//go:build !remote
|
|
|
|
package libpod
|
|
|
|
import (
|
|
"syscall"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// No equivalent on FreeBSD?
|
|
func LabelVolumePath(path, mountLabel string) error {
|
|
return nil
|
|
}
|
|
|
|
// Unmount umounts a target directory
|
|
func Unmount(mount string) {
|
|
if err := unix.Unmount(mount, unix.MNT_FORCE); err != nil {
|
|
if err != syscall.EINVAL {
|
|
logrus.Warnf("Failed to unmount %s : %v", mount, err)
|
|
} else {
|
|
logrus.Debugf("failed to unmount %s : %v", mount, err)
|
|
}
|
|
}
|
|
}
|