summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/console.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-10-31 02:53:12 +0000
committermsmith <msmith@FreeBSD.org>1998-10-31 02:53:12 +0000
commit27a325f1057840588fa18b5c5bc897228707910b (patch)
tree19a93f1ae5b8adea2f1faee80d1c2160d917e50a /sys/boot/common/console.c
parente6108119c4a18c3dd11e5fda0bbd6b84a63a923f (diff)
downloadFreeBSD-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/common/console.c')
-rw-r--r--sys/boot/common/console.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/boot/common/console.c b/sys/boot/common/console.c
index b9534d3..8c4377f 100644
--- a/sys/boot/common/console.c
+++ b/sys/boot/common/console.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: console.c,v 1.2 1998/09/26 01:29:13 msmith Exp $
+ * $Id: console.c,v 1.3 1998/10/11 10:19:11 peter Exp $
*/
#include <stand.h>
@@ -150,8 +150,12 @@ cons_set(struct env_var *ev, int flags, void *value)
{
int cons, active;
- if ((active = cons_find(value)) == -1) {
- printf("no such console '%s'\n", (char *)value);
+ if ((value == NULL) || ((active = cons_find(value)) == -1)) {
+ if (value != NULL)
+ printf("no such console '%s'\n", (char *)value);
+ printf("Available consoles:\n");
+ for (cons = 0; consoles[cons] != NULL; cons++)
+ printf(" %s\n", consoles[cons]->c_name);
return(CMD_ERROR);
}
OpenPOWER on IntegriCloud