Fix port-acorn32/15850: machdep.booted_kernel on acorn32 is incorrect.
This has been on my TODO list for some time and i found it time to fix it since its pretty simple to do. The patch checks if the kernel is booted from the `UnixFS' RISC OS filing system (case unimportant) and if so interprets its name to get the unix file name the kernel has. If it doesn't see this prefix it will asume its just called `netbsd'
This commit is contained in:
parent
60219ba2a6
commit
6d18a99125
|
@ -1,5 +1,5 @@
|
|||
REM > BtNetBSD
|
||||
REM $NetBSD: BtNetBSD,v 1.3 2002/02/11 19:00:07 reinoud Exp $
|
||||
REM $NetBSD: BtNetBSD,v 1.4 2002/03/10 01:28:19 reinoud Exp $
|
||||
REM
|
||||
REM Copyright (c) 2000, 2001, 2002 Reinoud Zandijk
|
||||
REM Copyright (c) 1998, 1999, 2000 Ben Harris
|
||||
|
@ -78,6 +78,14 @@ REM get kernel name
|
|||
file$ = LEFT$(args$, INSTR(args$, " ")-1)
|
||||
PRINT"Booting ";file$;" ";args$''
|
||||
|
||||
|
||||
IF FNtolower(LEFT$(file$,9))="unixfs:$." THEN
|
||||
kernelname$=MID$(file$, 10)
|
||||
ELSE
|
||||
kernelname$="netbsd" : REM RISC OS file namen zeggen niets XXX
|
||||
ENDIF
|
||||
|
||||
|
||||
REM Get some space to mess with
|
||||
REM Declare a large array ... and then wipe it/map it in in the OS_Mem loop
|
||||
REM the difference is that RO4 won't map it in by default and
|
||||
|
@ -671,7 +679,7 @@ DEF PROCnew_configuration_structure
|
|||
; u_char machine_id[4]
|
||||
EQUD machineId%
|
||||
; char kernelname[80]
|
||||
EQUS LEFT$(file$+CHR$0+STRING$(80, " "), 80)
|
||||
EQUS LEFT$(kernelname$+CHR$0+STRING$(80, " "), 80)
|
||||
; char args[512]
|
||||
EQUS args$+CHR$0
|
||||
]: P% += 512 - LEN(args$+CHR$0): [ OPT opt%
|
||||
|
@ -810,7 +818,7 @@ DEF PROCold_configuration_structure
|
|||
;vrampages%
|
||||
EQUD totalvrampages%
|
||||
;kernelname%
|
||||
EQUS LEFT$(file$+CHR$0+STRING$(80, " "), 80)
|
||||
EQUS LEFT$(kernelname$+CHR$0+STRING$(80, " "), 80)
|
||||
;framerate%
|
||||
EQUD 56 ; XXXXX
|
||||
;machine_id%
|
||||
|
@ -1250,3 +1258,17 @@ DEF FNvdu_var(var%)
|
|||
|
||||
DEF FNroundup(val%, size%)
|
||||
=val% + (size% - 1) AND NOT (size% - 1)
|
||||
|
||||
|
||||
DEF FNtolower(name$)
|
||||
LOCAL A$, Ch$, i%
|
||||
FOR i%=1 TO LEN(name$)
|
||||
Ch$ = LEFT$(name$,1)
|
||||
IF Ch$>="A" AND Ch$<="Z" THEN
|
||||
A$ += CHR$(ASC(Ch$)+ASC("a")-ASC("A"))
|
||||
ELSE
|
||||
A$ += Ch$
|
||||
ENDIF
|
||||
name$ = MID$(name$, 2)
|
||||
NEXT
|
||||
= A$
|
||||
|
|
Loading…
Reference in New Issue