Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on ppc64(le), s390x #66

Merged
merged 1 commit into from
May 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sysx/xattr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package sysx

import (
"bytes"
"fmt"
"syscall"
)

const defaultXattrBufferSize = 5

var ErrNotSupported = fmt.Errorf("not supported")

type listxattrFunc func(path string, dest []byte) (int, error)

func listxattrAll(path string, listFunc listxattrFunc) ([]string, error) {
Expand Down
19 changes: 19 additions & 0 deletions sysx/xattr_linux_ppc64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package sysx

import "github.com/pkg/errors"

func llistxattr(path string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on ppc64")
}

func lremovexattr(path string, attr string) (err error) {
return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on ppc64")
}

func lsetxattr(path string, attr string, data []byte, flags int) (err error) {
return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on ppc64")
}

func lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on ppc64")
}
19 changes: 19 additions & 0 deletions sysx/xattr_linux_ppc64le.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package sysx

import "github.com/pkg/errors"

func llistxattr(path string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on ppc64le")
}

func lremovexattr(path string, attr string) (err error) {
return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on ppc64le")
}

func lsetxattr(path string, attr string, data []byte, flags int) (err error) {
return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on ppc64le")
}

func lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on ppc64le")
}
19 changes: 19 additions & 0 deletions sysx/xattr_linux_s390x.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package sysx

import "github.com/pkg/errors"

func llistxattr(path string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on s390x")
}

func lremovexattr(path string, attr string) (err error) {
return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on s390x")
}

func lsetxattr(path string, attr string, data []byte, flags int) (err error) {
return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on s390x")
}

func lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on s390x")
}