2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
5 #include <dos/dosextens.h>
6 #include <exec/memory.h>
7 #include <proto/exec.h>
8 #include <proto/nvdisk.h>
10 #include LC_LIBDEFS_FILE
12 /*****************************************************************************
15 #include <libraries/nonvolatile.h>
17 AROS_LH1(struct NVInfo
*, GetNVInfo
,
21 AROS_LHA(BOOL
, killRequesters
, D1
),
25 struct Library
*, nvBase
, 9, Nonvolatile
)
29 Report information on the user's preferred nonvolatile storage device.
33 killRequesters -- if TRUE no system requesters will be displayed during
34 the operation of this function
38 Pointer to an NVInfo structure containing the information on the nonvolatile
39 storage device currently in use. Returns NULL in case of a failure.
49 FreeNVData(), StoreNV(), <libraries/nonvolatile.h>
53 ******************************************************************************/
58 struct Process
*me
= (struct Process
*)FindTask(NULL
);
59 APTR oldReq
= me
->pr_WindowPtr
;
62 info
= AllocVec(sizeof(struct NVInfo
), MEMF_ANY
);
67 me
->pr_WindowPtr
= (APTR
)-1;
69 /* Try to get the information from the HIDD */
72 /* Round down to nearest 10 bytes */
73 info
->nvi_MaxStorage
= (info
->nvi_MaxStorage
/10)*10;
74 info
->nvi_FreeStorage
= (info
->nvi_FreeStorage
/10)*10;
83 me
->pr_WindowPtr
= oldReq
;