diff options
author | msmith <msmith@FreeBSD.org> | 1998-10-31 02:53:12 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1998-10-31 02:53:12 +0000 |
commit | 27a325f1057840588fa18b5c5bc897228707910b (patch) | |
tree | 19a93f1ae5b8adea2f1faee80d1c2160d917e50a /sys/boot/i386 | |
parent | e6108119c4a18c3dd11e5fda0bbd6b84a63a923f (diff) | |
download | FreeBSD-src-27a325f1057840588fa18b5c5bc897228707910b.zip FreeBSD-src-27a325f1057840588fa18b5c5bc897228707910b.tar.gz |
- Add a new command 'lsdev' to list devices which might be likely to host
filesystems.
- New 'help' command and data in the help.* files (not yet installed),
provides topic and subtopic help, indexes, etc.
- Don't crash if the user tries to set an invalid console. Be helpful
instead.
- Expand tabs (badly) on the i386 video console.
- Some minor cosmetic changes.
Diffstat (limited to 'sys/boot/i386')
-rw-r--r-- | sys/boot/i386/libi386/biosdisk.c | 24 | ||||
-rw-r--r-- | sys/boot/i386/libi386/vidconsole.c | 20 | ||||
-rw-r--r-- | sys/boot/i386/loader/help.i386 | 16 |
3 files changed, 52 insertions, 8 deletions
diff --git a/sys/boot/i386/libi386/biosdisk.c b/sys/boot/i386/libi386/biosdisk.c index 0248802..b4c7769 100644 --- a/sys/boot/i386/libi386/biosdisk.c +++ b/sys/boot/i386/libi386/biosdisk.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: biosdisk.c,v 1.14 1998/10/11 10:29:49 peter Exp $ + * $Id: biosdisk.c,v 1.15 1998/10/30 07:15:52 luoqi Exp $ */ /* @@ -105,6 +105,7 @@ static int bd_init(void); static int bd_strategy(void *devdata, int flag, daddr_t dblk, size_t size, void *buf, size_t *rsize); static int bd_open(struct open_file *f, ...); static int bd_close(struct open_file *f); +static void bd_print(int verbose); struct devsw biosdisk = { "disk", @@ -113,7 +114,8 @@ struct devsw biosdisk = { bd_strategy, bd_open, bd_close, - noioctl + noioctl, + bd_print }; static int bd_opendisk(struct open_disk **odp, struct i386_devdesc *dev); @@ -200,6 +202,24 @@ bd_int13probe(struct bdinfo *bd) } /* + * Print information about disks + */ +static void +bd_print(int verbose) +{ + int i; + char line[80]; + + for (i = 0; i < nbdinfo; i++) { + sprintf(line, " disk%d: BIOS drive %c:", i, + (bdinfo[i].bd_unit < 0x80) ? ('A' + bdinfo[i].bd_unit) : ('C' + bdinfo[i].bd_unit - 0x80)); + pager_output(line); + /* XXX more detail? */ + pager_output("\n"); + } +} + +/* * Attempt to open the disk described by (dev) for use by (f). * * Note that the philosophy here is "give them exactly what diff --git a/sys/boot/i386/libi386/vidconsole.c b/sys/boot/i386/libi386/vidconsole.c index 4b8c764..2f6b30b 100644 --- a/sys/boot/i386/libi386/vidconsole.c +++ b/sys/boot/i386/libi386/vidconsole.c @@ -26,7 +26,7 @@ * * From Id: probe_keyboard.c,v 1.13 1997/06/09 05:10:55 bde Exp * - * $Id: vidconsole.c,v 1.6 1998/10/11 10:07:52 peter Exp $ + * $Id: vidconsole.c,v 1.7 1998/10/28 19:24:15 msmith Exp $ */ #include <stand.h> @@ -92,11 +92,19 @@ vidc_init(int arg) static void vidc_putchar(int c) { - v86.ctl = 0; - v86.addr = 0x10; - v86.eax = 0xe00 | c; - v86.ebx = 0x7; - v86int(); + int i; + + if (c == '\t') { + /* lame tab expansion */ + for (i = 0; i < 8; i++) + vidc_putchar(' '); + } else { + v86.ctl = 0; + v86.addr = 0x10; + v86.eax = 0xe00 | c; + v86.ebx = 0x7; + v86int(); + } } static int diff --git a/sys/boot/i386/loader/help.i386 b/sys/boot/i386/loader/help.i386 new file mode 100644 index 0000000..2d2da43 --- /dev/null +++ b/sys/boot/i386/loader/help.i386 @@ -0,0 +1,16 @@ +################################################################################ +# Treboot DReboot the system + + reboot + + Causes the system to immediately reboot. + +################################################################################ +# Theap DDisplay memory management statistics + + heap + + Requests debugging output from the heap manager. For debugging use + only. + +################################################################################ |