diff options
author | Michael Pratt <mpratt@google.com> | 2019-05-17 13:46:18 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-17 13:47:40 -0700 |
commit | 4a842836e560322bb3944b59ff43b9d60cc0f867 (patch) | |
tree | d49985b67ce92bdac5a5a2fab8b18be35d3643b9 /runsc/fsgofer | |
parent | 04105781ad558662e1e48bad17197df244ff7841 (diff) |
Return EPERM for mknod
This more directly matches what Linux does with unsupported
nodes.
PiperOrigin-RevId: 248780425
Change-Id: I17f3dd0b244f6dc4eb00e2e42344851b8367fbec
Diffstat (limited to 'runsc/fsgofer')
-rw-r--r-- | runsc/fsgofer/fsgofer.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runsc/fsgofer/fsgofer.go b/runsc/fsgofer/fsgofer.go index b185015b6..2cf50290a 100644 --- a/runsc/fsgofer/fsgofer.go +++ b/runsc/fsgofer/fsgofer.go @@ -860,7 +860,10 @@ func (l *localFile) Link(target p9.File, newName string) error { // // Not implemented. func (*localFile) Mknod(_ string, _ p9.FileMode, _ uint32, _ uint32, _ p9.UID, _ p9.GID) (p9.QID, error) { - return p9.QID{}, syscall.ENOSYS + // From mknod(2) man page: + // "EPERM: [...] if the filesystem containing pathname does not support + // the type of node requested." + return p9.QID{}, syscall.EPERM } // UnlinkAt implements p9.File. |