Fixed blocksize and oflag and only supporting number

in both the CLI version aswell as the TUI version
This commit is contained in:
Cametendo
2026-04-23 14:40:36 +02:00
parent 23f5ff77ec
commit 4ed8cdc792
3 changed files with 11 additions and 12 deletions

View File

@@ -7,12 +7,12 @@ public class BlockSize {
public static String mapBlockSize(String input) {
return switch (input) {
case "1" -> "512K";
case "2" -> "1M";
case "3" -> "2M";
case "4" -> "4M";
case "5" -> "8M";
case "6" -> "16M";
case "1", "512K" -> "512K";
case "2", "1M" -> "1M";
case "3", "2M" -> "2M";
case "4", "4M" -> "4M";
case "5", "8M" -> "8M";
case "6", "16M" -> "16M";
default -> blockSizeString;
};
}

View File

@@ -7,11 +7,10 @@ public class OflagHandler {
public static String mapOflagHandle(String input) {
return switch (input) {
case "1" -> "direct";
case "2" -> "dsync";
case "3" -> "sync";
case "4" -> "nocache";
case "5" -> "direct";
case "1", "direct" -> "direct";
case "2", "dsync" -> "dsync";
case "3", "sync" -> "sync";
case "4", "nocache" -> "nocache";
default -> oflagHandleString;
};
}