mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
hotspot: Use storage_get_hotspot_path to get storage directory
This commit is contained in:
parent
8706be6698
commit
58d5fdf6c4
@ -40,7 +40,6 @@
|
||||
#include "src/storage.h"
|
||||
|
||||
static struct l_dir_watch *hs20_dir_watch;
|
||||
static const char *hs20_dir = DAEMON_STORAGEDIR "/hotspot";
|
||||
static struct l_queue *hs20_settings;
|
||||
|
||||
struct hs20_config {
|
||||
@ -354,7 +353,7 @@ static void hs20_dir_watch_cb(const char *filename,
|
||||
if (!filename)
|
||||
return;
|
||||
|
||||
full_path = l_strdup_printf("%s/%s", hs20_dir, filename);
|
||||
full_path = storage_get_hotspot_path("%s", filename);
|
||||
|
||||
switch (event) {
|
||||
case L_DIR_WATCH_EVENT_CREATED:
|
||||
@ -438,6 +437,8 @@ static int hotspot_init(void)
|
||||
DIR *dir;
|
||||
struct dirent *dirent;
|
||||
|
||||
L_AUTO_FREE_VAR(char *, hs20_dir) = storage_get_hotspot_path(NULL);
|
||||
|
||||
dir = opendir(hs20_dir);
|
||||
if (!dir)
|
||||
return -ENOENT;
|
||||
|
Loading…
Reference in New Issue
Block a user