mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Use parse-nhex
Instead of reimplementing it several times use parse-nhex to decode two hex numbers, Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
committed by
Mark Cave-Ayland
parent
9711c61be4
commit
c967b4c947
@ -5,11 +5,7 @@ include config.fs
|
||||
\ -------------------------------------------------------------------------
|
||||
|
||||
: decode-unit-upa ( str len -- id lun )
|
||||
ascii , left-split
|
||||
( addr-R len-R addr-L len-L )
|
||||
parse-hex
|
||||
-rot parse-hex
|
||||
swap
|
||||
2 parse-nhex
|
||||
;
|
||||
|
||||
: encode-unit-upa ( id lun -- str len)
|
||||
|
||||
@ -3,11 +3,7 @@
|
||||
\ -------------------------------------------------------------------------
|
||||
|
||||
: decode-unit-scsi ( str len -- id lun )
|
||||
ascii , left-split
|
||||
( addr-R len-R addr-L len-L )
|
||||
parse-hex
|
||||
-rot parse-hex
|
||||
swap
|
||||
2 parse-nhex
|
||||
;
|
||||
|
||||
: encode-unit-scsi ( id lun -- str len)
|
||||
|
||||
@ -3,11 +3,7 @@
|
||||
\ -------------------------------------------------------------------------
|
||||
|
||||
: decode-unit-sbus ( str len -- id lun )
|
||||
ascii , left-split
|
||||
( addr-R len-R addr-L len-L )
|
||||
parse-hex
|
||||
-rot parse-hex
|
||||
swap
|
||||
2 parse-nhex
|
||||
;
|
||||
|
||||
: encode-unit-sbus ( id lun -- str len)
|
||||
|
||||
Reference in New Issue
Block a user