start service tasks separately in-case platforms need to perform additional set-up...
[AROS.git] / rom / dos / relabel.c
blobffedc667447d9f39a4e63943c79663e7723ddd6e
1 /*
2 Copyright © 1995-2013, 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
27 Change names of a volume.
29 INPUTS
30 drive - The name of the device to rename (including the ':').
31 newname - The new name for the device (without the ':').
33 RESULT
34 A boolean telling whether the name change was successful or not.
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 *****************************************************************************/
48 AROS_LIBFUNC_INIT
50 struct PacketHelperStruct phs;
51 LONG status = DOSFALSE;
53 if (!getdevpacketinfo(DOSBase, drive, newname, &phs))
54 return DOSFALSE;
56 status = dopacket1(DOSBase, NULL, phs.port, ACTION_RENAME_DISK, phs.name);
58 freepacketinfo(DOSBase, &phs);
60 return status;
62 AROS_LIBFUNC_EXIT
63 } /* Relabel */