-
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See ory/kratos#1645
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 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,22 @@ | ||
// +build freebsd | ||
|
||
package system // import "github.com/ory/dockertest/v3/docker/pkg/system" | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
// Mknod creates a filesystem node (file, device special file or named pipe) named path | ||
// with attributes specified by mode and dev. | ||
func Mknod(path string, mode uint32, dev int) error { | ||
return unix.Mknod(path, mode, uint64(dev)) | ||
} | ||
|
||
// Mkdev is used to build the value of linux devices (in /dev/) which specifies major | ||
// and minor number of the newly created device special file. | ||
// Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes. | ||
// They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major, | ||
// then the top 12 bits of the minor. | ||
func Mkdev(major int64, minor int64) uint32 { | ||
return uint32(unix.Mkdev(uint32(major), uint32(minor))) | ||
} |
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