2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
13 #include "nvdisk_intern.h"
15 #include <proto/dos.h>
16 #include <libraries/nonvolatile.h>
19 AROS_LH3(BOOL
, SetNVDProtection
,
23 AROS_LHA(STRPTR
, appName
, A0
),
24 AROS_LHA(STRPTR
, itemName
, A1
),
25 AROS_LHA(LONG
, mask
, D0
),
29 struct Library
*, nvdBase
, 9, NVDisk
)
33 Protect an item saved in nonvolatile memory.
37 appName -- the application owning the item
38 itemName -- the item to protect
39 mask -- protection status to inflict
43 The memory item 'itemName' will be protected as specified by the 'mask'.
57 April 2000, SDuvan -- implemented
59 ******************************************************************************/
66 BPTR oldCDir
= CurrentDir(GPB(nvdBase
)->nvd_location
);
68 if((lock
= Lock(appName
, SHARED_LOCK
)) != BNULL
)
70 result
= SetProtection(itemName
, mask
) == DOSTRUE
? TRUE
: FALSE
;