aboutsummaryrefslogtreecommitdiff
path: root/slof/fs/base.fs
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2012-02-01 10:36:12 +0100
committerThomas Huth <thuth@linux.vnet.ibm.com>2012-02-14 09:01:46 +0100
commit2eed580261248f900571cab1d1f0c14c3ccc233a (patch)
treeb58f784498e67098910f156792ffabe3ac47b7c8 /slof/fs/base.fs
parent0bede83ced7963a1732b72f77bd2850bcdfa064e (diff)
downloadSLOF-2eed580261248f900571cab1d1f0c14c3ccc233a.zip
SLOF-2eed580261248f900571cab1d1f0c14c3ccc233a.tar.gz
SLOF-2eed580261248f900571cab1d1f0c14c3ccc233a.tar.bz2
Fixed disk-label partition parsing to also work with single partition arguments
The parse-partition function was not able to deal with arguments that only contained a partition number (without comma), e.g. "boot disk:1" failed. Also limited the size that we load from a PReP partition in case the hard disk is smaller than max-prep-partition-blocks. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'slof/fs/base.fs')
-rw-r--r--slof/fs/base.fs4
1 files changed, 4 insertions, 0 deletions
diff --git a/slof/fs/base.fs b/slof/fs/base.fs
index 4bd0b4d..da990f3 100644
--- a/slof/fs/base.fs
+++ b/slof/fs/base.fs
@@ -156,6 +156,10 @@ CONSTANT <2constant>
\ Duplicate string and replace \ with /
: \-to-/ ( str len -- str' len ) strdup 2dup [char] \ [char] / replace-char ;
+: isdigit ( char -- true | false )
+ 30 39 between
+;
+
: // dup >r 1- + r> / ; \ division, round up
: c@+ ( adr -- c adr' ) dup c@ swap char+ ;