2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
13 #include <aros/debug.h>
15 #include "nvdisk_intern.h"
18 #include <proto/dos.h>
19 #include <libraries/nonvolatile.h>
21 //static int cxbug; /* For cxref bug */
23 AROS_LH2(BOOL
, DeleteNVDData
,
27 AROS_LHA(STRPTR
, appName
, A0
),
28 AROS_LHA(STRPTR
, itemName
, A1
),
32 struct Library
*, nvdBase
, 7, NVDisk
)
36 Delete a piece of data in the nonvolatile memory.
40 appName -- the application owning the data to be deleted
41 itemName -- name of the data to be deleted
45 Success / failure indicator.
55 nonvolatile.library/DeleteNV()
61 November 2000, SDuvan -- implemented
63 ******************************************************************************/
68 BPTR oldCDir
= CurrentDir(GPB(nvdBase
)->nvd_location
);
69 BPTR lock
= Lock(appName
, SHARED_LOCK
);
72 D(bug("Entering DeleteData()"));
76 D(bug("Could not lock directory %s", appName
));
81 D(bug("Deleting file %s", itemName
));
85 retval
= DeleteFile(itemName
) == DOSTRUE
? TRUE
: FALSE
;