Stage 1 boot loader: Load the first file matching haiku_loader*
This allows naming the boot loader package canoncically. Due to code size limitations we cannot perform a more correct name check, but there shouldn't be any other entries in the packages directory with a name with "haiku_loader" prefix, anyway.
This commit is contained in:
@@ -647,7 +647,8 @@ kErrorString db "Failed to load OS. Press any key to reboot..."
|
||||
kPathComponents:
|
||||
pathComponent "system"
|
||||
pathComponent "packages"
|
||||
pathComponent "haiku_loader.hpkg"
|
||||
kLastPathComponent:
|
||||
pathComponent "haiku_loader"
|
||||
db 0
|
||||
|
||||
|
||||
@@ -882,10 +883,19 @@ continueMain:
|
||||
push bp
|
||||
sub bp, dx
|
||||
|
||||
; Compare the key length. For the last component we only want to check
|
||||
; whether the prefix matches.
|
||||
cmp cx, bp
|
||||
jg .skip_key
|
||||
|
||||
cmp di, kLastPathComponent + 1
|
||||
je .compare_keys
|
||||
|
||||
cmp cx, bp
|
||||
jne .skip_key
|
||||
|
||||
; compare path component (di) with key (si), length cx (== bp)
|
||||
; compare path component (di) with key (si), length cx (<= bp)
|
||||
.compare_keys:
|
||||
pusha
|
||||
repe cmpsb
|
||||
popa
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user