summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorrnordier <rnordier@FreeBSD.org>1998-10-27 20:16:36 +0000
committerrnordier <rnordier@FreeBSD.org>1998-10-27 20:16:36 +0000
commitb845950ce73ad092e7f34a40eff470655b7f7d20 (patch)
treece1231156e9492a073543d6a174eeefe6e7c0a68 /sys/boot
parent7850189506d53d2fbf87d074210e34e87393cebb (diff)
downloadFreeBSD-src-b845950ce73ad092e7f34a40eff470655b7f7d20.zip
FreeBSD-src-b845950ce73ad092e7f34a40eff470655b7f7d20.tar.gz
biosboot compatibility fix: change behavior of backspace in getstr().
Noticed by: abial Optimize away a few bytes to make space for the above.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/boot2/boot2.c10
-rw-r--r--sys/boot/i386/gptboot/gptboot.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c
index 6bc0437..03aa3b2 100644
--- a/sys/boot/i386/boot2/boot2.c
+++ b/sys/boot/i386/boot2/boot2.c
@@ -14,7 +14,7 @@
*/
/*
- * $Id: boot2.c,v 1.11 1998/10/17 10:35:15 rnordier Exp $
+ * $Id: boot2.c,v 1.12 1998/10/17 11:25:05 rnordier Exp $
*/
#include <sys/param.h>
@@ -485,7 +485,7 @@ fsread(ino_t inode, void *buf, size_t nbyte)
return -1;
}
fsblks = fs.fs_bsize >> DEV_BSHIFT;
- dsk.meta = 1;
+ dsk.meta++;
}
if (!inode)
return 0;
@@ -649,9 +649,11 @@ getstr(char *str, int size)
case 0:
break;
case '\b':
- if (s > str)
+ if (s > str) {
s--;
- else
+ putchar(c);
+ putchar(' ');
+ } else
c = 0;
break;
case '\n':
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index 6bc0437..03aa3b2 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -14,7 +14,7 @@
*/
/*
- * $Id: boot2.c,v 1.11 1998/10/17 10:35:15 rnordier Exp $
+ * $Id: boot2.c,v 1.12 1998/10/17 11:25:05 rnordier Exp $
*/
#include <sys/param.h>
@@ -485,7 +485,7 @@ fsread(ino_t inode, void *buf, size_t nbyte)
return -1;
}
fsblks = fs.fs_bsize >> DEV_BSHIFT;
- dsk.meta = 1;
+ dsk.meta++;
}
if (!inode)
return 0;
@@ -649,9 +649,11 @@ getstr(char *str, int size)
case 0:
break;
case '\b':
- if (s > str)
+ if (s > str) {
s--;
- else
+ putchar(c);
+ putchar(' ');
+ } else
c = 0;
break;
case '\n':
OpenPOWER on IntegriCloud