New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / dos / relabel.c
blob1d3ece279f277c18023c8d985547b31a2d35f205
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
8 #include <proto/exec.h>
10 #include "dos_intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/dos.h>
17 AROS_LH2(LONG, Relabel,
19 /* SYNOPSIS */
20 AROS_LHA(CONST_STRPTR, drive, D1),
21 AROS_LHA(CONST_STRPTR, newname, D2),
23 /* LOCATION */
24 struct DosLibrary *, DOSBase, 120, Dos)
26 /* FUNCTION
28 Change names of a volume.
30 INPUTS
32 drive -- The name of the device to rename (including the ':').
33 newname -- The new name for the device (without the ':').
35 RESULT
37 A boolean telling whether the name change was successful or not.
39 NOTES
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
52 AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
54 struct IOFileSys iofs;
56 /* Prepare I/O request. */
57 InitIOFS(&iofs, FSA_RELABEL, DOSBase);
59 iofs.IOFS.io_Device = GetDevice(drive, &iofs.IOFS.io_Unit, DOSBase);
61 if(iofs.IOFS.io_Device == NULL)
63 return DOSFALSE;
66 iofs.io_Union.io_RELABEL.io_NewName = newname;
67 iofs.io_Union.io_RELABEL.io_Result = FALSE;
69 DosDoIO(&iofs.IOFS);
71 SetIoErr(iofs.io_DosError);
73 if(iofs.io_DosError != 0)
75 return DOSFALSE;
78 return iofs.io_Union.io_RELABEL.io_Result ? DOSTRUE : DOSFALSE;
80 AROS_LIBFUNC_EXIT
81 } /* Relabel */