Added kernel module for starting the usb stack at boot time. It's not activated thoug...
[cake.git] / rom / dos / setowner.c
blob8db200dd2899fbb5a598c429a139d59c646eb4f1
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Set the owner of a file.
6 Lang: English
7 */
8 #include <proto/exec.h>
9 #include <dos/dosextens.h>
10 #include <dos/filesystem.h>
11 #include <proto/dos.h>
12 #include "dos_intern.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/dos.h>
19 AROS_LH2(BOOL, SetOwner,
21 /* SYNOPSIS */
22 AROS_LHA(STRPTR, name, D1),
23 AROS_LHA(ULONG, owner_info, D2),
25 /* LOCATION */
26 struct DosLibrary *, DOSBase, 166, Dos)
28 /* FUNCTION
30 INPUTS
31 name -- name of the file
32 owner_info -- (UID << 16) + GID
34 RESULT
35 != 0 if all went well, 0 else. IoErr() gives additional
36 information in that case.
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 /* Get pointer to I/O request. Use stackspace for now. */
53 struct IOFileSys iofs;
55 /* Prepare I/O request. */
56 InitIOFS(&iofs, FSA_SET_OWNER, DOSBase);
58 iofs.io_Union.io_SET_OWNER.io_UID = owner_info >> 16;
59 iofs.io_Union.io_SET_OWNER.io_GID = owner_info & 0xffff;
61 return DoIOFS(&iofs, NULL, name, DOSBase) == 0;
63 AROS_LIBFUNC_EXIT
64 } /* SetOwner */