Hi!
First: Thanx for 1.6.1. It's really nice. I even tried TCP/IP package, and
it quite works to my big surprise.
And now, usual set of bugreports, questions, etc:
* Seems like process #1 (usually cons) disappears from ps listing after some
time of heavy activity. (Try rebuilding whole sources.) It is also no longer in
/proc filesystem.
* telnetd does not work too well for me. 'plain' version justed printed login
banner and existed immediately, with comment 'IO server: all clients done' in
syslog. After I patched (nrefs<1) to (nrefs<0), I can log in and work, but it
will not disconnect at the end.
* I have made 'blinkedlights' extension to uKernel: it now displays current
PID of process and CPU busy state on debugging LEDs attached to printer port.
If anyone has similar hardware, PLEASE let me know
* Question: What are reasons behind having processes organized in tree? I have
thought about putting part of scheduler outside of microkernel (making uKernel
capable only of strictly-prioritive scheduler, and external daemon, which
would play with process's priorities based on how much they run). Is there way
to see tree structure of processes in ps?
* ps tries to show some kind of times with each process. This times look like
min:sec, but they are not. They are running much faster. What is that?
* here is patch for srv/mach/cons2/isr.c - it makes 'Meta' key work, so
Alt+letters have good meanings. (Console is unusable for me without this).
It also simplifies handling of F1, F2, ... keys.
* printink 'feel free to hit reset button' on attempt to reboot is
bad think (tm), because user has to go and push reset button
himself. On the end, I append simple program to reset machine. I think
that this should be put in place of reboot script
Keep hacking,
Pavel
--- isrpmk.c Sun Jan 4 00:24:34 1998 GMT
+++ isr.c Sun Jan 4 13:26:54 1998 GMT
@@ -13,6 +13,9 @@
capstoggle = 0, /* For toggling effect of CAPS */
numtoggle = 0, /* ...NUM lock */
isE0 = 0; /* Prefix for extended keys (FN1, etc.) */
+
+#define C( x ) x & 0x1f /* Turn key into ctrl-one */
+#define M( x ) x | 0x80 /* Turn key into meta key, do not use for 0 */
/* Map scan codes to ASCII, one table for normal, one for shifted */
static char normal[] = {
@@ -83,11 +86,19 @@
#endif
/*
+ * Meta keys are badly needed - if Alt is pressed,
+ * it sends ESC before actual character.
+ */
+
+ if (alt || (ch&0x80))
+ kbd_enqueue(s, 033);
+
+ /*
* Hand off straight data now. The keyboard always enters
* data for the virtual screen currently being displayed
* on the hardware screen.
*/
- kbd_enqueue(s, ch);
+ kbd_enqueue(s, ch&0x7f);
}
/*
@@ -171,48 +185,15 @@
static int
function_key(struct screen *s, uchar c)
{
- char *p;
+ char p[4];
- switch (c) {
- case 59: /* F1 */
- p = "\033OP";
- break;
- case 60: /* F2 */
- p = "\033OQ";
- break;
- case 61: /* F3 */
- p = "\033OR";
- break;
- case 62: /* F4 */
- p = "\033OS";
- break;
- case 63: /* F5 */
- p = "\033OT";
- break;
- case 64: /* F6 */
- p = "\033OU";
- break;
- case 65: /* F7 */
- p = "\033OV";
- break;
- case 66: /* F8 */
- p = "\033OW";
- break;
- case 67: /* F9 */
- p = "\033OX";
- break;
- case 68: /* F10 */
- case 87: /* F11 */
- case 88: /* F12 */
- p = 0;
- break;
- default:
- return 0;
- }
- if (p) {
- enqueue_string(s, p);
- }
- return(1);
+ if ((c<59) || (c>68)) return 0;
+ p[0] = '\033';
+ p[1] = 'Q';
+ p[2] = 'P'+c-59;
+ p[3] = 0;
+ enqueue_string(s, p);
+ return 1;
}
/*
Reboot program:
/*
* reboot.c
* Reboot your PC
*
* Copyright (C) 1998 by Pavel Machek, GPL
*/
#include <sys/fs.h>
#include <stdio.h>
#include <std.h>
#include <string.h>
#include <mach/io.h>
int
main( void )
{
printf( "Reseting" ); fflush( stdout );
if (enable_io( 0x64, 0x64 )) {
printf( "Can not enable io.\n" );
return 1;
}
printf( "." ); fflush( stdout );
while( inportb( 0x64 ) & 0x02 );
printf( "." ); fflush( stdout );
outportb( 0x64, 0xfe );
}
-- I'm really pavel@atrey.karlin.mff.cuni.cz. Pavel Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).Received on Sun Jan 4 12:34:27 1998
This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:43 PDT