mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Add Donut rpc service for sending changes to configuration files
This commit is contained in:
@@ -34,6 +34,7 @@ func getDonutConfigPath() (string, error) {
|
||||
return donutConfigPath, nil
|
||||
}
|
||||
|
||||
// NOTE - this is not to be used outside Donut package, this is primarily intended for testing purposes only
|
||||
var customConfigPath string
|
||||
|
||||
// SaveConfig save donut config
|
||||
|
||||
@@ -38,11 +38,6 @@ func New(diskPath string) (Disk, error) {
|
||||
if diskPath == "" {
|
||||
return Disk{}, iodine.New(InvalidArgument{}, nil)
|
||||
}
|
||||
s := syscall.Statfs_t{}
|
||||
err := syscall.Statfs(diskPath, &s)
|
||||
if err != nil {
|
||||
return Disk{}, iodine.New(err, nil)
|
||||
}
|
||||
st, err := os.Stat(diskPath)
|
||||
if err != nil {
|
||||
return Disk{}, iodine.New(err, nil)
|
||||
@@ -50,6 +45,11 @@ func New(diskPath string) (Disk, error) {
|
||||
if !st.IsDir() {
|
||||
return Disk{}, iodine.New(syscall.ENOTDIR, nil)
|
||||
}
|
||||
s := syscall.Statfs_t{}
|
||||
err = syscall.Statfs(diskPath, &s)
|
||||
if err != nil {
|
||||
return Disk{}, iodine.New(err, nil)
|
||||
}
|
||||
disk := Disk{
|
||||
path: diskPath,
|
||||
fsInfo: make(map[string]string),
|
||||
|
||||
Reference in New Issue
Block a user