summaryrefslogtreecommitdiff
path: root/usr/src/boot
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/boot')
-rw-r--r--usr/src/boot/Makefile.version2
-rw-r--r--usr/src/boot/lib/libstand/zfs/zfs.c21
-rw-r--r--usr/src/boot/sys/boot/forth/menu.4th18
3 files changed, 23 insertions, 18 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version
index 164e3416ec..7b173d0d47 100644
--- a/usr/src/boot/Makefile.version
+++ b/usr/src/boot/Makefile.version
@@ -33,4 +33,4 @@ LOADER_VERSION = 1.1
# Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes.
# The version is processed from left to right, the version number can only
# be increased.
-BOOT_VERSION = $(LOADER_VERSION)-2020.03.19.1
+BOOT_VERSION = $(LOADER_VERSION)-2020.05.09.1
diff --git a/usr/src/boot/lib/libstand/zfs/zfs.c b/usr/src/boot/lib/libstand/zfs/zfs.c
index 665d0b4a48..34c1b7c23e 100644
--- a/usr/src/boot/lib/libstand/zfs/zfs.c
+++ b/usr/src/boot/lib/libstand/zfs/zfs.c
@@ -401,7 +401,7 @@ vdev_read(vdev_t *vdev __unused, void *priv, off_t offset, void *buf,
full_sec_size -= secsz;
/* Return of partial sector data requires a bounce buffer. */
- if ((head > 0) || do_tail_read) {
+ if ((head > 0) || do_tail_read || bytes < secsz) {
bouncebuf = malloc(secsz);
if (bouncebuf == NULL) {
printf("vdev_read: out of memory\n");
@@ -427,12 +427,21 @@ vdev_read(vdev_t *vdev __unused, void *priv, off_t offset, void *buf,
/* Full data return from read sectors */
if (full_sec_size > 0) {
- res = read(fd, outbuf, full_sec_size);
- if (res != full_sec_size) {
- ret = EIO;
- goto error;
+ if (bytes < full_sec_size) {
+ res = read(fd, bouncebuf, secsz);
+ if (res != secsz) {
+ ret = EIO;
+ goto error;
+ }
+ memcpy(outbuf, bouncebuf, bytes);
+ } else {
+ res = read(fd, outbuf, full_sec_size);
+ if (res != full_sec_size) {
+ ret = EIO;
+ goto error;
+ }
+ outbuf += full_sec_size;
}
- outbuf += full_sec_size;
}
/* Partial data return from last sector */
diff --git a/usr/src/boot/sys/boot/forth/menu.4th b/usr/src/boot/sys/boot/forth/menu.4th
index 73a7cd44f9..262fd5ca03 100644
--- a/usr/src/boot/sys/boot/forth/menu.4th
+++ b/usr/src/boot/sys/boot/forth/menu.4th
@@ -571,8 +571,7 @@ also menu-infrastructure definitions
\
: menu-timeout-update ( N -- )
- \ Enforce minimum/maximum
- dup 9 > if drop 9 then
+ \ Enforce minimum
dup 0 < if drop 0 then
s" headnode" getenv? if
@@ -585,16 +584,13 @@ also menu-infrastructure definitions
s" Autoboot in N seconds. [Space] to pause" ( n -- n c-addr/u )
then
- 2 pick 0> if
- rot 48 + -rot ( n c-addr/u -- n' c-addr/u ) \ convert to ASCII
- 12 +c! ( n' c-addr/u -- c-addr/u ) \ replace 'N' above
-
- menu_timeout_x @ menu_timeout_y @ at-xy \ position cursor
- type ( c-addr/u -- ) \ print message
+ dup 0> if
+ s" Autoboot in " type
+ dup . s" second" type
+ 1 > if [char] s emit then
+ s" . [Space] to pause " type
else
- menu_timeout_x @ menu_timeout_y @ at-xy \ position cursor
- spaces ( n c-addr/u -- n c-addr ) \ erase message
- 2drop ( n c-addr -- )
+ drop 40 spaces \ erase message
then
at-bl