2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
7 #include <proto/exec.h>
8 #include <dos/dosextens.h>
9 #include "dos_intern.h"
11 /*****************************************************************************
14 #include <proto/dos.h>
16 AROS_LH3(BOOL
, Format
,
19 AROS_LHA(CONST_STRPTR
, devicename
, D1
),
20 AROS_LHA(CONST_STRPTR
, volumename
, D2
),
21 AROS_LHA(ULONG
, dostype
, D3
),
24 struct DosLibrary
*, DOSBase
, 119, Dos
)
27 Initialise a filesystem for use by the system. This instructs
28 a filesystem to write out the data that it uses to describe the
31 The device should already have been formatted.
34 devicename - Name of the device to format.
35 volumename - The name you wish the volume to be called.
36 dostype - The DOS type you wish on the disk.
39 != 0 if the format was successful, 0 otherwise.
51 *****************************************************************************/
55 struct PacketHelperStruct phs
;
56 LONG status
= DOSFALSE
;
58 if (!getdevpacketinfo(DOSBase
, devicename
, volumename
, &phs
))
61 status
= dopacket2(DOSBase
, NULL
, phs
.port
, ACTION_FORMAT
, phs
.name
, (IPTR
)dostype
);
63 freepacketinfo(DOSBase
, &phs
);