storage: Add storage_network_remove

This commit is contained in:
Andrew Zaborowski 2016-06-07 05:29:59 +02:00 committed by Denis Kenzior
parent 8be78588e2
commit ab15413294
2 changed files with 13 additions and 0 deletions

View File

@ -265,3 +265,15 @@ void storage_network_sync(const char *type, const char *ssid,
l_free(data);
l_free(path);
}
int storage_network_remove(const char *type, const char *ssid)
{
char *path;
int ret;
path = get_network_file_path(type, ssid);
ret = unlink(path);
l_free(path);
return ret < 0 ? -errno : 0;
}

View File

@ -36,3 +36,4 @@ int storage_network_get_mtime(const char *type, const char *ssid,
struct timespec *mtim);
void storage_network_sync(const char *type, const char *ssid,
struct l_settings *settings);
int storage_network_remove(const char *type, const char *ssid);