Esempio n. 1
0
File: file.c Progetto: mslusarz/nvml
/*
 * util_unlink -- unlinks a file or zeroes a device dax
 */
int
util_unlink(const char *path)
{
	if (util_file_is_device_dax(path)) {
		return util_file_zero_whole(path);
	} else {
		return unlink(path);
	}
}
Esempio n. 2
0
File: file.c Progetto: ChandKV/nvml
/*
 * util_unlink -- unlinks a file or zeroes a device dax
 */
int
util_unlink(const char *path)
{
	if (util_file_is_device_dax(path)) {
		return util_file_zero_whole(path);
	} else {
/*
 * On Windows we can not unlink Read-Only files
 */
#ifdef _WIN32
		_chmod(path, _S_IREAD | _S_IWRITE);
#endif
		return unlink(path);
	}
}