diff --git a/pkg/disk/type_linux.go b/pkg/disk/type_linux.go index dcf55da9b..4609c90b0 100644 --- a/pkg/disk/type_linux.go +++ b/pkg/disk/type_linux.go @@ -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 diff --git a/vendor/github.com/minio/minio-xl/pkg/cpu/cpu.go b/vendor/github.com/minio/minio-xl/pkg/cpu/cpu_amd64.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/cpu/cpu.go rename to vendor/github.com/minio/minio-xl/pkg/cpu/cpu_amd64.go diff --git a/vendor/github.com/minio/minio-xl/pkg/cpu/cpu_arm.go b/vendor/github.com/minio/minio-xl/pkg/cpu/cpu_arm.go new file mode 100644 index 000000000..f2063689b --- /dev/null +++ b/vendor/github.com/minio/minio-xl/pkg/cpu/cpu_arm.go @@ -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 +} diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx-asm_linux.S b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx-asm_linux_amd64.S similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx-asm_linux.S rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx-asm_linux_amd64.S diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx2-asm_linux.S b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx2-asm_linux_amd64.S similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx2-asm_linux.S rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-avx2-asm_linux_amd64.S diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-ssse3-asm_linux.S b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-ssse3-asm_linux_amd64.S similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-ssse3-asm_linux.S rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256-ssse3-asm_linux_amd64.S diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_darwin.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_darwin_amd64.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_darwin.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_darwin_amd64.go diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go similarity index 97% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go index 0c6b44a2f..07bca48f9 100644 --- a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux.go +++ b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64.go @@ -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 ( diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_test.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64_test.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_test.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_amd64_test.go diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_arm.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_arm.go new file mode 100644 index 000000000..4dc80c1dc --- /dev/null +++ b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_arm.go @@ -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() +} diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_windows.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_windows_amd64.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_windows.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_windows_amd64.go diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256block_linux.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256block_linux_amd64.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256block_linux.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256block_linux_amd64.go diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx-asm_linux.S b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx-asm_linux_amd64.S similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx-asm_linux.S rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx-asm_linux_amd64.S diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx2-asm_linux.S b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx2-asm_linux_amd64.S similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx2-asm_linux.S rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-avx2-asm_linux_amd64.S diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-ssse3-asm_linux.S b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-ssse3-asm_linux_amd64.S similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-ssse3-asm_linux.S rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512-ssse3-asm_linux_amd64.S diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_darwin.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_darwin_amd64.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_darwin.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_darwin_amd64.go diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go similarity index 97% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go index 6ebe99ca6..390d186f6 100644 --- a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux.go +++ b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64.go @@ -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 ( diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_test.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64_test.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_test.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_amd64_test.go diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_arm.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_linux_arm.go diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows_amd64.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows_amd64.go new file mode 100644 index 000000000..931e1a1a7 --- /dev/null +++ b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows_amd64.go @@ -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() +} diff --git a/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512block_linux.go b/vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512block_linux_amd64.go similarity index 100% rename from vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512block_linux.go rename to vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512block_linux_amd64.go diff --git a/vendor/vendor.json b/vendor/vendor.json index 060fcaac2..bba41be3b 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -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",