Listtree.mcc: implement MUIM_Listtree_Insert and MUIM_Listtree_GetEntry
[AROS.git] / rom / disk / allocunit.c
blob94917f55283c4d9bda38b41140316fa1b43adcd2
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: AllocUnit() function.
6 Lang: english
7 */
9 #include <proto/disk.h>
10 #include <resources/disk.h>
12 AROS_LH1(BOOL, AllocUnit,
13 AROS_LHA(LONG, unitNum, D0),
14 struct DiscResource *, DiskBase, 1, Disk)
16 AROS_LIBFUNC_INIT
18 if (DiskBase->dr_Flags & (1 << unitNum))
19 return 0;
20 DiskBase->dr_Flags |= 1 << unitNum;
21 return 1;
23 AROS_LIBFUNC_EXIT