Merge pull request #930 from harshavardhana/fix-portability

Fix portability issues for arm on raspberry pi
master
Harshavardhana 9 years ago
commit ed9ef861e1
  1. 2
      pkg/disk/type_linux.go
  2. 0
      vendor/github.com/minio/minio-xl/pkg/cpu/cpu_amd64.go
  3. 32
      vendor/github.com/minio/minio-xl/pkg/cpu/cpu_arm.go
  4. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx-asm_linux_amd64.S
  5. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx2-asm_linux_amd64.S
  6. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-ssse3-asm_linux_amd64.S
  7. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_darwin_amd64.go
  8. 4
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go
  9. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64_test.go
  10. 53
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_arm.go
  11. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_windows_amd64.go
  12. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256block_linux_amd64.go
  13. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx-asm_linux_amd64.S
  14. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx2-asm_linux_amd64.S
  15. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-ssse3-asm_linux_amd64.S
  16. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_darwin_amd64.go
  17. 4
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go
  18. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64_test.go
  19. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_arm.go
  20. 58
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows_amd64.go
  21. 0
      vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512block_linux_amd64.go
  22. 28
      vendor/vendor.json

@ -46,7 +46,7 @@ func getFSType(path string) (string, error) {
if err != nil {
return "", err
}
fsTypeHex := strconv.FormatInt(s.Type, 16)
fsTypeHex := strconv.FormatInt(int64(s.Type), 16)
fsTypeString, ok := fsType2StringMap[fsTypeHex]
if ok == false {
return "UNKNOWN", nil

@ -0,0 +1,32 @@
/*
* Minio Cloud Storage, (C) 2015 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cpu
// HasSSE41 - CPUID instruction verification wrapper for SSE41 extensions
func HasSSE41() bool {
return false
}
// HasAVX - CPUID instruction verification wrapper for AVX extensions
func HasAVX() bool {
return false
}
// HasAVX2 - CPUID instruction verification wrapper for AVX2 extensions
func HasAVX2() bool {
return false
}

@ -17,10 +17,10 @@ import (
"github.com/minio/minio-xl/pkg/cpu"
)
// The size of a SHA256 checksum in bytes.
// Size - The size of a SHA256 checksum in bytes.
const Size = 32
// The blocksize of SHA256 in bytes.
// BlockSize - The blocksize of SHA256 in bytes.
const BlockSize = 64
const (

@ -0,0 +1,53 @@
/*
* Minio Cloud Storage, (C) 2015 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sha256
import (
"hash"
"io"
"crypto/sha256"
)
// Sum256 - single caller sha256 helper
func Sum256(data []byte) []byte {
d := sha256.New()
d.Write(data)
return d.Sum(nil)
}
// Sum - io.Reader based streaming sha256 helper
func Sum(reader io.Reader) ([]byte, error) {
d := sha256.New()
var err error
for err == nil {
length := 0
byteBuffer := make([]byte, 1024*1024)
length, err = reader.Read(byteBuffer)
byteBuffer = byteBuffer[0:length]
d.Write(byteBuffer)
}
if err != io.EOF {
return nil, err
}
return d.Sum(nil), nil
}
// New returns a new hash.Hash computing SHA256.
func New() hash.Hash {
return sha256.New()
}

@ -18,10 +18,10 @@ import (
"github.com/minio/minio-xl/pkg/cpu"
)
// The size of a SHA512 checksum in bytes.
// Size - The size of a SHA512 checksum in bytes.
const Size = 64
// The blocksize of SHA512 in bytes.
// BlockSize - The blocksize of SHA512 in bytes.
const BlockSize = 128
const (

@ -0,0 +1,58 @@
/*
* Minio Cloud Storage, (C) 2014 Minio, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sha512
import (
"hash"
"io"
"crypto/sha512"
)
// The size of a SHA512 checksum in bytes.
const (
Size = sha512.Size
)
// Sum512 - single caller sha512 helper
func Sum512(data []byte) []byte {
d := sha512.New()
d.Write(data)
return d.Sum(nil)
}
// Sum - io.Reader based streaming sha512 helper
func Sum(reader io.Reader) ([]byte, error) {
d := sha512.New()
var err error
for err == nil {
length := 0
byteBuffer := make([]byte, 1024*1024)
length, err = reader.Read(byteBuffer)
byteBuffer = byteBuffer[0:length]
d.Write(byteBuffer)
}
if err != io.EOF {
return nil, err
}
return d.Sum(nil), nil
}
// New returns a new hash.Hash computing SHA512.
func New() hash.Hash {
return sha512.New()
}

28
vendor/vendor.json vendored

@ -39,38 +39,38 @@
},
{
"path": "github.com/minio/minio-xl/pkg/atomic",
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
"revisionTime": "2015-10-16T10:19:00-07:00"
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
"revisionTime": "2015-10-20T11:16:42-07:00"
},
{
"path": "github.com/minio/minio-xl/pkg/cpu",
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
"revisionTime": "2015-10-16T10:19:00-07:00"
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
"revisionTime": "2015-10-20T11:16:42-07:00"
},
{
"path": "github.com/minio/minio-xl/pkg/crypto/sha256",
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
"revisionTime": "2015-10-16T10:19:00-07:00"
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
"revisionTime": "2015-10-20T11:16:42-07:00"
},
{
"path": "github.com/minio/minio-xl/pkg/crypto/sha512",
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
"revisionTime": "2015-10-16T10:19:00-07:00"
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
"revisionTime": "2015-10-20T11:16:42-07:00"
},
{
"path": "github.com/minio/minio-xl/pkg/minhttp",
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
"revisionTime": "2015-10-16T10:19:00-07:00"
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
"revisionTime": "2015-10-20T11:16:42-07:00"
},
{
"path": "github.com/minio/minio-xl/pkg/probe",
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
"revisionTime": "2015-10-16T10:19:00-07:00"
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
"revisionTime": "2015-10-20T11:16:42-07:00"
},
{
"path": "github.com/minio/minio-xl/pkg/quick",
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
"revisionTime": "2015-10-16T10:19:00-07:00"
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
"revisionTime": "2015-10-20T11:16:42-07:00"
},
{
"path": "github.com/rs/cors",

Loading…
Cancel
Save