Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Because FreeBSD uses 64-bit device nodes (see https://reviews.freebsd.org/rS318736), Linux implementation of `system.Mknod` & `system.Mkdev` is not sufficient. This change adds freebsd-specific implementations for `Mknod` and Mkdev`. Signed-off-by: Artem Khramov <akhramov@pm.me> (cherry picked from commit f3d3994)
- Loading branch information
Showing
3 changed files
with
25 additions
and
6 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,14 @@ | ||
//go:build freebsd | ||
// +build freebsd | ||
|
||
package system // import "github.com/docker/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)) | ||
} |
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,11 @@ | ||
package system // import "github.com/docker/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, dev) | ||
} |