aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/mount_std.go6
-rw-r--r--weed/command/volume.go6
2 files changed, 2 insertions, 10 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index e2aa7e7d4..56338e327 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -169,11 +169,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
mountRoot = mountRoot[0 : len(mountRoot)-1]
}
- diskType, err := storage.ToDiskType(*option.diskType)
- if err != nil {
- fmt.Printf("failed to parse volume type: %v\n", err)
- return false
- }
+ diskType := storage.ToDiskType(*option.diskType)
seaweedFileSystem := filesys.NewSeaweedFileSystem(&filesys.Option{
MountDirectory: dir,
diff --git a/weed/command/volume.go b/weed/command/volume.go
index fa7dcaa06..9fadcf7df 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -173,11 +173,7 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
var diskTypes []storage.DiskType
diskTypeStrings := strings.Split(*v.diskType, ",")
for _, diskTypeString := range diskTypeStrings {
- if diskType, err := storage.ToDiskType(diskTypeString); err == nil {
- diskTypes = append(diskTypes, diskType)
- } else {
- glog.Fatalf("failed to parse volume type: %v", err)
- }
+ diskTypes = append(diskTypes, storage.ToDiskType(diskTypeString))
}
if len(diskTypes) == 1 && len(v.folders) > 1 {
for i := 0; i < len(v.folders)-1; i++ {