mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 17:59:25 +01:00
client: check mkdir return in display_init
Printing a warning is about all that we can do at this point during initialization.
This commit is contained in:
parent
3f1cd5a596
commit
17ba7e415b
@ -681,6 +681,7 @@ void display_init(void)
|
||||
{
|
||||
const char *data_home;
|
||||
char *data_path;
|
||||
int ret;
|
||||
|
||||
display_refresh.redo_entries = l_queue_new();
|
||||
|
||||
@ -701,7 +702,12 @@ void display_init(void)
|
||||
}
|
||||
|
||||
if (data_path) {
|
||||
mkdir(data_path, 0700);
|
||||
ret = mkdir(data_path, 0700);
|
||||
/* Not much can be done since display isn't even initialized */
|
||||
if (L_WARN_ON(ret < 0)) {
|
||||
l_free(data_path);
|
||||
return;
|
||||
}
|
||||
|
||||
history_path = l_strdup_printf("%s/history", data_path);
|
||||
read_history(history_path);
|
||||
|
Loading…
Reference in New Issue
Block a user