binder

package
v0.0.0-...-23e6066 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package binder implements Android Binder IPC module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

Device implements fs.InodeOperations.

func NewDevice

func NewDevice(ctx context.Context, owner fs.FileOwner, fp fs.FilePermissions) *Device

NewDevice creates and intializes a Device structure.

func (bd *Device) AddLink()

AddLink implements fs.InodeOperations.AddLink.

Binder doesn't support links, no-op.

func (*Device) Check

func (bd *Device) Check(ctx context.Context, inode *fs.Inode, p fs.PermMask) bool

Check implements fs.InodeOperations.Check.

func (bd *Device) DropLink()

DropLink implements fs.InodeOperations.DropLink.

Binder doesn't support links, no-op.

func (*Device) GetFile

func (bd *Device) GetFile(ctx context.Context, d *fs.Dirent, flags fs.FileFlags) (*fs.File, error)

GetFile implements fs.InodeOperations.GetFile.

TODO: Add functionality to GetFile: Additional fields will be needed in the Device structure, initialize them here. Also, Device will need to keep track of the created Procs in order to implement BINDER_READ_WRITE ioctl.

func (*Device) IsVirtual

func (bd *Device) IsVirtual() bool

IsVirtual implements fs.InodeOperations.IsVirtual.

Binder is virtual.

func (*Device) NotifyStatusChange

func (bd *Device) NotifyStatusChange(ctx context.Context)

NotifyStatusChange implements fs.InodeOperations.NotifyStatusChange.

func (*Device) Release

func (bd *Device) Release(context.Context)

Release implements fs.InodeOperations.Release.

func (*Device) SetOwner

func (bd *Device) SetOwner(ctx context.Context, inode *fs.Inode, owner fs.FileOwner) error

SetOwner implements fs.InodeOperations.SetOwner.

func (*Device) SetPermissions

func (bd *Device) SetPermissions(ctx context.Context, inode *fs.Inode, fp fs.FilePermissions) bool

SetPermissions implements fs.InodeOperations.SetPermissions.

func (*Device) SetTimestamps

func (bd *Device) SetTimestamps(ctx context.Context, inode *fs.Inode, ts fs.TimeSpec) error

SetTimestamps implements fs.InodeOperations.SetTimestamps.

func (*Device) StatFS

func (bd *Device) StatFS(context.Context) (fs.Info, error)

StatFS implements fs.InodeOperations.StatFS.

Binder doesn't support querying for filesystem info.

func (*Device) Truncate

func (bd *Device) Truncate(ctx context.Context, inode *fs.Inode, size int64) error

Truncate implements fs.InodeOperations.WriteOut.

Ignored for a character device, such as Binder.

func (*Device) UnstableAttr

func (bd *Device) UnstableAttr(ctx context.Context, inode *fs.Inode) (fs.UnstableAttr, error)

UnstableAttr implements fs.InodeOperations.UnstableAttr.

type Proc

type Proc struct {
	fsutil.NoFsync
	fsutil.DeprecatedFileOperations
	fsutil.NotDirReaddir
	// contains filtered or unexported fields
}

Proc implements fs.FileOperations and fs.IoctlGetter.

func (*Proc) AddMapping

func (bp *Proc) AddMapping(ctx context.Context, ms memmap.MappingSpace, ar usermem.AddrRange, offset uint64) error

AddMapping implements memmap.Mappable.AddMapping.

func (*Proc) ConfigureMMap

func (bp *Proc) ConfigureMMap(ctx context.Context, file *fs.File, opts *memmap.MMapOpts) error

ConfigureMMap implements fs.FileOperations.ConfigureMMap.

func (*Proc) CopyMapping

func (bp *Proc) CopyMapping(ctx context.Context, ms memmap.MappingSpace, srcAR, dstAR usermem.AddrRange, offset uint64) error

CopyMapping implements memmap.Mappable.CopyMapping.

func (*Proc) Flush

func (bp *Proc) Flush(ctx context.Context, file *fs.File) error

Flush implements fs.FileOperations.Flush.

TODO: Implement.

func (*Proc) InvalidateUnsavable

func (bp *Proc) InvalidateUnsavable(ctx context.Context) error

InvalidateUnsavable implements memmap.Mappable.InvalidateUnsavable.

func (*Proc) Ioctl

func (bp *Proc) Ioctl(ctx context.Context, io usermem.IO, args arch.SyscallArguments) (uintptr, error)

Ioctl implements fs.FileOperations.Ioctl.

TODO: Implement.

func (*Proc) Read

func (bp *Proc) Read(ctx context.Context, file *fs.File, dst usermem.IOSequence, offset int64) (int64, error)

Read implements fs.FileOperations.Read.

Binder doesn't support read operation (unless in debug mode).

func (*Proc) Release

func (bp *Proc) Release()

Release implements fs.FileOperations.Release.

func (*Proc) RemoveMapping

func (bp *Proc) RemoveMapping(ctx context.Context, ms memmap.MappingSpace, ar usermem.AddrRange, offset uint64)

RemoveMapping implements memmap.Mappable.RemoveMapping.

func (*Proc) Seek

func (bp *Proc) Seek(ctx context.Context, file *fs.File, whence fs.SeekWhence, offset int64) (int64, error)

Seek implements fs.FileOperations.Seek.

Binder doesn't support seek operation (unless in debug mode).

func (*Proc) Translate

func (bp *Proc) Translate(ctx context.Context, required, optional memmap.MappableRange, at usermem.AccessType) ([]memmap.Translation, error)

Translate implements memmap.Mappable.Translate.

func (*Proc) Write

func (bp *Proc) Write(ctx context.Context, file *fs.File, src usermem.IOSequence, offset int64) (int64, error)

Write implements fs.FileOperations.Write.

Binder doesn't support write operation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL