Fix osspecifics_darwin.go
This commit is contained in:
parent
649fae0309
commit
b5df721e44
1 changed files with 7 additions and 0 deletions
|
|
@ -16,6 +16,13 @@
|
||||||
|
|
||||||
// go:build darwin
|
// go:build darwin
|
||||||
|
|
||||||
|
package osspecifics
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"golang.org/x/sys/unix"
|
||||||
|
)
|
||||||
|
|
||||||
func getDeviceLogicalBlockSizeInner(fd uintptr) (int64, error) {
|
func getDeviceLogicalBlockSizeInner(fd uintptr) (int64, error) {
|
||||||
bs, err := unix.IoctlGetInt(int(fd.Fd()), 0x40046418) // Syscall code for DKIOGETBLOCKSIZE
|
bs, err := unix.IoctlGetInt(int(fd.Fd()), 0x40046418) // Syscall code for DKIOGETBLOCKSIZE
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue