// MknodAt implements vfs.FilesystemImpl.MknodAt.
MknodAt implements vfs.FilesystemImpl.MknodAt.
// MknodAt implements vfs . FilesystemImpl . MknodAt .
func (fs *filesystem) MknodAt(ctx context.Context, rp *vfs.ResolvingPath, opts vfs.MknodOptions) error {
	return fs.doCreateAt(ctx, rp, false , func(parentDir *directory, name string) error {
		creds := rp.Credentials()
		var childInode *inode
		switch opts.Mode.FileType() {
		case linux.S_IFREG:
			childInode = fs.newRegularFile(creds.EffectiveKUID, creds.EffectiveKGID, opts.Mode, parentDir)
		case linux.S_IFIFO:
			childInode = fs.newNamedPipe(creds.EffectiveKUID, creds.EffectiveKGID, opts.Mode, parentDir)
		case linux.S_IFBLK:
			childInode = fs.newDeviceFile(creds.EffectiveKUID, creds.EffectiveKGID, opts.Mode, vfs.BlockDevice, opts.DevMajor, opts.DevMinor, parentDir)
		case linux.S_IFCHR:
			childInode = fs.newDeviceFile(creds.EffectiveKUID, creds.EffectiveKGID, opts.Mode, vfs.CharDevice, opts.DevMajor, opts.DevMinor, parentDir)
		case linux.S_IFSOCK:
			childInode = fs.newSocketFile(creds.EffectiveKUID, creds.EffectiveKGID, opts.Mode, opts.Endpoint, parentDir)
		default:
			return syserror.EINVAL
		}
		child := fs.newDentry(childInode)
		parentDir.insertChildLocked(child, name)
		return nil
	})
}
func ( fs * filesystem ) MknodAt ( ctx context . Context , rp * vfs . ResolvingPath , opts vfs . MknodOptions ) error { return fs . doCreateAt ( ctx , rp , false , func ( parentDir * directory , name string ) error { creds := rp . Credentials ( ) var childInode * inode switch opts . Mode . FileType ( ) { case linux . S_IFREG : childInode = fs . newRegularFile ( creds . EffectiveKUID , creds . EffectiveKGID , opts . Mode , parentDir ) case linux . S_IFIFO : childInode = fs . newNamedPipe ( creds . EffectiveKUID , creds . EffectiveKGID , opts . Mode , parentDir ) case linux . S_IFBLK : childInode = fs . newDeviceFile ( creds . EffectiveKUID , creds . EffectiveKGID , opts . Mode , vfs . BlockDevice , opts . DevMajor , opts . DevMinor , parentDir ) case linux . S_IFCHR : childInode = fs . newDeviceFile ( creds . EffectiveKUID , creds . EffectiveKGID , opts . Mode , vfs . CharDevice , opts . DevMajor , opts . DevMinor , parentDir ) case linux . S_IFSOCK : childInode = fs . newSocketFile ( creds . EffectiveKUID , creds . EffectiveKGID , opts . Mode , opts . Endpoint , parentDir ) default : return syserror . EINVAL } child := fs . newDentry ( childInode ) parentDir . insertChildLocked ( child , name ) return nil } ) }
MknodAt implements vfs.FilesystemImpl.MknodAt.
MknodAt implements vfs . FilesystemImpl . MknodAt .
/* dir */