mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 11:52:34 +01:00
storage: Add storage_network_remove
This commit is contained in:
parent
8be78588e2
commit
ab15413294
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user