2022-03-28 20:23:47 +00:00
|
|
|
//go:build !freebsd && !windows
|
2021-05-27 19:29:51 +00:00
|
|
|
// +build !freebsd,!windows
|
|
|
|
|
2024-08-26 21:03:25 +00:00
|
|
|
package fs
|
2021-05-27 19:29:51 +00:00
|
|
|
|
2024-10-03 19:17:22 +00:00
|
|
|
import (
|
|
|
|
"os"
|
2021-05-27 19:29:51 +00:00
|
|
|
|
2024-10-03 19:17:22 +00:00
|
|
|
"golang.org/x/sys/unix"
|
|
|
|
)
|
|
|
|
|
|
|
|
func mknod(path string, mode uint32, dev uint64) error {
|
|
|
|
err := unix.Mknod(path, mode, int(dev))
|
|
|
|
if err != nil {
|
|
|
|
err = &os.PathError{Op: "mknod", Path: path, Err: err}
|
|
|
|
}
|
|
|
|
return err
|
2021-05-27 19:29:51 +00:00
|
|
|
}
|