From a9919c4e03ceadaa9f81818310dca91f9624d28c Mon Sep 17 00:00:00 2001 From: Tyler Dauwalder Date: Wed, 3 Dec 2003 08:44:26 +0000 Subject: [PATCH] Added blocksize, doudf, and doiso flags. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5550 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/bin/makeudfimage/Shell.cpp | 18 ++++++++++++++---- src/apps/bin/makeudfimage/Shell.h | 3 +++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/apps/bin/makeudfimage/Shell.cpp b/src/apps/bin/makeudfimage/Shell.cpp index 0758df8d43..6f5e2b0033 100644 --- a/src/apps/bin/makeudfimage/Shell.cpp +++ b/src/apps/bin/makeudfimage/Shell.cpp @@ -19,7 +19,12 @@ #include "UdfBuilder.h" Shell::Shell() + // The following settings are essentially default values + // for all the command-line options. : fVerbosityLevel(VERBOSITY_HIGH) + , fBlockSize(2048) + , fDoUdf(true) + , fDoIso(false) { } @@ -30,11 +35,16 @@ Shell::Run(int argc, char *argv[]) status_t error = _ProcessArguments(argc, argv); if (!error) { ConsoleListener listener(fVerbosityLevel); - UdfBuilder builder(listener); - builder.Build(); - } else { - _PrintHelp(); + UdfBuilder builder("./output.img", fBlockSize, fDoUdf, fDoIso, + listener); + error = builder.InitCheck(); + if (!error) + error = builder.Build(); } + + if (error) + _PrintHelp(); + RETURN(error); } diff --git a/src/apps/bin/makeudfimage/Shell.h b/src/apps/bin/makeudfimage/Shell.h index af638c7ab2..838844a070 100644 --- a/src/apps/bin/makeudfimage/Shell.h +++ b/src/apps/bin/makeudfimage/Shell.h @@ -27,6 +27,9 @@ private: void _PrintHelp(); VerbosityLevel fVerbosityLevel; + uint32 fBlockSize; + bool fDoUdf; + bool fDoIso; };