On 10/2/05, Blaisorblade <[EMAIL PROTECTED]> wrote:
> On Sunday 02 October 2005 18:37, Nelson Castillo
(cut)
> > - What is the best place to intercept keyboard strokes in UML?
> > - What is the best place to intercept keyboard strokes in i386?
> I think (from casual lurking on kerneltrap.org and lwn.net) that the best
> place is the serio layer on i386, which is independent of the actual keyboard
> layer, and the TTY layer on UML, since we (check with makefiles but if I'm
> wrong we probably have a bug) don't use serio.

/arch/um/drivers/chan_kern.c:

...

int generic_read(int fd, char *c_out, void *unused)
{
  int n;

  n = os_read_file(fd, c_out, sizeof(*c_out));

  if(n == -EAGAIN)
    return(0);
  else if(n == 0)
    return(-EIO);

  // I will intercept the call here in UML.
  // I hope it's ok.

  printk("<1>generic_read\n");

  return(n);
}

For non-uml interception, i guess I could try
with drivers/char/keyboard.c

static void kbd_keycode(unsigned int keycode, int down,
      int hw_raw, struct pt_regs *regs)
{...}

Well. Trying with UML first.

Thanks a lot.

--
Homepage : http://geocities.com/arhuaco

The first principle is that you must not fool yourself
and you are the easiest person to fool.
     -- Richard Feynman.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to