From the submitted patch :
The kernel with USERCONFIG_BOOT and VISUAL_USERCONFIG option presents the user the kernel configuration menu upon boot. The user can navigate the menu with cursor keys. I think it would be nice if the user can navigate and select a menu item with regular keys as well, so that the user who is using a serial console which is not so capable of esc sequences still can choose a menu item. With the following patch we can select an item by typing an item number, 1, 2, or 3, or mnemonic `s' to skip UserConfig, 'v' to enter the visual mode, and `c' to start the CLI mode. `p', `u', `n', and `d' will move cursor up and down. Submitted by: yokota
This commit is contained in:
parent
0a4476a7fb
commit
fca71c8053
@ -46,7 +46,7 @@
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
** $Id: userconfig.c,v 1.84 1997/03/11 07:11:46 msmith Exp $
|
||||
** $Id: userconfig.c,v 1.85 1997/03/13 18:03:47 joerg Exp $
|
||||
**/
|
||||
|
||||
/**
|
||||
@ -2358,7 +2358,7 @@ visuserconfig(void)
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: userconfig.c,v 1.84 1997/03/11 07:11:46 msmith Exp $
|
||||
* $Id: userconfig.c,v 1.85 1997/03/13 18:03:47 joerg Exp $
|
||||
*/
|
||||
|
||||
#include "scbus.h"
|
||||
@ -2835,6 +2835,38 @@ introfunc(CmdParm *parms)
|
||||
clear();
|
||||
return 1; /* user requests exit */
|
||||
|
||||
case '1': /* select an item */
|
||||
case 'S':
|
||||
case 's':
|
||||
curr_item = 0;
|
||||
break;
|
||||
case '2':
|
||||
case 'V':
|
||||
case 'v':
|
||||
curr_item = 1;
|
||||
break;
|
||||
case '3':
|
||||
case 'C':
|
||||
case 'c':
|
||||
curr_item = 2;
|
||||
break;
|
||||
|
||||
case 'U': /* up */
|
||||
case 'u':
|
||||
case 'P':
|
||||
case 'p':
|
||||
if (curr_item > 0)
|
||||
--curr_item;
|
||||
break;
|
||||
|
||||
case 'D': /* down */
|
||||
case 'd':
|
||||
case 'N':
|
||||
case 'n':
|
||||
if (curr_item < 2)
|
||||
++curr_item;
|
||||
break;
|
||||
|
||||
case '\r':
|
||||
case '\n':
|
||||
clear();
|
||||
|
Loading…
Reference in New Issue
Block a user