diff options
Diffstat (limited to 'sys/boot/common/console.c')
| -rw-r--r-- | sys/boot/common/console.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/boot/common/console.c b/sys/boot/common/console.c index b9534d304030..8c4377f2bcd4 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); } |
