2 * Format -- disk formatting and file-system creation program
3 * Copyright (C) 1999 Ben Hutchings <womble@zzumbouk.demon.co.uk>
4 * Copyright (C) 2008 Pavel Fedin <sonic_amiga@rambler.ru>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #error "You need to use GNU CC to compile this."
27 #define HAVE_NEWRAWDOFMT
30 #define HAVE_NEWRAWDOFMT
34 #include <exec/types.h>
35 #ifdef HAVE_NEWRAWDOFMT
36 #include <exec/rawfmt.h>
42 #include <aros/debug.h>
43 #define _WBenchMsg WBenchMsg
45 #include <clib/debug_protos.h>
55 /* Maximum length of a name component - I can't find this defined anywhere */
56 #define MAX_FS_NAME_LEN 30
58 /* Short name for an unsigned 64-bit integer type */
59 typedef unsigned long long ULLONG
;
62 ertWarning
, /* Just a warning of some odd condition */
63 ertError
, /* Arguments were invalid or system configuration is wierd */
64 ertFailure
, /* Something failed, and we can't go on */
67 extern struct WBStartup
* _WBenchMsg
;
68 extern BPTR bpfhStdErr
;
69 extern char szDosDevice
[MAX_FS_NAME_LEN
+2];
70 extern char * pchDosDeviceColon
;
71 extern ULLONG ibyStart
, ibyEnd
;
72 extern IPTR MaxTransfer
;
73 extern IPTR LowCyl
, HighCyl
;
75 extern const char szVersion
[];
77 void ReportErrSz( ErrorType ert
, LONG err
, const char * pszMessage
, ... );
78 BOOL
bSetSzDosDeviceFromSz( const char * pszDevice
);
79 BOOL
bSetSzVolumeFromSz( const char * pszVolume
);
80 BOOL
bSetFstFromSz( const char * pszFileSysType
);
81 BOOL
bSetDevfFromSz( const char * pszDevFlags
);
82 BOOL
bGetDosDevice(struct DosList
*pdlList
, ULONG flags
);
83 void FreeDosDevice(void);
84 BOOL
bGetExecDevice( BOOL bWillVerify
);
85 void FreeExecDevice(void);
86 BOOL
bFormatCylinder( ULONG icyl
);
87 BOOL
bVerifyCylinder( ULONG icyl
);
88 BOOL
bMakeFileSys( BOOL bFFS
, BOOL bOFS
, BOOL bIntl
, BOOL bNoIntl
,
89 BOOL bDirCache
, BOOL bNoDirCache
);
90 BOOL
bMakeFiles( BOOL bDiskIcon
);
95 #ifdef HAVE_NEWRAWDOFMT
96 #define RawDoFmtSz(pszBuffer, pszFormat, args...) NewRawDoFmt(pszFormat, RAWFMTFUNC_STRING, pszBuffer, args)
97 #define RawDoVFmtSz(pszBuffer, pszFormat, pData) VNewRawDoFmt(pszFormat, RAWFMTFUNC_STRING, pszBuffer, pData)
99 void RawDoFmtSz( char * pszBuffer
, const char * pszFormat
, ... );
100 void RawDoVFmtSz( char * pszBuffer
, const char * pszFormat
, va_list pData
);