From 2c076c4c95a8d9f5b67145966c1a7d35d17ccdc1 Mon Sep 17 00:00:00 2001 From: Cametendo Date: Wed, 18 Mar 2026 23:03:35 +0100 Subject: [PATCH] Added oflag --- FilePathAdd.java | 4 ++-- Flasher.java | 11 +++++++++++ Main.java | 2 ++ OflagHandler.java | 28 ++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 Flasher.java create mode 100644 OflagHandler.java diff --git a/FilePathAdd.java b/FilePathAdd.java index fc8d79c..a39679e 100644 --- a/FilePathAdd.java +++ b/FilePathAdd.java @@ -3,7 +3,7 @@ import java.util.Scanner; public class FilePathAdd { public static void filePath(Scanner UserInput) { System.out.println("Please enter the FULL Path of your ISO / Image. ()"); - String Path = UserInput.nextLine(); - System.out.println("Using File: " + Path); + String ImagePath = UserInput.nextLine(); + System.out.println("Using File: " + ImagePath); } } diff --git a/Flasher.java b/Flasher.java new file mode 100644 index 0000000..352ba71 --- /dev/null +++ b/Flasher.java @@ -0,0 +1,11 @@ +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Scanner; + +public class Flasher { + publicstatic voic flasher(Scanner UserInput) { + System.out.println("The programm wil use the following configuration, do you want to flash with this? (y/n)"); + System.out.println(" - To be flashed device: " + device); + } +} diff --git a/Main.java b/Main.java index 18a79c7..4196f85 100644 --- a/Main.java +++ b/Main.java @@ -15,6 +15,8 @@ public class Main { } StorageDeviceLister.deviceList(UserInput); FilePathAdd.filePath(UserInput); + BlockSize.blockSize(UserInput); + OflagHandler.handleOflag(UserInput); diff --git a/OflagHandler.java b/OflagHandler.java new file mode 100644 index 0000000..8edb483 --- /dev/null +++ b/OflagHandler.java @@ -0,0 +1,28 @@ +import java.util.Scanner; + +public class OflagHandler { + public static void handleOflag(Scanner UserInput) { + System.out.println("Okay, next up please define your oflag. If you have the block-size default, you can choose default here aswell"); + System.out.println("Available flags: direct (default), dsync, sync, nocache"); + String oflagHandleInput = UserInput.nextLine(); + + String oflagHandleString; + switch (oflagHandleInput) { + case "1": + oflagHandleString = "direct"; + break; + case "2": + oflagHandleString = "dsync"; + break; + case "3": + oflagHandleString = "sync"; + break; + case "4": + oflagHandleString = "nocache"; + break; + default: + oflagHandleString = "direct"; + break; + } + } +}