// CreateFifo implements fs.InodeOperations.CreateFifo.
CreateFifo implements fs.InodeOperations.CreateFifo.
// CreateFifo implements fs . InodeOperations . CreateFifo .
func (i *inodeOperations) CreateFifo(ctx context.Context, dir *fs.Inode, name string, perm fs.FilePermissions) error {
	if len(name) > maxFilenameLen {
		return syserror.ENAMETOOLONG
	}
	owner := fs.FileOwnerFromContext(ctx)
	mode := p9.FileMode(perm.LinuxMode()) | p9.ModeNamedPipe
	if _, err := i.fileState.file.mknod(ctx, name, mode, 0, 0, p9.UID(owner.UID), p9.GID(owner.GID)); err != nil {
		if i.session().overrides == nil || err != syserror.EPERM {
			return err
		}
		return i.createInternalFifo(ctx, dir, name, owner, perm)
	}
	i.touchModificationAndStatusChangeTime(ctx, dir)
	return nil
}
func ( i * inodeOperations ) CreateFifo ( ctx context . Context , dir * fs . Inode , name string , perm fs . FilePermissions ) error { if len ( name ) > maxFilenameLen { return syserror . ENAMETOOLONG } owner := fs . FileOwnerFromContext ( ctx ) mode := p9 . FileMode ( perm . LinuxMode ( ) ) | p9 . ModeNamedPipe if _ , err := i . fileState . file . mknod ( ctx , name , mode , 0 , 0 , p9 . UID ( owner . UID ) , p9 . GID ( owner . GID ) ) ; err != nil { if i . session ( ) . overrides == nil || err != syserror . EPERM { return err } return i . createInternalFifo ( ctx , dir , name , owner , perm ) } i . touchModificationAndStatusChangeTime ( ctx , dir ) return nil }
CreateFifo implements fs.InodeOperations.CreateFifo.
CreateFifo implements fs . InodeOperations . CreateFifo .
// N.B. FIFOs use major/minor numbers 0. // If gofer doesn't support mknod, check if we can create an internal fifo.