3 #include <exec/types.h>
6 #define SH_GLOBAL_DOSBASE TRUE
7 #include <aros/shcommands.h>
12 AROS_SHA(STRPTR
, , DRIVE
, /K
/A
, NULL
),
13 AROS_SHA(STRPTR
, , NAME
, /K
/A
, NULL
),
14 AROS_SHA(BOOL
, , FORCE
, /S
, FALSE
),
15 AROS_SHA(BOOL
, , QUIET
, /S
, FALSE
)
22 if (SHArg(QUIET
) && !SHArg(FORCE
))
24 PutStr("ERROR: Cannot specify QUIET without FORCE.\n");
30 Printf("About to format drive %s. ", SHArg(DRIVE
));
31 Printf("This will destroy all data on the drive!\n");
32 Printf("Are you sure? (y/N)"); Flush(Output());
34 Read(Input(), &choice
, 1);
41 if (choice
== 'y' || choice
== 'Y')
45 Printf("Formatting...");
49 if (Inhibit(SHArg(DRIVE
), DOSTRUE
))
51 if (Format(SHArg(DRIVE
), SHArg(NAME
), ID_FFS_DISK
))
53 if (!SHArg(QUIET
)) Printf("done\n");
59 Inhibit(SHArg(DRIVE
), DOSFALSE
);
70 if (!SHArg(QUIET
)) Printf("ERROR!\n");