diff options
author | simon <simon@FreeBSD.org> | 2007-12-27 12:17:45 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2007-12-27 12:17:45 +0000 |
commit | 78bebd3368c125b3a09762078e6ce35dc4e930b0 (patch) | |
tree | bc112a50c9ba1f32eb600b2a09f3045af1dcac20 /tools/tools | |
parent | bfe0587252c9f57b566045b88192c0df363b9e44 (diff) | |
download | FreeBSD-src-78bebd3368c125b3a09762078e6ce35dc4e930b0.zip FreeBSD-src-78bebd3368c125b3a09762078e6ce35dc4e930b0.tar.gz |
- Fix calculation of data slice size when NANO_DATASIZE=-1.
Due to a typo, setting NANO_DATASIZE=-1 resulted in the data slice
being the same size as entire image instead of the size of the
remaining space on the image.
- Fix detection of overcommit of the slices.
This fix mainly result in a nicer error than when newfs etc. tries to
write beyond the end of the disk image.
MFC after: 2 weeks
X-MFC after: RELENG_7 is open again
Diffstat (limited to 'tools/tools')
-rw-r--r-- | tools/tools/nanobsd/nanobsd.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index 1378861..e5e609e 100644 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -367,8 +367,8 @@ create_i386_diskimage ( ) ( # Data partition (if any) starts at cylinder boundary. if ($7 > 0) { print "p 4 165 " c, dsl * cs - } else if ($7 < 0 && $1 > $c) { - print "p 4 165 " c, $1 - $c + } else if ($7 < 0 && $1 > c) { + print "p 4 165 " c, $1 - c } else if ($1 < c) { print "Disk space overcommitted by", \ c - $1, "sectors" > "/dev/stderr" |