diff --git a/src/add-ons/kernel/file_systems/userlandfs/shared/driver_settings.c b/src/add-ons/kernel/file_systems/userlandfs/shared/driver_settings.c
index f6adb54..82d2966 100644
a
|
b
|
|
6 | 6 | |
7 | 7 | |
8 | 8 | #include <OS.h> |
9 | | #include <directories.h> |
| 9 | #include <FindDirectory.h> |
10 | 10 | #include <driver_settings.h> |
11 | 11 | |
12 | 12 | #include <stdlib.h> |
… |
… |
strlcat(char *dst, char const *src, size_t s)
|
38 | 38 | return j + i + strlen(src + i); |
39 | 39 | } |
40 | 40 | |
41 | | #define SETTINGS_DIRECTORY kUserSettingsDirectory "/kernel/drivers/" |
42 | 41 | #define SETTINGS_MAGIC 'DrvS' |
43 | 42 | |
44 | 43 | // Those maximum values are independent from the implementation - they |
… |
… |
load_driver_settings(const char *driverName)
|
578 | 577 | { |
579 | 578 | char path[B_FILE_NAME_LENGTH + 64]; |
580 | 579 | |
581 | | // ToDo: use the kernel's find_directory for this |
582 | | strcpy(path, SETTINGS_DIRECTORY); |
| 580 | if (find_directory(B_USER_CONFIG_DIRECTORY, (dev_t)-1, false, |
| 581 | path, sizeof(path)) != B_OK) |
| 582 | return NULL; |
| 583 | strlcat(path, "/kernel/drivers/", sizeof(path)); |
583 | 584 | strlcat(path, driverName, sizeof(path)); |
584 | 585 | |
585 | 586 | file = open(path, O_RDONLY); |