posix: Return errDiskNotWritable during disk initialization. (#2048)

It can happen that minio server might not have
writable permissions on the export paths command line.

Fixes #2035
This commit is contained in:
Harshavardhana
2016-07-02 01:59:28 -07:00
committed by Anand Babu (AB) Periasamy
parent e5dd917c37
commit d64c3fd464
9 changed files with 131 additions and 27 deletions

View File

@@ -69,12 +69,12 @@ const (
var randN uint32
var randmu sync.Mutex
// reseed - returns a new seed everytime the function is called.
// reseed - returns a new seed every time the function is called.
func reseed() uint32 {
return uint32(time.Now().UnixNano() + int64(os.Getpid()))
}
// nextSuffix - provides a new unique suffix everytime the function is called.
// nextSuffix - provides a new unique suffix every time the function is called.
func nextSuffix() string {
randmu.Lock()
r := randN