2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
9 #include <dos/dosextens.h>
10 #include <proto/exec.h>
11 #include <proto/nvdisk.h>
15 #include LC_LIBDEFS_FILE
17 /*****************************************************************************
20 #include <libraries/nonvolatile.h>
22 AROS_LH4(BOOL
, SetNVProtection
,
26 AROS_LHA(STRPTR
, appName
, A0
),
27 AROS_LHA(STRPTR
, itemName
, A1
),
28 AROS_LHA(LONG
, mask
, D2
),
29 AROS_LHA(BOOL
, killRequesters
, D1
),
33 struct Library
*, nvBase
, 11, Nonvolatile
)
37 Set the protection attributes for a nonvolatile item.
41 appName -- the application owning the item stored in nonvolatile
43 itemName -- the name of the item to change the protection of
44 mask -- the new protection status
46 killRequesters -- if TRUE no system requesters will be displayed during
47 the operation of this function
51 Success / failure indicator.
55 The only bit that should currently be used in the 'mask' is the DELETE bit.
63 GetNVList(), <libraries/nonvolatile.h>
67 ******************************************************************************/
72 struct Process
*me
= (struct Process
*)FindTask(NULL
);
73 APTR oldReq
= me
->pr_WindowPtr
;
76 if(appName
== NULL
|| itemName
== NULL
)
79 if(strpbrk(appName
, ":/") != NULL
||
80 strpbrk(itemName
, ":/") != NULL
)
84 me
->pr_WindowPtr
= (APTR
)-1;
86 result
= SetNVDProtection(appName
, itemName
, mask
);
89 me
->pr_WindowPtr
= oldReq
;
94 } /* SetNVProtection */