fs: Include filename in mknod errors
This commit is contained in:
parent
efec1a5e96
commit
e10e2bb50f
3 changed files with 32 additions and 6 deletions
|
@ -3,8 +3,16 @@
|
|||
|
||||
package fs
|
||||
|
||||
import "golang.org/x/sys/unix"
|
||||
import (
|
||||
"os"
|
||||
|
||||
func mknod(path string, mode uint32, dev uint64) (err error) {
|
||||
return unix.Mknod(path, mode, int(dev))
|
||||
"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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue