961 | | size_t length = strlcpy(path, "/boot/beos/system/add-ons/kernel/", |
962 | | sizeof(path)); |
963 | | strlcpy(path + length, name, strlen(image->name) |
964 | | + 1 + (suffix - name)); |
| 961 | KPath addonsKernelPath; |
| 962 | status_t status = find_directory(B_BEOS_ADDONS_DIRECTORY, gBootDevice, |
| 963 | false, addonsKernelPath.LockBuffer(), addonsKernelPath.BufferSize()); |
| 964 | if (status < B_OK) { |
| 965 | dprintf("register_preloaded_module_image: Failed when find_directory \"%s\"\n", |
| 966 | strerror(status)); |
| 967 | } else { |
| 968 | addonsKernelPath.UnlockBuffer(); |
| 969 | addonsKernelPath.Append("kernel/"); |
| 970 | size_t length = strlcpy(path, addonsKernelPath.Path(), sizeof(path)); |
| 971 | strlcpy(path + length, name, strlen(image->name) |
| 972 | + 1 + (suffix - name)); |