Use more appropriate types for pt_regs struct, e.g. 16-bit types for 16-bit
[cake.git] / rom / dos / info.c
blob69bb4c9fb6afa4df82ed7de5f79064da3eb5dd41
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 */
16 #include <proto/dos.h>
17 #include <dos/filesystem.h>
19 AROS_LH2(BOOL, Info,
21 /* SYNOPSIS */
22 AROS_LHA(BPTR , lock, D1),
23 AROS_LHA(struct InfoData *, parameterBlock, D2),
25 /* LOCATION */
26 struct DosLibrary *, DOSBase, 19, Dos)
28 /* FUNCTION
30 Get information about a volume in the system.
32 INPUTS
34 lock -- a lock on any file on the volume for which information
35 should be supplied
36 parameterBlock -- pointer to an InfoData structure
38 RESULT
40 Boolean indicating success or failure. If TRUE (success) the
41 'parameterBlock' is filled with information on the volume.
43 NOTES
45 EXAMPLE
47 BUGS
49 SEE ALSO
51 <dos/dos.h>
53 INTERNALS
55 *****************************************************************************/
57 AROS_LIBFUNC_INIT
59 struct IOFileSys iofs;
60 struct FileHandle *fh = (struct FileHandle *)BADDR(lock);
62 /* Prepare I/O request. */
63 InitIOFS(&iofs, FSA_DISK_INFO, DOSBase);
65 iofs.IOFS.io_Device = fh->fh_Device;
66 iofs.IOFS.io_Unit = fh->fh_Unit;
68 iofs.io_Union.io_INFO.io_Info = parameterBlock;
70 DosDoIO(&iofs.IOFS);
72 SetIoErr(iofs.io_DosError);
74 if (iofs.io_DosError != 0)
76 return DOSFALSE;
79 return DOSTRUE;
81 AROS_LIBFUNC_EXIT
82 } /* Info */