Subject: Re: halting without a console keyboard
To: Brook Milligan <brook@biology.nmsu.edu>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 05/25/2000 22:53:24
On Thu, May 25, 2000 at 02:33:40PM -0600, Brook Milligan wrote:
> [...]
>    Maybe what you really need is a serial console ?
> 
> I have one serial port that must be used for other purposes.
> Otherwise, this would be an option.  Or, can the serial console use
> the same device as a "normal" serial line, i.e., for a modem or mouse
> or whatever?  I figured that was too wacko to work.

I'm not sure this can work. 

> 
> My best idea so far is the following patch:
> 
> --- machdep.c.orig      Fri Feb  4 16:09:35 2000
> +++ machdep.c   Thu May 25 12:44:36 2000
> @@ -1375,10 +1375,15 @@
>         if (howto & RB_HALT) {
>                 printf("\n");
>                 printf("The operating system has halted.\n");
> +#if (NPC > 0) && (NPCCONSKBD > 0)
>                 printf("Please press any key to reboot.\n\n");
>                 cnpollc(1);     /* for proper keyboard command handling */
>                 cngetc();
>                 cnpollc(0);
> +#else
> +               for(;;) ;
> +               /* NOT REACHED */
> +#endif
>         }
>  
>         printf("rebooting...\n");
> 
> Is this a bad idea?  Any other ideas?

Hum, for your problem I'm not sure there's a better solution.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--