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:
|
kPathComponents:
|
||||||
pathComponent "system"
|
pathComponent "system"
|
||||||
pathComponent "packages"
|
pathComponent "packages"
|
||||||
pathComponent "haiku_loader.hpkg"
|
kLastPathComponent:
|
||||||
|
pathComponent "haiku_loader"
|
||||||
db 0
|
db 0
|
||||||
|
|
||||||
|
|
||||||
@@ -882,10 +883,19 @@ continueMain:
|
|||||||
push bp
|
push bp
|
||||||
sub bp, dx
|
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
|
cmp cx, bp
|
||||||
jne .skip_key
|
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
|
pusha
|
||||||
repe cmpsb
|
repe cmpsb
|
||||||
popa
|
popa
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user