mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Fix portability issues for arm on raspberry pi
This commit is contained in:
parent
27612b9aed
commit
b74852116a
@ -46,7 +46,7 @@ func getFSType(path string) (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
fsTypeHex := strconv.FormatInt(s.Type, 16)
|
fsTypeHex := strconv.FormatInt(int64(s.Type), 16)
|
||||||
fsTypeString, ok := fsType2StringMap[fsTypeHex]
|
fsTypeString, ok := fsType2StringMap[fsTypeHex]
|
||||||
if ok == false {
|
if ok == false {
|
||||||
return "UNKNOWN", nil
|
return "UNKNOWN", nil
|
||||||
|
32
vendor/github.com/minio/minio-xl/pkg/cpu/cpu_arm.go
generated
vendored
Normal file
32
vendor/github.com/minio/minio-xl/pkg/cpu/cpu_arm.go
generated
vendored
Normal file
@ -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"
|
"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
|
const Size = 32
|
||||||
|
|
||||||
// The blocksize of SHA256 in bytes.
|
// BlockSize - The blocksize of SHA256 in bytes.
|
||||||
const BlockSize = 64
|
const BlockSize = 64
|
||||||
|
|
||||||
const (
|
const (
|
53
vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_arm.go
generated
vendored
Normal file
53
vendor/github.com/minio/minio-xl/pkg/crypto/sha256/sha256_linux_arm.go
generated
vendored
Normal file
@ -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"
|
"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
|
const Size = 64
|
||||||
|
|
||||||
// The blocksize of SHA512 in bytes.
|
// BlockSize - The blocksize of SHA512 in bytes.
|
||||||
const BlockSize = 128
|
const BlockSize = 128
|
||||||
|
|
||||||
const (
|
const (
|
58
vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows_amd64.go
generated
vendored
Normal file
58
vendor/github.com/minio/minio-xl/pkg/crypto/sha512/sha512_windows_amd64.go
generated
vendored
Normal file
@ -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
28
vendor/vendor.json
vendored
@ -39,38 +39,38 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/minio-xl/pkg/atomic",
|
"path": "github.com/minio/minio-xl/pkg/atomic",
|
||||||
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
|
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
|
||||||
"revisionTime": "2015-10-16T10:19:00-07:00"
|
"revisionTime": "2015-10-20T11:16:42-07:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/minio-xl/pkg/cpu",
|
"path": "github.com/minio/minio-xl/pkg/cpu",
|
||||||
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
|
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
|
||||||
"revisionTime": "2015-10-16T10:19:00-07:00"
|
"revisionTime": "2015-10-20T11:16:42-07:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/minio-xl/pkg/crypto/sha256",
|
"path": "github.com/minio/minio-xl/pkg/crypto/sha256",
|
||||||
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
|
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
|
||||||
"revisionTime": "2015-10-16T10:19:00-07:00"
|
"revisionTime": "2015-10-20T11:16:42-07:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/minio-xl/pkg/crypto/sha512",
|
"path": "github.com/minio/minio-xl/pkg/crypto/sha512",
|
||||||
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
|
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
|
||||||
"revisionTime": "2015-10-16T10:19:00-07:00"
|
"revisionTime": "2015-10-20T11:16:42-07:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/minio-xl/pkg/minhttp",
|
"path": "github.com/minio/minio-xl/pkg/minhttp",
|
||||||
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
|
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
|
||||||
"revisionTime": "2015-10-16T10:19:00-07:00"
|
"revisionTime": "2015-10-20T11:16:42-07:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/minio-xl/pkg/probe",
|
"path": "github.com/minio/minio-xl/pkg/probe",
|
||||||
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
|
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
|
||||||
"revisionTime": "2015-10-16T10:19:00-07:00"
|
"revisionTime": "2015-10-20T11:16:42-07:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/minio/minio-xl/pkg/quick",
|
"path": "github.com/minio/minio-xl/pkg/quick",
|
||||||
"revision": "fc18620590fdb28b9e371a8cb036e9470c1cf39c",
|
"revision": "a5fc6d2430ba2ebcab31b938ab02a42bac85dc2e",
|
||||||
"revisionTime": "2015-10-16T10:19:00-07:00"
|
"revisionTime": "2015-10-20T11:16:42-07:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "github.com/rs/cors",
|
"path": "github.com/rs/cors",
|
||||||
|
Loading…
Reference in New Issue
Block a user