diff --git a/vendor.conf b/vendor.conf index 2d6ba6a6..16fb0aa8 100644 --- a/vendor.conf +++ b/vendor.conf @@ -44,4 +44,4 @@ github.com/mistifyio/go-zfs 22c9b32c84eb0d0c6f4043b6e90fc94073de92fa github.com/pborman/uuid v1.0 github.com/opencontainers/selinux master golang.org/x/sys/unix master -github.com/tchap/go-patricia master +github.com/tchap/go-patricia v2.2.6 diff --git a/vendor/github.com/containers/image/storage/storage_image.go b/vendor/github.com/containers/image/storage/storage_image.go index 14d0289e..1d7bc164 100644 --- a/vendor/github.com/containers/image/storage/storage_image.go +++ b/vendor/github.com/containers/image/storage/storage_image.go @@ -13,9 +13,9 @@ import ( "github.com/containers/image/image" "github.com/containers/image/manifest" "github.com/containers/image/types" + "github.com/containers/storage" "github.com/containers/storage/pkg/archive" "github.com/containers/storage/pkg/ioutils" - "github.com/containers/storage/storage" ddigest "github.com/opencontainers/go-digest" ) @@ -307,7 +307,7 @@ func (s *storageImageDestination) ReapplyBlob(blobinfo types.BlobInfo) (types.Bl return types.BlobInfo{}, err } if layerList, ok := s.Layers[blobinfo.Digest]; !ok || len(layerList) < 1 { - b, err := s.imageRef.transport.store.GetImageBigData(s.ID, blobinfo.Digest.String()) + b, err := s.imageRef.transport.store.ImageBigData(s.ID, blobinfo.Digest.String()) if err != nil { return types.BlobInfo{}, err } @@ -335,7 +335,7 @@ func (s *storageImageDestination) Commit() error { logrus.Debugf("error creating image: %q", err) return errors.Wrapf(err, "error creating image %q", s.ID) } - img, err = s.imageRef.transport.store.GetImage(s.ID) + img, err = s.imageRef.transport.store.Image(s.ID) if err != nil { return errors.Wrapf(err, "error reading image %q", s.ID) } @@ -468,7 +468,7 @@ func (s *storageImageSource) getBlobAndLayerID(info types.BlobInfo) (rc io.ReadC return nil, -1, "", err } if layerList, ok := s.Layers[info.Digest]; !ok || len(layerList) < 1 { - b, err := s.imageRef.transport.store.GetImageBigData(s.ID, info.Digest.String()) + b, err := s.imageRef.transport.store.ImageBigData(s.ID, info.Digest.String()) if err != nil { return nil, -1, "", err } @@ -492,7 +492,7 @@ func (s *storageImageSource) getBlobAndLayerID(info types.BlobInfo) (rc io.ReadC } func diffLayer(store storage.Store, layerID string) (rc io.ReadCloser, n int64, err error) { - layer, err := store.GetLayer(layerID) + layer, err := store.Layer(layerID) if err != nil { return nil, -1, err } @@ -517,7 +517,7 @@ func diffLayer(store storage.Store, layerID string) (rc io.ReadCloser, n int64, } func (s *storageImageSource) GetManifest() (manifestBlob []byte, MIMEType string, err error) { - manifestBlob, err = s.imageRef.transport.store.GetImageBigData(s.ID, "manifest") + manifestBlob, err = s.imageRef.transport.store.ImageBigData(s.ID, "manifest") return manifestBlob, manifest.GuessMIMEType(manifestBlob), err } @@ -527,7 +527,7 @@ func (s *storageImageSource) GetTargetManifest(digest ddigest.Digest) (manifestB func (s *storageImageSource) GetSignatures() (signatures [][]byte, err error) { var offset int - signature, err := s.imageRef.transport.store.GetImageBigData(s.ID, "signatures") + signature, err := s.imageRef.transport.store.ImageBigData(s.ID, "signatures") if err != nil { return nil, err } @@ -549,7 +549,7 @@ func (s *storageImageSource) getSize() (int64, error) { return -1, errors.Wrapf(err, "error reading image %q", s.imageRef.id) } for _, name := range names { - bigSize, err := s.imageRef.transport.store.GetImageBigDataSize(s.imageRef.id, name) + bigSize, err := s.imageRef.transport.store.ImageBigDataSize(s.imageRef.id, name) if err != nil { return -1, errors.Wrapf(err, "error reading data blob size %q for %q", name, s.imageRef.id) } @@ -560,7 +560,7 @@ func (s *storageImageSource) getSize() (int64, error) { } for _, layerList := range s.Layers { for _, layerID := range layerList { - layer, err := s.imageRef.transport.store.GetLayer(layerID) + layer, err := s.imageRef.transport.store.Layer(layerID) if err != nil { return -1, err } diff --git a/vendor/github.com/containers/image/storage/storage_reference.go b/vendor/github.com/containers/image/storage/storage_reference.go index 44def278..66a64792 100644 --- a/vendor/github.com/containers/image/storage/storage_reference.go +++ b/vendor/github.com/containers/image/storage/storage_reference.go @@ -6,7 +6,7 @@ import ( "github.com/Sirupsen/logrus" "github.com/containers/image/docker/reference" "github.com/containers/image/types" - "github.com/containers/storage/storage" + "github.com/containers/storage" "github.com/pkg/errors" ) @@ -37,7 +37,7 @@ func newReference(transport storageTransport, reference, id string, name referen // one present with the same name or ID, and return the image. func (s *storageReference) resolveImage() (*storage.Image, error) { if s.id == "" { - image, err := s.transport.store.GetImage(s.reference) + image, err := s.transport.store.Image(s.reference) if image != nil && err == nil { s.id = image.ID } @@ -46,7 +46,7 @@ func (s *storageReference) resolveImage() (*storage.Image, error) { logrus.Errorf("reference %q does not resolve to an image ID", s.StringWithinTransport()) return nil, ErrNoSuchImage } - img, err := s.transport.store.GetImage(s.id) + img, err := s.transport.store.Image(s.id) if err != nil { return nil, errors.Wrapf(err, "error reading image %q", s.id) } @@ -83,7 +83,7 @@ func (s storageReference) DockerReference() reference.Named { // disambiguate between images which may be present in multiple stores and // share only their names. func (s storageReference) StringWithinTransport() string { - storeSpec := "[" + s.transport.store.GetGraphDriverName() + "@" + s.transport.store.GetGraphRoot() + "]" + storeSpec := "[" + s.transport.store.GraphDriverName() + "@" + s.transport.store.GraphRoot() + "]" if s.name == nil { return storeSpec + "@" + s.id } @@ -102,8 +102,8 @@ func (s storageReference) PolicyConfigurationIdentity() string { // graph root, in case we're using multiple drivers in the same directory for // some reason. func (s storageReference) PolicyConfigurationNamespaces() []string { - storeSpec := "[" + s.transport.store.GetGraphDriverName() + "@" + s.transport.store.GetGraphRoot() + "]" - driverlessStoreSpec := "[" + s.transport.store.GetGraphRoot() + "]" + storeSpec := "[" + s.transport.store.GraphDriverName() + "@" + s.transport.store.GraphRoot() + "]" + driverlessStoreSpec := "[" + s.transport.store.GraphRoot() + "]" namespaces := []string{} if s.name != nil { if s.id != "" { diff --git a/vendor/github.com/containers/image/storage/storage_transport.go b/vendor/github.com/containers/image/storage/storage_transport.go index 9669cce4..6539e7ea 100644 --- a/vendor/github.com/containers/image/storage/storage_transport.go +++ b/vendor/github.com/containers/image/storage/storage_transport.go @@ -10,7 +10,7 @@ import ( "github.com/containers/image/docker/reference" "github.com/containers/image/transports" "github.com/containers/image/types" - "github.com/containers/storage/storage" + "github.com/containers/storage" "github.com/opencontainers/go-digest" ddigest "github.com/opencontainers/go-digest" ) @@ -110,7 +110,7 @@ func (s storageTransport) ParseStoreReference(store storage.Store, ref string) ( // recognize. return nil, ErrInvalidReference } - storeSpec := "[" + store.GetGraphDriverName() + "@" + store.GetGraphRoot() + "]" + storeSpec := "[" + store.GraphDriverName() + "@" + store.GraphRoot() + "]" id := "" if sum.Validate() == nil { id = sum.Hex() @@ -205,14 +205,14 @@ func (s storageTransport) GetStoreImage(store storage.Store, ref types.ImageRefe if dref == nil { if sref, ok := ref.(*storageReference); ok { if sref.id != "" { - if img, err := store.GetImage(sref.id); err == nil { + if img, err := store.Image(sref.id); err == nil { return img, nil } } } return nil, ErrInvalidReference } - return store.GetImage(verboseName(dref)) + return store.Image(verboseName(dref)) } func (s *storageTransport) GetImage(ref types.ImageReference) (*storage.Image, error) { diff --git a/vendor/github.com/containers/storage/storage/containers.go b/vendor/github.com/containers/storage/containers.go similarity index 97% rename from vendor/github.com/containers/storage/storage/containers.go rename to vendor/github.com/containers/storage/containers.go index a3ab9c09..90a0bc0b 100644 --- a/vendor/github.com/containers/storage/storage/containers.go +++ b/vendor/github.com/containers/storage/containers.go @@ -264,7 +264,7 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat return container, err } -func (r *containerStore) GetMetadata(id string) (string, error) { +func (r *containerStore) Metadata(id string) (string, error) { if container, ok := r.lookup(id); ok { return container.Metadata, nil } @@ -347,7 +347,7 @@ func (r *containerStore) Exists(id string) bool { return ok } -func (r *containerStore) GetBigData(id, key string) ([]byte, error) { +func (r *containerStore) BigData(id, key string) ([]byte, error) { c, ok := r.lookup(id) if !ok { return nil, ErrContainerUnknown @@ -355,7 +355,7 @@ func (r *containerStore) GetBigData(id, key string) ([]byte, error) { return ioutil.ReadFile(r.datapath(c.ID, key)) } -func (r *containerStore) GetBigDataSize(id, key string) (int64, error) { +func (r *containerStore) BigDataSize(id, key string) (int64, error) { c, ok := r.lookup(id) if !ok { return -1, ErrContainerUnknown @@ -366,7 +366,7 @@ func (r *containerStore) GetBigDataSize(id, key string) (int64, error) { return -1, ErrSizeUnknown } -func (r *containerStore) GetBigDataNames(id string) ([]string, error) { +func (r *containerStore) BigDataNames(id string) ([]string, error) { c, ok := r.lookup(id) if !ok { return nil, ErrContainerUnknown diff --git a/vendor/github.com/containers/storage/drivers/aufs/aufs.go b/vendor/github.com/containers/storage/drivers/aufs/aufs.go index 71ed559a..8caa91fe 100644 --- a/vendor/github.com/containers/storage/drivers/aufs/aufs.go +++ b/vendor/github.com/containers/storage/drivers/aufs/aufs.go @@ -185,8 +185,8 @@ func (a *Driver) Status() [][2]string { } } -// GetMetadata not implemented -func (a *Driver) GetMetadata(id string) (map[string]string, error) { +// Metadata not implemented +func (a *Driver) Metadata(id string) (map[string]string, error) { return nil, nil } diff --git a/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go b/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go index 97e41768..5bcee11f 100644 --- a/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go +++ b/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go @@ -143,8 +143,8 @@ func (d *Driver) Status() [][2]string { return status } -// GetMetadata returns empty metadata for this driver. -func (d *Driver) GetMetadata(id string) (map[string]string, error) { +// Metadata returns empty metadata for this driver. +func (d *Driver) Metadata(id string) (map[string]string, error) { return nil, nil } diff --git a/vendor/github.com/containers/storage/drivers/devmapper/driver.go b/vendor/github.com/containers/storage/drivers/devmapper/driver.go index 1fc3a7b3..a1174240 100644 --- a/vendor/github.com/containers/storage/drivers/devmapper/driver.go +++ b/vendor/github.com/containers/storage/drivers/devmapper/driver.go @@ -94,8 +94,8 @@ func (d *Driver) Status() [][2]string { return status } -// GetMetadata returns a map of information about the device. -func (d *Driver) GetMetadata(id string) (map[string]string, error) { +// Metadata returns a map of information about the device. +func (d *Driver) Metadata(id string) (map[string]string, error) { m, err := d.DeviceSet.exportDeviceMetadata(id) if err != nil { diff --git a/vendor/github.com/containers/storage/drivers/driver.go b/vendor/github.com/containers/storage/drivers/driver.go index e267f618..cdf91d02 100644 --- a/vendor/github.com/containers/storage/drivers/driver.go +++ b/vendor/github.com/containers/storage/drivers/driver.go @@ -69,7 +69,7 @@ type ProtoDriver interface { Status() [][2]string // Returns a set of key-value pairs which give low level information // about the image/container driver is managing. - GetMetadata(id string) (map[string]string, error) + Metadata(id string) (map[string]string, error) // Cleanup performs necessary tasks to release resources // held by the driver, e.g., unmounting all layered filesystems // known to this driver. diff --git a/vendor/github.com/containers/storage/drivers/overlay/overlay.go b/vendor/github.com/containers/storage/drivers/overlay/overlay.go index 7b9cff56..6c1642cb 100644 --- a/vendor/github.com/containers/storage/drivers/overlay/overlay.go +++ b/vendor/github.com/containers/storage/drivers/overlay/overlay.go @@ -226,9 +226,9 @@ func (d *Driver) Status() [][2]string { } } -// GetMetadata returns meta data about the overlay driver such as +// Metadata returns meta data about the overlay driver such as // LowerDir, UpperDir, WorkDir and MergeDir used to store data. -func (d *Driver) GetMetadata(id string) (map[string]string, error) { +func (d *Driver) Metadata(id string) (map[string]string, error) { dir := d.dir(id) if _, err := os.Stat(dir); err != nil { return nil, err diff --git a/vendor/github.com/containers/storage/drivers/proxy.go b/vendor/github.com/containers/storage/drivers/proxy.go index 1bab2ef3..0e4a5b8e 100644 --- a/vendor/github.com/containers/storage/drivers/proxy.go +++ b/vendor/github.com/containers/storage/drivers/proxy.go @@ -144,12 +144,12 @@ func (d *graphDriverProxy) Status() [][2]string { return ret.Status } -func (d *graphDriverProxy) GetMetadata(id string) (map[string]string, error) { +func (d *graphDriverProxy) Metadata(id string) (map[string]string, error) { args := &graphDriverRequest{ ID: id, } var ret graphDriverResponse - if err := d.client.Call("GraphDriver.GetMetadata", args, &ret); err != nil { + if err := d.client.Call("GraphDriver.Metadata", args, &ret); err != nil { return nil, err } if ret.Err != "" { diff --git a/vendor/github.com/containers/storage/drivers/vfs/driver.go b/vendor/github.com/containers/storage/drivers/vfs/driver.go index 42d95ba0..5dd934fd 100644 --- a/vendor/github.com/containers/storage/drivers/vfs/driver.go +++ b/vendor/github.com/containers/storage/drivers/vfs/driver.go @@ -58,8 +58,8 @@ func (d *Driver) Status() [][2]string { return nil } -// GetMetadata is used for implementing the graphdriver.ProtoDriver interface. VFS does not currently have any meta data. -func (d *Driver) GetMetadata(id string) (map[string]string, error) { +// Metadata is used for implementing the graphdriver.ProtoDriver interface. VFS does not currently have any meta data. +func (d *Driver) Metadata(id string) (map[string]string, error) { return nil, nil } diff --git a/vendor/github.com/containers/storage/drivers/windows/windows.go b/vendor/github.com/containers/storage/drivers/windows/windows.go index 764fd7df..d87fb197 100644 --- a/vendor/github.com/containers/storage/drivers/windows/windows.go +++ b/vendor/github.com/containers/storage/drivers/windows/windows.go @@ -133,7 +133,7 @@ func (d *Driver) create(id, parent, mountLabel string, readOnly bool, storageOpt var layerChain []string if rPId != "" { - parentPath, err := hcsshim.GetLayerMountPath(d.info, rPId) + parentPath, err := hcsshim.LayerMountPath(d.info, rPId) if err != nil { return err } @@ -248,7 +248,7 @@ func (d *Driver) Get(id, mountLabel string) (string, error) { return "", err } - mountPath, err := hcsshim.GetLayerMountPath(d.info, rID) + mountPath, err := hcsshim.LayerMountPath(d.info, rID) if err != nil { d.ctr.Decrement(rID) if err2 := hcsshim.DeactivateLayer(d.info, rID); err2 != nil { @@ -403,7 +403,7 @@ func (d *Driver) ApplyDiff(id, parent string, diff archive.Reader) (int64, error if err != nil { return 0, err } - parentPath, err := hcsshim.GetLayerMountPath(d.info, rPId) + parentPath, err := hcsshim.LayerMountPath(d.info, rPId) if err != nil { return 0, err } @@ -446,8 +446,8 @@ func (d *Driver) DiffSize(id, parent string) (size int64, err error) { return archive.ChangesSize(layerFs, changes), nil } -// GetMetadata returns custom driver information. -func (d *Driver) GetMetadata(id string) (map[string]string, error) { +// Metadata returns custom driver information. +func (d *Driver) Metadata(id string) (map[string]string, error) { m := make(map[string]string) m["dir"] = d.dir(id) return m, nil diff --git a/vendor/github.com/containers/storage/drivers/zfs/zfs.go b/vendor/github.com/containers/storage/drivers/zfs/zfs.go index 3a36131c..8fd17e6c 100644 --- a/vendor/github.com/containers/storage/drivers/zfs/zfs.go +++ b/vendor/github.com/containers/storage/drivers/zfs/zfs.go @@ -210,8 +210,8 @@ func (d *Driver) Status() [][2]string { } } -// GetMetadata returns image/container metadata related to graph driver -func (d *Driver) GetMetadata(id string) (map[string]string, error) { +// Metadata returns image/container metadata related to graph driver +func (d *Driver) Metadata(id string) (map[string]string, error) { return nil, nil } diff --git a/vendor/github.com/containers/storage/storage/images.go b/vendor/github.com/containers/storage/images.go similarity index 97% rename from vendor/github.com/containers/storage/storage/images.go rename to vendor/github.com/containers/storage/images.go index 8476445b..6d9a7b58 100644 --- a/vendor/github.com/containers/storage/storage/images.go +++ b/vendor/github.com/containers/storage/images.go @@ -249,7 +249,7 @@ func (r *imageStore) Create(id string, names []string, layer, metadata string) ( return image, err } -func (r *imageStore) GetMetadata(id string) (string, error) { +func (r *imageStore) Metadata(id string) (string, error) { if image, ok := r.lookup(id); ok { return image.Metadata, nil } @@ -331,7 +331,7 @@ func (r *imageStore) Exists(id string) bool { return ok } -func (r *imageStore) GetBigData(id, key string) ([]byte, error) { +func (r *imageStore) BigData(id, key string) ([]byte, error) { image, ok := r.lookup(id) if !ok { return nil, ErrImageUnknown @@ -339,7 +339,7 @@ func (r *imageStore) GetBigData(id, key string) ([]byte, error) { return ioutil.ReadFile(r.datapath(image.ID, key)) } -func (r *imageStore) GetBigDataSize(id, key string) (int64, error) { +func (r *imageStore) BigDataSize(id, key string) (int64, error) { image, ok := r.lookup(id) if !ok { return -1, ErrImageUnknown @@ -350,7 +350,7 @@ func (r *imageStore) GetBigDataSize(id, key string) (int64, error) { return -1, ErrSizeUnknown } -func (r *imageStore) GetBigDataNames(id string) ([]string, error) { +func (r *imageStore) BigDataNames(id string) ([]string, error) { image, ok := r.lookup(id) if !ok { return nil, ErrImageUnknown diff --git a/vendor/github.com/containers/storage/storage/layers.go b/vendor/github.com/containers/storage/layers.go similarity index 95% rename from vendor/github.com/containers/storage/storage/layers.go rename to vendor/github.com/containers/storage/layers.go index 0a50d7ad..9a5aac6f 100644 --- a/vendor/github.com/containers/storage/storage/layers.go +++ b/vendor/github.com/containers/storage/layers.go @@ -163,7 +163,6 @@ type layerStore struct { idindex *truncindex.TruncIndex byid map[string]*Layer byname map[string]*Layer - byparent map[string][]*Layer bymount map[string]*Layer } @@ -231,7 +230,6 @@ func (r *layerStore) Load() error { r.idindex = truncindex.NewTruncIndex(idlist) r.byid = ids r.byname = names - r.byparent = parents r.bymount = mounts err = nil // Last step: try to remove anything that a previous user of this @@ -309,7 +307,6 @@ func newLayerStore(rundir string, layerdir string, driver drivers.Driver) (Layer byid: make(map[string]*Layer), bymount: make(map[string]*Layer), byname: make(map[string]*Layer), - byparent: make(map[string][]*Layer), } if err := rlstore.Load(); err != nil { return nil, err @@ -400,12 +397,6 @@ func (r *layerStore) Put(id, parent string, names []string, mountLabel string, o for _, name := range names { r.byname[name] = layer } - if pslice, ok := r.byparent[parent]; ok { - pslice = append(pslice, layer) - r.byparent[parent] = pslice - } else { - r.byparent[parent] = []*Layer{layer} - } for flag, value := range flags { layer.Flags[flag] = value } @@ -520,7 +511,7 @@ func (r *layerStore) SetNames(id string, names []string) error { return ErrLayerUnknown } -func (r *layerStore) GetMetadata(id string) (string, error) { +func (r *layerStore) Metadata(id string) (string, error) { if layer, ok := r.lookup(id); ok { return layer.Metadata, nil } @@ -553,23 +544,8 @@ func (r *layerStore) Delete(id string) error { err := r.driver.Remove(id) if err == nil { os.Remove(r.tspath(id)) - pslice := r.byparent[layer.Parent] - newPslice := []*Layer{} - for _, candidate := range pslice { - if candidate.ID != id { - newPslice = append(newPslice, candidate) - } - } delete(r.byid, id) r.idindex.Delete(id) - if len(newPslice) > 0 { - r.byparent[layer.Parent] = newPslice - } else { - delete(r.byparent, layer.Parent) - } - for _, name := range layer.Names { - delete(r.byname, name) - } if layer.MountPoint != "" { delete(r.bymount, layer.MountPoint) } @@ -619,11 +595,12 @@ func (r *layerStore) Wipe() error { return nil } -func (r *layerStore) findParentAndLayer(from, to string) (fromID string, toID string, fromLayer *Layer, toLayer *Layer, err error) { +func (r *layerStore) findParentAndLayer(from, to string) (fromID string, toID string, toLayer *Layer, err error) { var ok bool + var fromLayer *Layer toLayer, ok = r.lookup(to) if !ok { - return "", "", nil, nil, ErrLayerUnknown + return "", "", nil, ErrLayerUnknown } to = toLayer.ID if from == "" { @@ -631,19 +608,20 @@ func (r *layerStore) findParentAndLayer(from, to string) (fromID string, toID st } if from != "" { fromLayer, ok = r.lookup(from) - if !ok { + if ok { + from = fromLayer.ID + } else { fromLayer, ok = r.lookup(toLayer.Parent) - if !ok { - return "", "", nil, nil, ErrParentUnknown + if ok { + from = fromLayer.ID } } - from = fromLayer.ID } - return from, to, fromLayer, toLayer, nil + return from, to, toLayer, nil } func (r *layerStore) Changes(from, to string) ([]archive.Change, error) { - from, to, _, _, err := r.findParentAndLayer(from, to) + from, to, _, err := r.findParentAndLayer(from, to) if err != nil { return nil, ErrLayerUnknown } @@ -682,7 +660,7 @@ func (r *layerStore) newFileGetter(id string) (drivers.FileGetCloser, error) { func (r *layerStore) Diff(from, to string) (io.ReadCloser, error) { var metadata storage.Unpacker - from, to, _, toLayer, err := r.findParentAndLayer(from, to) + from, to, toLayer, err := r.findParentAndLayer(from, to) if err != nil { return nil, ErrLayerUnknown } @@ -772,7 +750,7 @@ func (r *layerStore) Diff(from, to string) (io.ReadCloser, error) { } func (r *layerStore) DiffSize(from, to string) (size int64, err error) { - from, to, _, _, err = r.findParentAndLayer(from, to) + from, to, _, err = r.findParentAndLayer(from, to) if err != nil { return -1, ErrLayerUnknown } diff --git a/vendor/github.com/containers/storage/storage/lockfile.go b/vendor/github.com/containers/storage/lockfile.go similarity index 100% rename from vendor/github.com/containers/storage/storage/lockfile.go rename to vendor/github.com/containers/storage/lockfile.go diff --git a/vendor/github.com/containers/storage/storage/stat_mtim.go b/vendor/github.com/containers/storage/stat_mtim.go similarity index 100% rename from vendor/github.com/containers/storage/storage/stat_mtim.go rename to vendor/github.com/containers/storage/stat_mtim.go diff --git a/vendor/github.com/containers/storage/storage/stat_mtimespec.go b/vendor/github.com/containers/storage/stat_mtimespec.go similarity index 100% rename from vendor/github.com/containers/storage/storage/stat_mtimespec.go rename to vendor/github.com/containers/storage/stat_mtimespec.go diff --git a/vendor/github.com/containers/storage/storage/store.go b/vendor/github.com/containers/storage/store.go similarity index 84% rename from vendor/github.com/containers/storage/storage/store.go rename to vendor/github.com/containers/storage/store.go index 61e0f84e..d297097f 100644 --- a/vendor/github.com/containers/storage/storage/store.go +++ b/vendor/github.com/containers/storage/store.go @@ -74,8 +74,8 @@ type FileBasedStore interface { // MetadataStore wraps up methods for getting and setting metadata associated with IDs. type MetadataStore interface { - // GetMetadata reads metadata associated with an item with the specified ID. - GetMetadata(id string) (string, error) + // Metadata reads metadata associated with an item with the specified ID. + Metadata(id string) (string, error) // SetMetadata updates the metadata associated with the item with the specified ID. SetMetadata(id, metadata string) error @@ -88,17 +88,17 @@ type BigDataStore interface { // ID. SetBigData(id, key string, data []byte) error - // GetBigData retrieves a (potentially large) piece of data associated with + // BigData retrieves a (potentially large) piece of data associated with // this ID, if it has previously been set. - GetBigData(id, key string) ([]byte, error) + BigData(id, key string) ([]byte, error) - // GetBigDataSize retrieves the size of a (potentially large) piece of + // BigDataSize retrieves the size of a (potentially large) piece of // data associated with this ID, if it has previously been set. - GetBigDataSize(id, key string) (int64, error) + BigDataSize(id, key string) (int64, error) - // GetBigDataNames() returns a list of the names of previously-stored pieces of + // BigDataNames() returns a list of the names of previously-stored pieces of // data. - GetBigDataNames(id string) ([]string, error) + BigDataNames(id string) ([]string, error) } // A FlaggableStore can have flags set and cleared on items which it manages. @@ -136,28 +136,28 @@ type StoreOptions struct { // Store wraps up the various types of file-based stores that we use into a // singleton object that initializes and manages them all together. type Store interface { - // GetRunRoot, GetGraphRoot, GetGraphDriverName, and GetGraphOptions retrieve + // RunRoot, GraphRoot, GraphDriverName, and GraphOptions retrieve // settings that were passed to GetStore() when the object was created. - GetRunRoot() string - GetGraphRoot() string - GetGraphDriverName() string - GetGraphOptions() []string + RunRoot() string + GraphRoot() string + GraphDriverName() string + GraphOptions() []string - // GetGraphDriver obtains and returns a handle to the graph Driver object used + // GraphDriver obtains and returns a handle to the graph Driver object used // by the Store. - GetGraphDriver() (drivers.Driver, error) + GraphDriver() (drivers.Driver, error) - // GetLayerStore obtains and returns a handle to the layer store object used by + // LayerStore obtains and returns a handle to the layer store object used by // the Store. - GetLayerStore() (LayerStore, error) + LayerStore() (LayerStore, error) - // GetImageStore obtains and returns a handle to the image store object used by + // ImageStore obtains and returns a handle to the image store object used by // the Store. - GetImageStore() (ImageStore, error) + ImageStore() (ImageStore, error) - // GetContainerStore obtains and returns a handle to the container store object + // ContainerStore obtains and returns a handle to the container store object // used by the Store. - GetContainerStore() (ContainerStore, error) + ContainerStore() (ContainerStore, error) // CreateLayer creates a new layer in the underlying storage driver, optionally // having the specified ID (one will be assigned if none is specified), with @@ -186,14 +186,14 @@ type Store interface { // library stores for the convenience of its caller. CreateContainer(id string, names []string, image, layer, metadata string, options *ContainerOptions) (*Container, error) - // GetMetadata retrieves the metadata which is associated with a layer, image, + // Metadata retrieves the metadata which is associated with a layer, image, // or container (whichever the passed-in ID refers to). - GetMetadata(id string) (string, error) + Metadata(id string) (string, error) // SetMetadata updates the metadata which is associated with a layer, image, or // container (whichever the passed-in ID refers to) to match the specified - // value. The metadata value can be retrieved at any time using GetMetadata, - // or using GetLayer, GetImage, or GetContainer and reading the object directly. + // value. The metadata value can be retrieved at any time using Metadata, + // or using Layer, Image, or Container and reading the object directly. SetMetadata(id, metadata string) error // Exists checks if there is a layer, image, or container which has the @@ -273,8 +273,8 @@ type Store interface { // Containers returns a list of the currently known containers. Containers() ([]Container, error) - // GetNames returns the list of names for a layer, image, or container. - GetNames(id string) ([]string, error) + // Names returns the list of names for a layer, image, or container. + Names(id string) ([]string, error) // SetNames changes the list of names for a layer, image, or container. SetNames(id string, names []string) error @@ -283,13 +283,13 @@ type Store interface { // data associated with an image. ListImageBigData(id string) ([]string, error) - // GetImageBigData retrieves a (possibly large) chunk of named data associated + // ImageBigData retrieves a (possibly large) chunk of named data associated // with an image. - GetImageBigData(id, key string) ([]byte, error) + ImageBigData(id, key string) ([]byte, error) - // GetImageBigDataSize retrieves the size of a (possibly large) chunk + // ImageBigDataSize retrieves the size of a (possibly large) chunk // of named data associated with an image. - GetImageBigDataSize(id, key string) (int64, error) + ImageBigDataSize(id, key string) (int64, error) // SetImageBigData stores a (possibly large) chunk of named data associated // with an image. @@ -299,67 +299,67 @@ type Store interface { // named data associated with a container. ListContainerBigData(id string) ([]string, error) - // GetContainerBigData retrieves a (possibly large) chunk of named data + // ContainerBigData retrieves a (possibly large) chunk of named data // associated with a container. - GetContainerBigData(id, key string) ([]byte, error) + ContainerBigData(id, key string) ([]byte, error) - // GetContainerBigDataSize retrieves the size of a (possibly large) + // ContainerBigDataSize retrieves the size of a (possibly large) // chunk of named data associated with a container. - GetContainerBigDataSize(id, key string) (int64, error) + ContainerBigDataSize(id, key string) (int64, error) // SetContainerBigData stores a (possibly large) chunk of named data // associated with a container. SetContainerBigData(id, key string, data []byte) error - // GetLayer returns a specific layer. - GetLayer(id string) (*Layer, error) + // Layer returns a specific layer. + Layer(id string) (*Layer, error) - // GetImage returns a specific image. - GetImage(id string) (*Image, error) + // Image returns a specific image. + Image(id string) (*Image, error) - // GetImagesByTopLayer returns a list of images which reference the specified + // ImagesByTopLayer returns a list of images which reference the specified // layer as their top layer. They will have different IDs and names // and may have different metadata, big data items, and flags. - GetImagesByTopLayer(id string) ([]*Image, error) + ImagesByTopLayer(id string) ([]*Image, error) - // GetContainer returns a specific container. - GetContainer(id string) (*Container, error) + // Container returns a specific container. + Container(id string) (*Container, error) - // GetContainerByLayer returns a specific container based on its layer ID or + // ContainerByLayer returns a specific container based on its layer ID or // name. - GetContainerByLayer(id string) (*Container, error) + ContainerByLayer(id string) (*Container, error) - // GetContainerDirectory returns a path of a directory which the caller + // ContainerDirectory returns a path of a directory which the caller // can use to store data, specific to the container, which the library // does not directly manage. The directory will be deleted when the // container is deleted. - GetContainerDirectory(id string) (string, error) + ContainerDirectory(id string) (string, error) // SetContainerDirectoryFile is a convenience function which stores // a piece of data in the specified file relative to the container's // directory. SetContainerDirectoryFile(id, file string, data []byte) error - // GetFromContainerDirectory is a convenience function which reads + // FromContainerDirectory is a convenience function which reads // the contents of the specified file relative to the container's // directory. - GetFromContainerDirectory(id, file string) ([]byte, error) + FromContainerDirectory(id, file string) ([]byte, error) - // GetContainerRunDirectory returns a path of a directory which the + // ContainerRunDirectory returns a path of a directory which the // caller can use to store data, specific to the container, which the // library does not directly manage. The directory will be deleted // when the host system is restarted. - GetContainerRunDirectory(id string) (string, error) + ContainerRunDirectory(id string) (string, error) // SetContainerRunDirectoryFile is a convenience function which stores // a piece of data in the specified file relative to the container's // run directory. SetContainerRunDirectoryFile(id, file string, data []byte) error - // GetFromContainerRunDirectory is a convenience function which reads + // FromContainerRunDirectory is a convenience function which reads // the contents of the specified file relative to the container's run // directory. - GetFromContainerRunDirectory(id, file string) ([]byte, error) + FromContainerRunDirectory(id, file string) ([]byte, error) // Lookup returns the ID of a layer, image, or container with the specified // name or ID. @@ -482,24 +482,24 @@ func copyIDMap(idmap []idtools.IDMap) []idtools.IDMap { return nil } -func (s *store) GetRunRoot() string { +func (s *store) RunRoot() string { return s.runRoot } -func (s *store) GetGraphDriverName() string { +func (s *store) GraphDriverName() string { return s.graphDriverName } -func (s *store) GetGraphRoot() string { +func (s *store) GraphRoot() string { return s.graphRoot } -func (s *store) GetGraphOptions() []string { +func (s *store) GraphOptions() []string { return s.graphOptions } func (s *store) load() error { - driver, err := s.GetGraphDriver() + driver, err := s.GraphDriver() if err != nil { return err } @@ -507,7 +507,7 @@ func (s *store) load() error { s.graphDriverName = driver.String() driverPrefix := s.graphDriverName + "-" - rls, err := s.GetLayerStore() + rls, err := s.LayerStore() if err != nil { return err } @@ -551,7 +551,7 @@ func (s *store) getGraphDriver() (drivers.Driver, error) { return driver, nil } -func (s *store) GetGraphDriver() (drivers.Driver, error) { +func (s *store) GraphDriver() (drivers.Driver, error) { s.graphLock.Lock() defer s.graphLock.Unlock() if s.graphLock.TouchedSince(s.lastLoaded) { @@ -562,7 +562,7 @@ func (s *store) GetGraphDriver() (drivers.Driver, error) { return s.getGraphDriver() } -func (s *store) GetLayerStore() (LayerStore, error) { +func (s *store) LayerStore() (LayerStore, error) { s.graphLock.Lock() defer s.graphLock.Unlock() if s.graphLock.TouchedSince(s.lastLoaded) { @@ -594,14 +594,14 @@ func (s *store) GetLayerStore() (LayerStore, error) { return s.layerStore, nil } -func (s *store) GetImageStore() (ImageStore, error) { +func (s *store) ImageStore() (ImageStore, error) { if s.imageStore != nil { return s.imageStore, nil } return nil, ErrLoadError } -func (s *store) GetContainerStore() (ContainerStore, error) { +func (s *store) ContainerStore() (ContainerStore, error) { if s.containerStore != nil { return s.containerStore, nil } @@ -609,15 +609,15 @@ func (s *store) GetContainerStore() (ContainerStore, error) { } func (s *store) PutLayer(id, parent string, names []string, mountLabel string, writeable bool, diff archive.Reader) (*Layer, int64, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, -1, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, -1, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, -1, err } @@ -668,15 +668,15 @@ func (s *store) CreateLayer(id, parent string, names []string, mountLabel string } func (s *store) CreateImage(id string, names []string, layer, metadata string, options *ImageOptions) (*Image, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -714,15 +714,15 @@ func (s *store) CreateImage(id string, names []string, layer, metadata string, o } func (s *store) CreateContainer(id string, names []string, image, layer, metadata string, options *ContainerOptions) (*Container, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -775,15 +775,15 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat } func (s *store) SetMetadata(id, metadata string) error { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } @@ -819,16 +819,16 @@ func (s *store) SetMetadata(id, metadata string) error { return ErrNotAnID } -func (s *store) GetMetadata(id string) (string, error) { - rlstore, err := s.GetLayerStore() +func (s *store) Metadata(id string) (string, error) { + rlstore, err := s.LayerStore() if err != nil { return "", err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return "", err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return "", err } @@ -850,23 +850,23 @@ func (s *store) GetMetadata(id string) (string, error) { } if rlstore.Exists(id) { - return rlstore.GetMetadata(id) + return rlstore.Metadata(id) } if ristore.Exists(id) { - return ristore.GetMetadata(id) + return ristore.Metadata(id) } if rcstore.Exists(id) { - return rcstore.GetMetadata(id) + return rcstore.Metadata(id) } return "", ErrNotAnID } func (s *store) ListImageBigData(id string) ([]string, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } @@ -882,15 +882,15 @@ func (s *store) ListImageBigData(id string) ([]string, error) { ristore.Load() } - return ristore.GetBigDataNames(id) + return ristore.BigDataNames(id) } -func (s *store) GetImageBigDataSize(id, key string) (int64, error) { - rlstore, err := s.GetLayerStore() +func (s *store) ImageBigDataSize(id, key string) (int64, error) { + rlstore, err := s.LayerStore() if err != nil { return -1, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return -1, err } @@ -906,15 +906,15 @@ func (s *store) GetImageBigDataSize(id, key string) (int64, error) { ristore.Load() } - return ristore.GetBigDataSize(id, key) + return ristore.BigDataSize(id, key) } -func (s *store) GetImageBigData(id, key string) ([]byte, error) { - rlstore, err := s.GetLayerStore() +func (s *store) ImageBigData(id, key string) ([]byte, error) { + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } @@ -930,15 +930,15 @@ func (s *store) GetImageBigData(id, key string) ([]byte, error) { ristore.Load() } - return ristore.GetBigData(id, key) + return ristore.BigData(id, key) } func (s *store) SetImageBigData(id, key string, data []byte) error { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } @@ -958,15 +958,15 @@ func (s *store) SetImageBigData(id, key string, data []byte) error { } func (s *store) ListContainerBigData(id string) ([]string, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -987,19 +987,19 @@ func (s *store) ListContainerBigData(id string) ([]string, error) { rcstore.Load() } - return rcstore.GetBigDataNames(id) + return rcstore.BigDataNames(id) } -func (s *store) GetContainerBigDataSize(id, key string) (int64, error) { - rlstore, err := s.GetLayerStore() +func (s *store) ContainerBigDataSize(id, key string) (int64, error) { + rlstore, err := s.LayerStore() if err != nil { return -1, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return -1, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return -1, err } @@ -1020,19 +1020,19 @@ func (s *store) GetContainerBigDataSize(id, key string) (int64, error) { rcstore.Load() } - return rcstore.GetBigDataSize(id, key) + return rcstore.BigDataSize(id, key) } -func (s *store) GetContainerBigData(id, key string) ([]byte, error) { - rlstore, err := s.GetLayerStore() +func (s *store) ContainerBigData(id, key string) ([]byte, error) { + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -1053,19 +1053,19 @@ func (s *store) GetContainerBigData(id, key string) ([]byte, error) { rcstore.Load() } - return rcstore.GetBigData(id, key) + return rcstore.BigData(id, key) } func (s *store) SetContainerBigData(id, key string, data []byte) error { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } @@ -1090,15 +1090,15 @@ func (s *store) SetContainerBigData(id, key string, data []byte) error { } func (s *store) Exists(id string) bool { - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return false } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return false } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return false } @@ -1129,15 +1129,15 @@ func (s *store) Exists(id string) bool { } func (s *store) SetNames(id string, names []string) error { - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } @@ -1179,16 +1179,16 @@ func (s *store) SetNames(id string, names []string) error { return ErrLayerUnknown } -func (s *store) GetNames(id string) ([]string, error) { - rcstore, err := s.GetContainerStore() +func (s *store) Names(id string) ([]string, error) { + rcstore, err := s.ContainerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1222,15 +1222,15 @@ func (s *store) GetNames(id string) ([]string, error) { } func (s *store) Lookup(name string) (string, error) { - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return "", err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return "", err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return "", err } @@ -1264,15 +1264,15 @@ func (s *store) Lookup(name string) (string, error) { } func (s *store) DeleteLayer(id string) error { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } @@ -1332,15 +1332,15 @@ func (s *store) DeleteLayer(id string) error { } func (s *store) DeleteImage(id string, commit bool) (layers []string, err error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -1452,15 +1452,15 @@ func (s *store) DeleteImage(id string, commit bool) (layers []string, err error) } func (s *store) DeleteContainer(id string) error { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } @@ -1493,11 +1493,11 @@ func (s *store) DeleteContainer(id string) error { return err } middleDir := s.graphDriverName + "-containers" - gcpath := filepath.Join(s.GetGraphRoot(), middleDir, container.ID) + gcpath := filepath.Join(s.GraphRoot(), middleDir, container.ID) if err = os.RemoveAll(gcpath); err != nil { return err } - rcpath := filepath.Join(s.GetRunRoot(), middleDir, container.ID) + rcpath := filepath.Join(s.RunRoot(), middleDir, container.ID) if err = os.RemoveAll(rcpath); err != nil { return err } @@ -1510,15 +1510,15 @@ func (s *store) DeleteContainer(id string) error { } func (s *store) Delete(id string) error { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } @@ -1551,11 +1551,11 @@ func (s *store) Delete(id string) error { return err } middleDir := s.graphDriverName + "-containers" - gcpath := filepath.Join(s.GetGraphRoot(), middleDir, container.ID, "userdata") + gcpath := filepath.Join(s.GraphRoot(), middleDir, container.ID, "userdata") if err = os.RemoveAll(gcpath); err != nil { return err } - rcpath := filepath.Join(s.GetRunRoot(), middleDir, container.ID, "userdata") + rcpath := filepath.Join(s.RunRoot(), middleDir, container.ID, "userdata") if err = os.RemoveAll(rcpath); err != nil { return err } @@ -1576,15 +1576,15 @@ func (s *store) Delete(id string) error { } func (s *store) Wipe() error { - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } @@ -1618,7 +1618,7 @@ func (s *store) Wipe() error { } func (s *store) Status() ([][2]string, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1634,11 +1634,11 @@ func (s *store) Version() ([][2]string, error) { } func (s *store) Mount(id, mountLabel string) (string, error) { - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return "", err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return "", err } @@ -1662,11 +1662,11 @@ func (s *store) Mount(id, mountLabel string) (string, error) { } func (s *store) Unmount(id string) error { - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return err } @@ -1690,7 +1690,7 @@ func (s *store) Unmount(id string) error { } func (s *store) Changes(from, to string) ([]archive.Change, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1705,7 +1705,7 @@ func (s *store) Changes(from, to string) ([]archive.Change, error) { } func (s *store) DiffSize(from, to string) (int64, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return -1, err } @@ -1720,7 +1720,7 @@ func (s *store) DiffSize(from, to string) (int64, error) { } func (s *store) Diff(from, to string) (io.ReadCloser, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1735,7 +1735,7 @@ func (s *store) Diff(from, to string) (io.ReadCloser, error) { } func (s *store) ApplyDiff(to string, diff archive.Reader) (int64, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return -1, err } @@ -1750,7 +1750,7 @@ func (s *store) ApplyDiff(to string, diff archive.Reader) (int64, error) { } func (s *store) Layers() ([]Layer, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1765,11 +1765,11 @@ func (s *store) Layers() ([]Layer, error) { } func (s *store) Images() ([]Image, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } @@ -1789,15 +1789,15 @@ func (s *store) Images() ([]Image, error) { } func (s *store) Containers() ([]Container, error) { - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -1821,8 +1821,8 @@ func (s *store) Containers() ([]Container, error) { return rcstore.Containers() } -func (s *store) GetLayer(id string) (*Layer, error) { - rlstore, err := s.GetLayerStore() +func (s *store) Layer(id string) (*Layer, error) { + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1836,12 +1836,12 @@ func (s *store) GetLayer(id string) (*Layer, error) { return rlstore.Get(id) } -func (s *store) GetImage(id string) (*Image, error) { - ristore, err := s.GetImageStore() +func (s *store) Image(id string) (*Image, error) { + ristore, err := s.ImageStore() if err != nil { return nil, err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1860,12 +1860,12 @@ func (s *store) GetImage(id string) (*Image, error) { return ristore.Get(id) } -func (s *store) GetImagesByTopLayer(id string) ([]*Image, error) { - ristore, err := s.GetImageStore() +func (s *store) ImagesByTopLayer(id string) ([]*Image, error) { + ristore, err := s.ImageStore() if err != nil { return nil, err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } @@ -1899,16 +1899,16 @@ func (s *store) GetImagesByTopLayer(id string) ([]*Image, error) { return images, nil } -func (s *store) GetContainer(id string) (*Container, error) { - ristore, err := s.GetImageStore() +func (s *store) Container(id string) (*Container, error) { + ristore, err := s.ImageStore() if err != nil { return nil, err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -1932,16 +1932,16 @@ func (s *store) GetContainer(id string) (*Container, error) { return rcstore.Get(id) } -func (s *store) GetContainerByLayer(id string) (*Container, error) { - ristore, err := s.GetImageStore() +func (s *store) ContainerByLayer(id string) (*Container, error) { + ristore, err := s.ImageStore() if err != nil { return nil, err } - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return nil, err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return nil, err } @@ -1979,16 +1979,16 @@ func (s *store) GetContainerByLayer(id string) (*Container, error) { return nil, ErrContainerUnknown } -func (s *store) GetContainerDirectory(id string) (string, error) { - rlstore, err := s.GetLayerStore() +func (s *store) ContainerDirectory(id string) (string, error) { + rlstore, err := s.LayerStore() if err != nil { return "", err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return "", err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return "", err } @@ -2015,23 +2015,23 @@ func (s *store) GetContainerDirectory(id string) (string, error) { } middleDir := s.graphDriverName + "-containers" - gcpath := filepath.Join(s.GetGraphRoot(), middleDir, id, "userdata") + gcpath := filepath.Join(s.GraphRoot(), middleDir, id, "userdata") if err := os.MkdirAll(gcpath, 0700); err != nil { return "", err } return gcpath, nil } -func (s *store) GetContainerRunDirectory(id string) (string, error) { - rlstore, err := s.GetLayerStore() +func (s *store) ContainerRunDirectory(id string) (string, error) { + rlstore, err := s.LayerStore() if err != nil { return "", err } - ristore, err := s.GetImageStore() + ristore, err := s.ImageStore() if err != nil { return "", err } - rcstore, err := s.GetContainerStore() + rcstore, err := s.ContainerStore() if err != nil { return "", err } @@ -2058,7 +2058,7 @@ func (s *store) GetContainerRunDirectory(id string) (string, error) { } middleDir := s.graphDriverName + "-containers" - rcpath := filepath.Join(s.GetRunRoot(), middleDir, id, "userdata") + rcpath := filepath.Join(s.RunRoot(), middleDir, id, "userdata") if err := os.MkdirAll(rcpath, 0700); err != nil { return "", err } @@ -2066,7 +2066,7 @@ func (s *store) GetContainerRunDirectory(id string) (string, error) { } func (s *store) SetContainerDirectoryFile(id, file string, data []byte) error { - dir, err := s.GetContainerDirectory(id) + dir, err := s.ContainerDirectory(id) if err != nil { return err } @@ -2077,8 +2077,8 @@ func (s *store) SetContainerDirectoryFile(id, file string, data []byte) error { return ioutils.AtomicWriteFile(filepath.Join(dir, file), data, 0600) } -func (s *store) GetFromContainerDirectory(id, file string) ([]byte, error) { - dir, err := s.GetContainerDirectory(id) +func (s *store) FromContainerDirectory(id, file string) ([]byte, error) { + dir, err := s.ContainerDirectory(id) if err != nil { return nil, err } @@ -2086,7 +2086,7 @@ func (s *store) GetFromContainerDirectory(id, file string) ([]byte, error) { } func (s *store) SetContainerRunDirectoryFile(id, file string, data []byte) error { - dir, err := s.GetContainerRunDirectory(id) + dir, err := s.ContainerRunDirectory(id) if err != nil { return err } @@ -2097,8 +2097,8 @@ func (s *store) SetContainerRunDirectoryFile(id, file string, data []byte) error return ioutils.AtomicWriteFile(filepath.Join(dir, file), data, 0600) } -func (s *store) GetFromContainerRunDirectory(id, file string) ([]byte, error) { - dir, err := s.GetContainerRunDirectory(id) +func (s *store) FromContainerRunDirectory(id, file string) ([]byte, error) { + dir, err := s.ContainerRunDirectory(id) if err != nil { return nil, err } @@ -2109,7 +2109,7 @@ func (s *store) Shutdown(force bool) ([]string, error) { mounted := []string{} modified := false - rlstore, err := s.GetLayerStore() + rlstore, err := s.LayerStore() if err != nil { return mounted, err } diff --git a/vendor/github.com/opencontainers/go-digest/algorithm.go b/vendor/github.com/opencontainers/go-digest/algorithm.go index bdff42d9..086a5234 100644 --- a/vendor/github.com/opencontainers/go-digest/algorithm.go +++ b/vendor/github.com/opencontainers/go-digest/algorithm.go @@ -125,6 +125,14 @@ func (a Algorithm) Hash() hash.Hash { return algorithms[a].New() } +// Encode encodes the raw bytes of a digest, typically from a hash.Hash, into +// the encoded portion of the digest. +func (a Algorithm) Encode(d []byte) string { + // TODO(stevvooe): Currently, all algorithms use a hex encoding. When we + // add support for back registration, we can modify this accordingly. + return fmt.Sprintf("%x", d) +} + // FromReader returns the digest of the reader using the algorithm. func (a Algorithm) FromReader(rd io.Reader) (Digest, error) { digester := a.Digester() diff --git a/vendor/github.com/opencontainers/go-digest/digest.go b/vendor/github.com/opencontainers/go-digest/digest.go index 69e1d2b5..71279be4 100644 --- a/vendor/github.com/opencontainers/go-digest/digest.go +++ b/vendor/github.com/opencontainers/go-digest/digest.go @@ -45,16 +45,21 @@ func NewDigest(alg Algorithm, h hash.Hash) Digest { // functions. This is also useful for rebuilding digests from binary // serializations. func NewDigestFromBytes(alg Algorithm, p []byte) Digest { - return Digest(fmt.Sprintf("%s:%x", alg, p)) + return NewDigestFromEncoded(alg, alg.Encode(p)) } -// NewDigestFromHex returns a Digest from alg and a the hex encoded digest. +// NewDigestFromHex is deprecated. Please use NewDigestFromEncoded. func NewDigestFromHex(alg, hex string) Digest { - return Digest(fmt.Sprintf("%s:%s", alg, hex)) + return NewDigestFromEncoded(Algorithm(alg), hex) +} + +// NewDigestFromEncoded returns a Digest from alg and the encoded digest. +func NewDigestFromEncoded(alg Algorithm, encoded string) Digest { + return Digest(fmt.Sprintf("%s:%s", alg, encoded)) } // DigestRegexp matches valid digest types. -var DigestRegexp = regexp.MustCompile(`[a-zA-Z0-9-_+.]+:[a-fA-F0-9]+`) +var DigestRegexp = regexp.MustCompile(`[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+`) // DigestRegexpAnchored matches valid digest types, anchored to the start and end of the match. var DigestRegexpAnchored = regexp.MustCompile(`^` + DigestRegexp.String() + `$`) @@ -133,12 +138,17 @@ func (d Digest) Verifier() Verifier { } } -// Hex returns the hex digest portion of the digest. This will panic if the +// Encoded returns the encoded portion of the digest. This will panic if the // underlying digest is not in a valid format. -func (d Digest) Hex() string { +func (d Digest) Encoded() string { return string(d[d.sepIndex()+1:]) } +// Hex is deprecated. Please use Digest.Encoded. +func (d Digest) Hex() string { + return d.Encoded() +} + func (d Digest) String() string { return string(d) } diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index 029ed958..3175a08c 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -292,7 +292,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { streams: make(map[uint32]*stream), readFrameCh: make(chan readFrameResult), wantWriteFrameCh: make(chan FrameWriteRequest, 8), - wantStartPushCh: make(chan startPushRequest, 8), + serveMsgCh: make(chan interface{}, 8), wroteFrameCh: make(chan frameWriteResult, 1), // buffered; one send in writeFrameAsync bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way doneServing: make(chan struct{}), @@ -405,10 +405,9 @@ type serverConn struct { doneServing chan struct{} // closed when serverConn.serve ends readFrameCh chan readFrameResult // written by serverConn.readFrames wantWriteFrameCh chan FrameWriteRequest // from handlers -> serve - wantStartPushCh chan startPushRequest // from handlers -> serve wroteFrameCh chan frameWriteResult // from writeFrameAsync -> serve, tickles more frame writes bodyReadCh chan bodyReadMsg // from handlers -> serve - testHookCh chan func(int) // code to run on the serve loop + serveMsgCh chan interface{} // misc messages & code to send to / run on the serve loop flow flow // conn-wide (not stream-specific) outbound flow control inflow flow // conn-wide inbound flow control tlsState *tls.ConnectionState // shared by all handlers, like net/http @@ -440,10 +439,8 @@ type serverConn struct { inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop needToSendGoAway bool // we need to schedule a GOAWAY frame write goAwayCode ErrCode - shutdownTimerCh <-chan time.Time // nil until used - shutdownTimer *time.Timer // nil until used - idleTimer *time.Timer // nil if unused - idleTimerCh <-chan time.Time // nil if unused + shutdownTimer *time.Timer // nil until used + idleTimer *time.Timer // nil if unused // Owned by the writeFrameAsync goroutine: headerWriteBuf bytes.Buffer @@ -748,19 +745,24 @@ func (sc *serverConn) serve() { sc.setConnState(http.StateIdle) if sc.srv.IdleTimeout != 0 { - sc.idleTimer = time.NewTimer(sc.srv.IdleTimeout) + sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) defer sc.idleTimer.Stop() - sc.idleTimerCh = sc.idleTimer.C } - var gracefulShutdownCh <-chan struct{} + var gracefulShutdownCh chan struct{} if sc.hs != nil { - gracefulShutdownCh = h1ServerShutdownChan(sc.hs) + ch := h1ServerShutdownChan(sc.hs) + if ch != nil { + gracefulShutdownCh = make(chan struct{}) + go sc.awaitGracefulShutdown(ch, gracefulShutdownCh) + } } go sc.readFrames() // closed by defer sc.conn.Close above - settingsTimer := time.NewTimer(firstSettingsTimeout) + settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer) + defer settingsTimer.Stop() + loopNum := 0 for { loopNum++ @@ -771,8 +773,6 @@ func (sc *serverConn) serve() { break } sc.writeFrame(wr) - case spr := <-sc.wantStartPushCh: - sc.startPush(spr) case res := <-sc.wroteFrameCh: sc.wroteFrame(res) case res := <-sc.readFrameCh: @@ -780,26 +780,38 @@ func (sc *serverConn) serve() { return } res.readMore() - if settingsTimer.C != nil { + if settingsTimer != nil { settingsTimer.Stop() - settingsTimer.C = nil + settingsTimer = nil } case m := <-sc.bodyReadCh: sc.noteBodyRead(m.st, m.n) - case <-settingsTimer.C: - sc.logf("timeout waiting for SETTINGS frames from %v", sc.conn.RemoteAddr()) - return case <-gracefulShutdownCh: gracefulShutdownCh = nil sc.startGracefulShutdown() - case <-sc.shutdownTimerCh: - sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr()) - return - case <-sc.idleTimerCh: - sc.vlogf("connection is idle") - sc.goAway(ErrCodeNo) - case fn := <-sc.testHookCh: - fn(loopNum) + case msg := <-sc.serveMsgCh: + switch v := msg.(type) { + case func(int): + v(loopNum) // for testing + case *timerMessage: + switch v { + case settingsTimerMsg: + sc.logf("timeout waiting for SETTINGS frames from %v", sc.conn.RemoteAddr()) + return + case idleTimerMsg: + sc.vlogf("connection is idle") + sc.goAway(ErrCodeNo) + case shutdownTimerMsg: + sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr()) + return + default: + panic("unknown timer") + } + case *startPushRequest: + sc.startPush(v) + default: + panic(fmt.Sprintf("unexpected type %T", v)) + } } if sc.inGoAway && sc.curOpenStreams() == 0 && !sc.needToSendGoAway && !sc.writingFrame { @@ -808,6 +820,35 @@ func (sc *serverConn) serve() { } } +func (sc *serverConn) awaitGracefulShutdown(sharedCh <-chan struct{}, privateCh chan struct{}) { + select { + case <-sc.doneServing: + case <-sharedCh: + close(privateCh) + } +} + +type timerMessage int + +// Timeout message values sent to serveMsgCh. +var ( + settingsTimerMsg = new(timerMessage) + idleTimerMsg = new(timerMessage) + shutdownTimerMsg = new(timerMessage) +) + +func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) } +func (sc *serverConn) onIdleTimer() { sc.sendServeMsg(idleTimerMsg) } +func (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) } + +func (sc *serverConn) sendServeMsg(msg interface{}) { + sc.serveG.checkNotOn() // NOT + select { + case sc.serveMsgCh <- msg: + case <-sc.doneServing: + } +} + // readPreface reads the ClientPreface greeting from the peer // or returns an error on timeout or an invalid greeting. func (sc *serverConn) readPreface() error { @@ -1160,8 +1201,7 @@ func (sc *serverConn) goAwayIn(code ErrCode, forceCloseIn time.Duration) { func (sc *serverConn) shutDownIn(d time.Duration) { sc.serveG.check() - sc.shutdownTimer = time.NewTimer(d) - sc.shutdownTimerCh = sc.shutdownTimer.C + sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer) } func (sc *serverConn) resetStream(se StreamError) { @@ -2539,7 +2579,7 @@ func (w *responseWriter) push(target string, opts pushOptions) error { return fmt.Errorf("method %q must be GET or HEAD", opts.Method) } - msg := startPushRequest{ + msg := &startPushRequest{ parent: st, method: opts.Method, url: u, @@ -2552,7 +2592,7 @@ func (w *responseWriter) push(target string, opts pushOptions) error { return errClientDisconnected case <-st.cw: return errStreamClosed - case sc.wantStartPushCh <- msg: + case sc.serveMsgCh <- msg: } select { @@ -2574,7 +2614,7 @@ type startPushRequest struct { done chan error } -func (sc *serverConn) startPush(msg startPushRequest) { +func (sc *serverConn) startPush(msg *startPushRequest) { sc.serveG.check() // http://tools.ietf.org/html/rfc7540#section-6.6. diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s index 43ed17a0..ded8260f 100644 --- a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s +++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s @@ -10,8 +10,8 @@ // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go // -TEXT ·sysvicall6(SB),NOSPLIT,$0-64 +TEXT ·sysvicall6(SB),NOSPLIT,$0-88 JMP syscall·sysvicall6(SB) -TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 +TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 JMP syscall·rawSysvicall6(SB) diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go index f1493a3e..bb756ece 100644 --- a/vendor/golang.org/x/sys/unix/sockcmsg_unix.go +++ b/vendor/golang.org/x/sys/unix/sockcmsg_unix.go @@ -1,4 +1,4 @@ -// Copyright 2011 The Go Authors. All rights reserved. +// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -13,9 +13,10 @@ import "unsafe" // Round the length of a raw sockaddr up to align it properly. func cmsgAlignOf(salen int) int { salign := sizeofPtr - // NOTE: It seems like 64-bit Darwin and DragonFly BSD kernels - // still require 32-bit aligned access to network subsystem. - if darwin64Bit || dragonfly64Bit { + // NOTE: It seems like 64-bit Darwin, DragonFly BSD and + // Solaris kernels still require 32-bit aligned access to + // network subsystem. + if darwin64Bit || dragonfly64Bit || solaris64Bit { salign = 4 } return (salen + salign - 1) & ^(salign - 1) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 9737e08b..8c102bc7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1038,6 +1038,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri //sys Chroot(path string) (err error) //sys ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) +//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys Dup(oldfd int) (fd int, err error) //sys Dup3(oldfd int, newfd int, flags int) (err error) //sysnb EpollCreate(size int) (fd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index 8119fde3..73318e5c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -7,6 +7,7 @@ package unix +//sys Dup2(oldfd int, newfd int) (err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Fchown(fd int, uid int, gid int) (err error) //sys Fstatfs(fd int, buf *Statfs_t) (err error) @@ -182,9 +183,9 @@ func fillStat_t(s *Stat_t, st *stat_t) { s.Blocks = st.Blocks } -func (r *PtraceRegs) PC() uint64 { return r.Regs[64] } +func (r *PtraceRegs) PC() uint64 { return r.Epc } -func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc } +func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index be77d24a..b83d93fd 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -211,9 +211,9 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) { return setrlimit(resource, &rl) } -func (r *PtraceRegs) PC() uint64 { return uint64(r.Regs[64]) } +func (r *PtraceRegs) PC() uint64 { return r.Epc } -func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = uint32(pc) } +func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint32(length) diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 3cb1d0bf..cab9b4fb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -422,7 +422,7 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) { return } -//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { var msg Msghdr @@ -441,7 +441,7 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from iov.Base = &dummy iov.SetLen(1) } - msg.Accrights = (*int8)(unsafe.Pointer(&oob[0])) + msg.Accrightslen = int32(len(oob)) } msg.Iov = &iov msg.Iovlen = 1 @@ -461,7 +461,7 @@ func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { return } -//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { var ptr unsafe.Pointer @@ -487,7 +487,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) iov.Base = &dummy iov.SetLen(1) } - msg.Accrights = (*int8)(unsafe.Pointer(&oob[0])) + msg.Accrightslen = int32(len(oob)) } msg.Iov = &iov msg.Iovlen = 1 @@ -583,6 +583,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) { //sys Fdatasync(fd int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) //sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) //sysnb Getgid() (gid int) //sysnb Getpid() (pid int) @@ -599,7 +600,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) { //sys Kill(pid int, signum syscall.Signal) (err error) //sys Lchown(path string, uid int, gid int) (err error) //sys Link(path string, link string) (err error) -//sys Listen(s int, backlog int) (err error) = libsocket.listen +//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten //sys Lstat(path string, stat *Stat_t) (err error) //sys Madvise(b []byte, advice int) (err error) //sys Mkdir(path string, mode uint32) (err error) @@ -639,6 +640,7 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) { //sysnb Setuid(uid int) (err error) //sys Shutdown(s int, how int) (err error) = libsocket.shutdown //sys Stat(path string, stat *Stat_t) (err error) +//sys Statvfs(path string, vfsstat *Statvfs_t) (err error) //sys Symlink(path string, link string) (err error) //sys Sync() (err error) //sysnb Times(tms *Tms) (ticks uintptr, err error) @@ -652,15 +654,15 @@ func IoctlGetTermio(fd int, req int) (*Termio, error) { //sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys Utime(path string, buf *Utimbuf) (err error) -//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind -//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) //sys munmap(addr uintptr, length uintptr) (err error) -//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto -//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket -//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto +//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_socketpair //sys write(fd int, p []byte) (n int, err error) -//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.__xnet_getsockopt //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 8a5237de..3ed8a91f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -23,6 +23,7 @@ const ( darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8 dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8 netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4 + solaris64Bit = runtime.GOOS == "solaris" && sizeofPtr == 8 ) // Do the interface allocations only once for common diff --git a/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go index 69bf1bc4..393c7f04 100644 --- a/vendor/golang.org/x/sys/unix/types_solaris.go +++ b/vendor/golang.org/x/sys/unix/types_solaris.go @@ -37,6 +37,7 @@ package unix #include #include #include +#include #include #include #include @@ -139,6 +140,12 @@ type Flock_t C.struct_flock type Dirent C.struct_dirent +// Filesystems + +type _Fsblkcnt_t C.fsblkcnt_t + +type Statvfs_t C.struct_statvfs + // Sockets type RawSockaddrInet4 C.struct_sockaddr_in diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go index a08922b9..81e83d78 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go @@ -1,5 +1,5 @@ // mkerrors.sh -m64 -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,solaris @@ -159,7 +159,12 @@ const ( BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0xf CFLUSH = 0xf + CIBAUD = 0xf0000 CLOCAL = 0x800 CLOCK_HIGHRES = 0x4 CLOCK_LEVEL = 0xa @@ -169,7 +174,13 @@ const ( CLOCK_REALTIME = 0x3 CLOCK_THREAD_CPUTIME_ID = 0x2 CLOCK_VIRTUAL = 0x1 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 CREAD = 0x80 + CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 @@ -276,6 +287,9 @@ const ( FD_CLOEXEC = 0x1 FD_NFDBITS = 0x40 FD_SETSIZE = 0x10000 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 FLUSHALL = 0x1 FLUSHDATA = 0x0 FLUSHO = 0x2000 @@ -290,6 +304,10 @@ const ( F_DUP2FD_CLOEXEC = 0x24 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x25 + F_FLOCK = 0x35 + F_FLOCK64 = 0x35 + F_FLOCKW = 0x36 + F_FLOCKW64 = 0x36 F_FREESP = 0xb F_FREESP64 = 0xb F_GETFD = 0x1 @@ -304,6 +322,12 @@ const ( F_MDACC = 0x20 F_NODNY = 0x0 F_NPRIV = 0x10 + F_OFD_GETLK = 0x2f + F_OFD_GETLK64 = 0x2f + F_OFD_SETLK = 0x30 + F_OFD_SETLK64 = 0x30 + F_OFD_SETLKW = 0x31 + F_OFD_SETLKW64 = 0x31 F_PRIV = 0xf F_QUOTACTL = 0x11 F_RDACC = 0x1 @@ -332,6 +356,7 @@ const ( F_WRDNY = 0x2 F_WRLCK = 0x2 HUPCL = 0x400 + IBSHIFT = 0x10 ICANON = 0x2 ICRNL = 0x100 IEXTEN = 0x8000 @@ -589,15 +614,21 @@ const ( IP_UNSPEC_SRC = 0x42 ISIG = 0x1 ISTRIP = 0x20 + IUCLC = 0x200 IXANY = 0x800 IXOFF = 0x1000 IXON = 0x400 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 MADV_ACCESS_DEFAULT = 0x6 MADV_ACCESS_LWP = 0x7 MADV_ACCESS_MANY = 0x8 MADV_DONTNEED = 0x4 MADV_FREE = 0x5 MADV_NORMAL = 0x0 + MADV_PURGE = 0x9 MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 @@ -605,6 +636,7 @@ const ( MAP_ALIGN = 0x200 MAP_ANON = 0x100 MAP_ANONYMOUS = 0x100 + MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_INITDATA = 0x800 MAP_NORESERVE = 0x40 @@ -632,10 +664,14 @@ const ( MS_OLDSYNC = 0x0 MS_SYNC = 0x4 M_FLUSH = 0x86 + NL0 = 0x0 + NL1 = 0x100 + NLDLY = 0x100 NOFLSH = 0x80 OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 + OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 @@ -955,12 +991,21 @@ const ( SO_USELOOPBACK = 0x40 SO_VRRP = 0x1017 SO_WROFF = 0x2 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d TCIFLUSH = 0x0 + TCIOFF = 0x2 TCIOFLUSH = 0x2 + TCION = 0x3 TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 TCP_ABORT_THRESHOLD = 0x11 TCP_ANONPRIVBIND = 0x20 TCP_CONN_ABORT_THRESHOLD = 0x13 @@ -1089,6 +1134,8 @@ const ( WSTOPPED = 0x4 WTRAPPED = 0x2 WUNTRACED = 0x4 + XCASE = 0x4 + XTABS = 0x1800 ) // Errors diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 41693a96..b4e9d8b3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index f10621d9..3de166a5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index fae666f6..03463aec 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index a4dca395..4f68f392 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index b56db729..73d68896 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index ca2359de..60c9629d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -1194,6 +1205,16 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { var _p0 unsafe.Pointer if len(events) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index e574940f..1fc8c659 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) @@ -1194,6 +1205,16 @@ func Munlockall() (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { var _p0 unsafe.Pointer if len(events) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 31836d45..c5f87e63 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 4a767558..cee6ec35 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 5fb34282..f031e10a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 79d285ca..4e4728ab 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go index ce3ec585..2dd98434 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go @@ -1,5 +1,5 @@ // mksyscall.pl -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build linux,sparc64 @@ -312,6 +312,17 @@ func Close(fd int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Dup(oldfd int) (fd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) fd = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index bdf140b1..cbc6f6e3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -1,5 +1,5 @@ // mksyscall_solaris.pl -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build solaris,amd64 @@ -22,8 +22,8 @@ import ( //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" //go:cgo_import_dynamic libc_futimesat futimesat "libc.so" //go:cgo_import_dynamic libc_accept accept "libsocket.so" -//go:cgo_import_dynamic libc_recvmsg recvmsg "libsocket.so" -//go:cgo_import_dynamic libc_sendmsg sendmsg "libsocket.so" +//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so" +//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so" //go:cgo_import_dynamic libc_acct acct "libc.so" //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" //go:cgo_import_dynamic libc_access access "libc.so" @@ -45,6 +45,7 @@ import ( //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so" //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" //go:cgo_import_dynamic libc_fstat fstat "libc.so" +//go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so" //go:cgo_import_dynamic libc_getdents getdents "libc.so" //go:cgo_import_dynamic libc_getgid getgid "libc.so" //go:cgo_import_dynamic libc_getpid getpid "libc.so" @@ -61,7 +62,7 @@ import ( //go:cgo_import_dynamic libc_kill kill "libc.so" //go:cgo_import_dynamic libc_lchown lchown "libc.so" //go:cgo_import_dynamic libc_link link "libc.so" -//go:cgo_import_dynamic libc_listen listen "libsocket.so" +//go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so" //go:cgo_import_dynamic libc_lstat lstat "libc.so" //go:cgo_import_dynamic libc_madvise madvise "libc.so" //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" @@ -101,6 +102,7 @@ import ( //go:cgo_import_dynamic libc_setuid setuid "libc.so" //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so" //go:cgo_import_dynamic libc_stat stat "libc.so" +//go:cgo_import_dynamic libc_statvfs statvfs "libc.so" //go:cgo_import_dynamic libc_symlink symlink "libc.so" //go:cgo_import_dynamic libc_sync sync "libc.so" //go:cgo_import_dynamic libc_times times "libc.so" @@ -114,15 +116,15 @@ import ( //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" //go:cgo_import_dynamic libc_ustat ustat "libc.so" //go:cgo_import_dynamic libc_utime utime "libc.so" -//go:cgo_import_dynamic libc_bind bind "libsocket.so" -//go:cgo_import_dynamic libc_connect connect "libsocket.so" +//go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so" +//go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so" //go:cgo_import_dynamic libc_mmap mmap "libc.so" //go:cgo_import_dynamic libc_munmap munmap "libc.so" -//go:cgo_import_dynamic libc_sendto sendto "libsocket.so" -//go:cgo_import_dynamic libc_socket socket "libsocket.so" -//go:cgo_import_dynamic libc_socketpair socketpair "libsocket.so" +//go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so" +//go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so" +//go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so" //go:cgo_import_dynamic libc_write write "libc.so" -//go:cgo_import_dynamic libc_getsockopt getsockopt "libsocket.so" +//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so" //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" @@ -140,8 +142,8 @@ import ( //go:linkname procfcntl libc_fcntl //go:linkname procfutimesat libc_futimesat //go:linkname procaccept libc_accept -//go:linkname procrecvmsg libc_recvmsg -//go:linkname procsendmsg libc_sendmsg +//go:linkname proc__xnet_recvmsg libc___xnet_recvmsg +//go:linkname proc__xnet_sendmsg libc___xnet_sendmsg //go:linkname procacct libc_acct //go:linkname procioctl libc_ioctl //go:linkname procAccess libc_access @@ -163,6 +165,7 @@ import ( //go:linkname procFdatasync libc_fdatasync //go:linkname procFpathconf libc_fpathconf //go:linkname procFstat libc_fstat +//go:linkname procFstatvfs libc_fstatvfs //go:linkname procGetdents libc_getdents //go:linkname procGetgid libc_getgid //go:linkname procGetpid libc_getpid @@ -179,7 +182,7 @@ import ( //go:linkname procKill libc_kill //go:linkname procLchown libc_lchown //go:linkname procLink libc_link -//go:linkname proclisten libc_listen +//go:linkname proc__xnet_llisten libc___xnet_llisten //go:linkname procLstat libc_lstat //go:linkname procMadvise libc_madvise //go:linkname procMkdir libc_mkdir @@ -219,6 +222,7 @@ import ( //go:linkname procSetuid libc_setuid //go:linkname procshutdown libc_shutdown //go:linkname procStat libc_stat +//go:linkname procStatvfs libc_statvfs //go:linkname procSymlink libc_symlink //go:linkname procSync libc_sync //go:linkname procTimes libc_times @@ -232,15 +236,15 @@ import ( //go:linkname procUnlinkat libc_unlinkat //go:linkname procUstat libc_ustat //go:linkname procUtime libc_utime -//go:linkname procbind libc_bind -//go:linkname procconnect libc_connect +//go:linkname proc__xnet_bind libc___xnet_bind +//go:linkname proc__xnet_connect libc___xnet_connect //go:linkname procmmap libc_mmap //go:linkname procmunmap libc_munmap -//go:linkname procsendto libc_sendto -//go:linkname procsocket libc_socket -//go:linkname procsocketpair libc_socketpair +//go:linkname proc__xnet_sendto libc___xnet_sendto +//go:linkname proc__xnet_socket libc___xnet_socket +//go:linkname proc__xnet_socketpair libc___xnet_socketpair //go:linkname procwrite libc_write -//go:linkname procgetsockopt libc_getsockopt +//go:linkname proc__xnet_getsockopt libc___xnet_getsockopt //go:linkname procgetpeername libc_getpeername //go:linkname procsetsockopt libc_setsockopt //go:linkname procrecvfrom libc_recvfrom @@ -259,8 +263,8 @@ var ( procfcntl, procfutimesat, procaccept, - procrecvmsg, - procsendmsg, + proc__xnet_recvmsg, + proc__xnet_sendmsg, procacct, procioctl, procAccess, @@ -282,6 +286,7 @@ var ( procFdatasync, procFpathconf, procFstat, + procFstatvfs, procGetdents, procGetgid, procGetpid, @@ -298,7 +303,7 @@ var ( procKill, procLchown, procLink, - proclisten, + proc__xnet_llisten, procLstat, procMadvise, procMkdir, @@ -338,6 +343,7 @@ var ( procSetuid, procshutdown, procStat, + procStatvfs, procSymlink, procSync, procTimes, @@ -351,15 +357,15 @@ var ( procUnlinkat, procUstat, procUtime, - procbind, - procconnect, + proc__xnet_bind, + proc__xnet_connect, procmmap, procmunmap, - procsendto, - procsocket, - procsocketpair, + proc__xnet_sendto, + proc__xnet_socket, + proc__xnet_socketpair, procwrite, - procgetsockopt, + proc__xnet_getsockopt, procgetpeername, procsetsockopt, procrecvfrom, @@ -488,7 +494,7 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { } func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) n = int(r0) if e1 != 0 { err = e1 @@ -497,7 +503,7 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { } func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { - r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) n = int(r0) if e1 != 0 { err = e1 @@ -713,6 +719,14 @@ func Fstat(fd int, stat *Stat_t) (err error) { return } +func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) { var _p0 *byte if len(buf) > 0 { @@ -853,7 +867,7 @@ func Link(path string, link string) (err error) { } func Listen(s int, backlog int) (err error) { - _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) if e1 != 0 { err = e1 } @@ -1302,6 +1316,19 @@ func Stat(path string, stat *Stat_t) (err error) { return } +func Statvfs(path string, vfsstat *Statvfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + func Symlink(path string, link string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) @@ -1441,7 +1468,7 @@ func Utime(path string, buf *Utimbuf) (err error) { } func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procbind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) if e1 != 0 { err = e1 } @@ -1449,7 +1476,7 @@ func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { } func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { - _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procconnect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) if e1 != 0 { err = e1 } @@ -1478,7 +1505,7 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( if len(buf) > 0 { _p0 = &buf[0] } - _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = e1 } @@ -1486,7 +1513,7 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) ( } func socket(domain int, typ int, proto int) (fd int, err error) { - r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsocket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) fd = int(r0) if e1 != 0 { err = e1 @@ -1495,7 +1522,7 @@ func socket(domain int, typ int, proto int) (fd int, err error) { } func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { - _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsocketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = e1 } @@ -1516,7 +1543,7 @@ func write(fd int, p []byte) (n int, err error) { } func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { - _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = e1 } diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index d04ca4c2..f97268cc 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -568,17 +568,13 @@ type InotifyEvent struct { const SizeofInotifyEvent = 0x10 type PtraceRegs struct { - Regs [109]uint32 - U_tsize uint32 - U_dsize uint32 - U_ssize uint32 - Start_code uint32 - Start_data uint32 - Start_stack uint32 - Signal int32 - U_ar0 *byte - Magic uint32 - U_comm [32]int8 + Regs [32]uint64 + Lo uint64 + Hi uint64 + Epc uint64 + Badvaddr uint64 + Status uint64 + Cause uint64 } type FdSet struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 60b83a12..8d062087 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -570,17 +570,13 @@ type InotifyEvent struct { const SizeofInotifyEvent = 0x10 type PtraceRegs struct { - Regs [102]uint64 - U_tsize uint64 - U_dsize uint64 - U_ssize uint64 - Start_code uint64 - Start_data uint64 - Start_stack uint64 - Signal int64 - U_ar0 uint64 - Magic uint64 - U_comm [32]int8 + Regs [32]uint64 + Lo uint64 + Hi uint64 + Epc uint64 + Badvaddr uint64 + Status uint64 + Cause uint64 } type FdSet struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 9e9c680c..b1fbe717 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -570,17 +570,13 @@ type InotifyEvent struct { const SizeofInotifyEvent = 0x10 type PtraceRegs struct { - Regs [102]uint64 - U_tsize uint64 - U_dsize uint64 - U_ssize uint64 - Start_code uint64 - Start_data uint64 - Start_stack uint64 - Signal int64 - U_ar0 uint64 - Magic uint64 - U_comm [32]int8 + Regs [32]uint64 + Lo uint64 + Hi uint64 + Epc uint64 + Badvaddr uint64 + Status uint64 + Cause uint64 } type FdSet struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index 482b48fd..b634e3c2 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -568,17 +568,13 @@ type InotifyEvent struct { const SizeofInotifyEvent = 0x10 type PtraceRegs struct { - Regs [109]uint32 - U_tsize uint32 - U_dsize uint32 - U_ssize uint32 - Start_code uint32 - Start_data uint32 - Start_stack uint32 - Signal int32 - U_ar0 *byte - Magic uint32 - U_comm [32]int8 + Regs [32]uint64 + Lo uint64 + Hi uint64 + Epc uint64 + Badvaddr uint64 + Status uint64 + Cause uint64 } type FdSet struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go index 02777e4d..92336f9f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go @@ -1,6 +1,7 @@ -// +build amd64,solaris -// Created by cgo -godefs - DO NOT EDIT // cgo -godefs types_solaris.go | go run mkpost.go +// Code generated by the command above; see README.md. DO NOT EDIT. + +// +build amd64,solaris package unix @@ -128,6 +129,24 @@ type Dirent struct { Pad_cgo_0 [5]byte } +type _Fsblkcnt_t uint64 + +type Statvfs_t struct { + Bsize uint64 + Frsize uint64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Favail uint64 + Fsid uint64 + Basetype [16]int8 + Flag uint64 + Namemax uint64 + Fstr [32]int8 +} + type RawSockaddrInet4 struct { Family uint16 Port uint16