mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
kernel/legacy_drivers: reverse order of search for kernel add-ons
* DirectoryIterator uses a stack to hold the paths values, pushed in SetTo(), then popped with GetNext(). So the path directories have to added in reverse order. * fix #17264 Change-Id: I728365f069071f109c79e647d6a33cd24f68ce0e Reviewed-on: https://review.haiku-os.org/c/haiku/+/8498 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
8cc3ed34bc
commit
89264cfe2e
@ -939,14 +939,12 @@ DirectoryIterator::SetTo(const char* path, const char* subPath, bool recursive)
|
||||
Unset();
|
||||
fRecursive = recursive;
|
||||
|
||||
const bool disableUserAddOns = get_safemode_boolean(B_SAFEMODE_DISABLE_USER_ADD_ONS, false);
|
||||
|
||||
if (path == NULL) {
|
||||
// add default paths
|
||||
// add default paths in reverse order as AddPath() will add on a stack
|
||||
KPath pathBuffer;
|
||||
|
||||
bool disableUserAddOns = get_safemode_boolean(
|
||||
B_SAFEMODE_DISABLE_USER_ADD_ONS, false);
|
||||
|
||||
for (uint32 i = 0; i < sizeof(kDriverPaths) / sizeof(kDriverPaths[0]); i++) {
|
||||
for (int32 i = B_COUNT_OF(kDriverPaths) - 1; i >= 0; i--) {
|
||||
if (i < 3 && disableUserAddOns)
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user