arch/ppc-sam440: No more need for the Parthenope hack
[AROS.git] / rom / dos / relabel.c
blobd7c84f6bc32ae43c5cac73a3a03d4a9b4b90415a
1 /*
2 Copyright © 1995-2007, 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
53 struct PacketHelperStruct phs;
54 LONG status = DOSFALSE;
56 if (!getdevpacketinfo(DOSBase, drive, newname, &phs))
57 return DOSFALSE;
59 status = dopacket1(DOSBase, NULL, phs.port, ACTION_RENAME_DISK, phs.name);
61 freepacketinfo(DOSBase, &phs);
63 return status;
65 AROS_LIBFUNC_EXIT
66 } /* Relabel */